// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gdk" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) // Provides 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. // // On Wayland, the settings are obtained either via a settings portal, // or by reading desktop settings from [class@Gio.Settings]. // // On macOS, the settings are obtained from `NSUserDefaults`. // // In the absence of these sharing mechanisms, GTK reads default values for // settings from `settings.ini` files in `/etc/gtk-4.0`, `$XDG_CONFIG_DIRS/gtk-4.0` // and `$XDG_CONFIG_HOME/gtk-4.0`. These files must be valid key files (see // `GKeyFile`), 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. // // There is one `GtkSettings` instance per display. It can be obtained with // [func@Gtk.Settings.get_for_display], but in many cases, it is more // convenient to use [method@Gtk.Widget.get_settings]. type Settings struct { gobject.Object } var xSettingsGLibType func() types.GType func SettingsGLibType() types.GType { return xSettingsGLibType() } func SettingsNewFromInternalPtr(ptr uintptr) *Settings { cls := &Settings{} cls.Ptr = ptr return cls } var xSettingsResetProperty func(uintptr, string) // 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. func (x *Settings) ResetProperty(NameVar string) { xSettingsResetProperty(x.GoPointer(), NameVar) } func (c *Settings) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Settings) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyGtkAlternativeButtonOrder sets the "gtk-alternative-button-order" property. // Whether buttons in dialogs should use the alternative button order. func (x *Settings) SetPropertyGtkAlternativeButtonOrder(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-alternative-button-order", &v) } // GetPropertyGtkAlternativeButtonOrder gets the "gtk-alternative-button-order" property. // Whether buttons in dialogs should use the alternative button order. func (x *Settings) GetPropertyGtkAlternativeButtonOrder() bool { var v gobject.Value x.GetProperty("gtk-alternative-button-order", &v) return v.GetBoolean() } // SetPropertyGtkAlternativeSortArrows sets the "gtk-alternative-sort-arrows" property. // Controls the direction of the sort indicators in sorted list and tree // views. // // By default an arrow pointing down means the column is sorted // in ascending order. When set to %TRUE, this order will be inverted. func (x *Settings) SetPropertyGtkAlternativeSortArrows(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-alternative-sort-arrows", &v) } // GetPropertyGtkAlternativeSortArrows gets the "gtk-alternative-sort-arrows" property. // Controls the direction of the sort indicators in sorted list and tree // views. // // By default an arrow pointing down means the column is sorted // in ascending order. When set to %TRUE, this order will be inverted. func (x *Settings) GetPropertyGtkAlternativeSortArrows() bool { var v gobject.Value x.GetProperty("gtk-alternative-sort-arrows", &v) return v.GetBoolean() } // SetPropertyGtkApplicationPreferDarkTheme sets the "gtk-application-prefer-dark-theme" property. // Whether the application prefers to use a dark theme. // // If a GTK theme includes a dark variant, it will be used // instead of the configured theme. // // Some applications benefit from minimizing the amount of light // pollution that interferes with the content. Good candidates for // dark themes are photo and video editors that make the actual // content get all the attention and minimize the distraction of // the chrome. // // Dark themes should not be used for documents, where large spaces // are white/light and the dark chrome creates too much contrast // (web browser, text editor...). func (x *Settings) SetPropertyGtkApplicationPreferDarkTheme(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-application-prefer-dark-theme", &v) } // GetPropertyGtkApplicationPreferDarkTheme gets the "gtk-application-prefer-dark-theme" property. // Whether the application prefers to use a dark theme. // // If a GTK theme includes a dark variant, it will be used // instead of the configured theme. // // Some applications benefit from minimizing the amount of light // pollution that interferes with the content. Good candidates for // dark themes are photo and video editors that make the actual // content get all the attention and minimize the distraction of // the chrome. // // Dark themes should not be used for documents, where large spaces // are white/light and the dark chrome creates too much contrast // (web browser, text editor...). func (x *Settings) GetPropertyGtkApplicationPreferDarkTheme() bool { var v gobject.Value x.GetProperty("gtk-application-prefer-dark-theme", &v) return v.GetBoolean() } // SetPropertyGtkCursorAspectRatio sets the "gtk-cursor-aspect-ratio" property. // The aspect ratio of the text caret. func (x *Settings) SetPropertyGtkCursorAspectRatio(value float64) { var v gobject.Value v.Init(gobject.TypeDoubleVal) v.SetDouble(value) x.SetProperty("gtk-cursor-aspect-ratio", &v) } // GetPropertyGtkCursorAspectRatio gets the "gtk-cursor-aspect-ratio" property. // The aspect ratio of the text caret. func (x *Settings) GetPropertyGtkCursorAspectRatio() float64 { var v gobject.Value x.GetProperty("gtk-cursor-aspect-ratio", &v) return v.GetDouble() } // SetPropertyGtkCursorBlink sets the "gtk-cursor-blink" property. // Whether the cursor should blink. // // Also see the [property@Gtk.Settings:gtk-cursor-blink-timeout] setting, // which allows more flexible control over cursor blinking. func (x *Settings) SetPropertyGtkCursorBlink(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-cursor-blink", &v) } // GetPropertyGtkCursorBlink gets the "gtk-cursor-blink" property. // Whether the cursor should blink. // // Also see the [property@Gtk.Settings:gtk-cursor-blink-timeout] setting, // which allows more flexible control over cursor blinking. func (x *Settings) GetPropertyGtkCursorBlink() bool { var v gobject.Value x.GetProperty("gtk-cursor-blink", &v) return v.GetBoolean() } // SetPropertyGtkCursorBlinkTime sets the "gtk-cursor-blink-time" property. // Length of the cursor blink cycle, in milliseconds. func (x *Settings) SetPropertyGtkCursorBlinkTime(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-cursor-blink-time", &v) } // GetPropertyGtkCursorBlinkTime gets the "gtk-cursor-blink-time" property. // Length of the cursor blink cycle, in milliseconds. func (x *Settings) GetPropertyGtkCursorBlinkTime() int { var v gobject.Value x.GetProperty("gtk-cursor-blink-time", &v) return v.GetInt() } // SetPropertyGtkCursorBlinkTimeout sets the "gtk-cursor-blink-timeout" property. // Time after which the cursor stops blinking, in seconds. // // The timer is reset after each user interaction. // // Setting this to zero has the same effect as setting // [property@Gtk.Settings:gtk-cursor-blink] to %FALSE. func (x *Settings) SetPropertyGtkCursorBlinkTimeout(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-cursor-blink-timeout", &v) } // GetPropertyGtkCursorBlinkTimeout gets the "gtk-cursor-blink-timeout" property. // Time after which the cursor stops blinking, in seconds. // // The timer is reset after each user interaction. // // Setting this to zero has the same effect as setting // [property@Gtk.Settings:gtk-cursor-blink] to %FALSE. func (x *Settings) GetPropertyGtkCursorBlinkTimeout() int { var v gobject.Value x.GetProperty("gtk-cursor-blink-timeout", &v) return v.GetInt() } // SetPropertyGtkCursorThemeName sets the "gtk-cursor-theme-name" property. // Name of the cursor theme to use. // // Use %NULL to use the default theme. func (x *Settings) SetPropertyGtkCursorThemeName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-cursor-theme-name", &v) } // GetPropertyGtkCursorThemeName gets the "gtk-cursor-theme-name" property. // Name of the cursor theme to use. // // Use %NULL to use the default theme. func (x *Settings) GetPropertyGtkCursorThemeName() string { var v gobject.Value x.GetProperty("gtk-cursor-theme-name", &v) return v.GetString() } // SetPropertyGtkCursorThemeSize sets the "gtk-cursor-theme-size" property. // The size to use for cursors. // // 0 means to use the default size. func (x *Settings) SetPropertyGtkCursorThemeSize(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-cursor-theme-size", &v) } // GetPropertyGtkCursorThemeSize gets the "gtk-cursor-theme-size" property. // The size to use for cursors. // // 0 means to use the default size. func (x *Settings) GetPropertyGtkCursorThemeSize() int { var v gobject.Value x.GetProperty("gtk-cursor-theme-size", &v) return v.GetInt() } // SetPropertyGtkDecorationLayout sets the "gtk-decoration-layout" property. // Determines which buttons should be put in the // titlebar of client-side decorated windows, and whether they // should be placed on the left or right. // // 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. // // Note that buttons will only be shown when they are meaningful. // E.g. a menu button only appears when the desktop shell does not // show the app menu, and a close button only appears on a window // that can be closed. // // Also note that the setting can be overridden with the // [property@Gtk.HeaderBar:decoration-layout] property. func (x *Settings) SetPropertyGtkDecorationLayout(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-decoration-layout", &v) } // GetPropertyGtkDecorationLayout gets the "gtk-decoration-layout" property. // Determines which buttons should be put in the // titlebar of client-side decorated windows, and whether they // should be placed on the left or right. // // 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. // // Note that buttons will only be shown when they are meaningful. // E.g. a menu button only appears when the desktop shell does not // show the app menu, and a close button only appears on a window // that can be closed. // // Also note that the setting can be overridden with the // [property@Gtk.HeaderBar:decoration-layout] property. func (x *Settings) GetPropertyGtkDecorationLayout() string { var v gobject.Value x.GetProperty("gtk-decoration-layout", &v) return v.GetString() } // SetPropertyGtkDialogsUseHeader sets the "gtk-dialogs-use-header" property. // Whether builtin GTK dialogs such as the file chooser, the // color chooser or the font chooser will use a header bar at // the top to show action widgets, or an action area at the bottom. // // This setting does not affect custom dialogs using `GtkDialog` // directly, or message dialogs. func (x *Settings) SetPropertyGtkDialogsUseHeader(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-dialogs-use-header", &v) } // GetPropertyGtkDialogsUseHeader gets the "gtk-dialogs-use-header" property. // Whether builtin GTK dialogs such as the file chooser, the // color chooser or the font chooser will use a header bar at // the top to show action widgets, or an action area at the bottom. // // This setting does not affect custom dialogs using `GtkDialog` // directly, or message dialogs. func (x *Settings) GetPropertyGtkDialogsUseHeader() bool { var v gobject.Value x.GetProperty("gtk-dialogs-use-header", &v) return v.GetBoolean() } // SetPropertyGtkDndDragThreshold sets the "gtk-dnd-drag-threshold" property. // The number of pixels the cursor can move before dragging. func (x *Settings) SetPropertyGtkDndDragThreshold(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-dnd-drag-threshold", &v) } // GetPropertyGtkDndDragThreshold gets the "gtk-dnd-drag-threshold" property. // The number of pixels the cursor can move before dragging. func (x *Settings) GetPropertyGtkDndDragThreshold() int { var v gobject.Value x.GetProperty("gtk-dnd-drag-threshold", &v) return v.GetInt() } // SetPropertyGtkDoubleClickDistance sets the "gtk-double-click-distance" property. // The maximum distance allowed between two clicks for them to be considered // a double click, in pixels. func (x *Settings) SetPropertyGtkDoubleClickDistance(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-double-click-distance", &v) } // GetPropertyGtkDoubleClickDistance gets the "gtk-double-click-distance" property. // The maximum distance allowed between two clicks for them to be considered // a double click, in pixels. func (x *Settings) GetPropertyGtkDoubleClickDistance() int { var v gobject.Value x.GetProperty("gtk-double-click-distance", &v) return v.GetInt() } // SetPropertyGtkDoubleClickTime sets the "gtk-double-click-time" property. // The maximum time to allow between two clicks for them to be considered // a double click, in milliseconds. func (x *Settings) SetPropertyGtkDoubleClickTime(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-double-click-time", &v) } // GetPropertyGtkDoubleClickTime gets the "gtk-double-click-time" property. // The maximum time to allow between two clicks for them to be considered // a double click, in milliseconds. func (x *Settings) GetPropertyGtkDoubleClickTime() int { var v gobject.Value x.GetProperty("gtk-double-click-time", &v) return v.GetInt() } // SetPropertyGtkEnableAccels sets the "gtk-enable-accels" property. // Whether menu items should have visible accelerators which can be // activated. func (x *Settings) SetPropertyGtkEnableAccels(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-enable-accels", &v) } // GetPropertyGtkEnableAccels gets the "gtk-enable-accels" property. // Whether menu items should have visible accelerators which can be // activated. func (x *Settings) GetPropertyGtkEnableAccels() bool { var v gobject.Value x.GetProperty("gtk-enable-accels", &v) return v.GetBoolean() } // SetPropertyGtkEnableAnimations sets the "gtk-enable-animations" property. // Whether to enable toolkit-wide animations. func (x *Settings) SetPropertyGtkEnableAnimations(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-enable-animations", &v) } // GetPropertyGtkEnableAnimations gets the "gtk-enable-animations" property. // Whether to enable toolkit-wide animations. func (x *Settings) GetPropertyGtkEnableAnimations() bool { var v gobject.Value x.GetProperty("gtk-enable-animations", &v) return v.GetBoolean() } // SetPropertyGtkEnableEventSounds sets the "gtk-enable-event-sounds" property. // Whether to play any event sounds at all. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use a loadable // module like the one that comes with libcanberra. func (x *Settings) SetPropertyGtkEnableEventSounds(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-enable-event-sounds", &v) } // GetPropertyGtkEnableEventSounds gets the "gtk-enable-event-sounds" property. // Whether to play any event sounds at all. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use a loadable // module like the one that comes with libcanberra. func (x *Settings) GetPropertyGtkEnableEventSounds() bool { var v gobject.Value x.GetProperty("gtk-enable-event-sounds", &v) return v.GetBoolean() } // SetPropertyGtkEnableInputFeedbackSounds sets the "gtk-enable-input-feedback-sounds" property. // Whether to play event sounds as feedback to user input. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use a loadable // module like the one that comes with libcanberra. func (x *Settings) SetPropertyGtkEnableInputFeedbackSounds(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-enable-input-feedback-sounds", &v) } // GetPropertyGtkEnableInputFeedbackSounds gets the "gtk-enable-input-feedback-sounds" property. // Whether to play event sounds as feedback to user input. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use a loadable // module like the one that comes with libcanberra. func (x *Settings) GetPropertyGtkEnableInputFeedbackSounds() bool { var v gobject.Value x.GetProperty("gtk-enable-input-feedback-sounds", &v) return v.GetBoolean() } // SetPropertyGtkEnablePrimaryPaste sets the "gtk-enable-primary-paste" property. // Whether a middle click on a mouse should paste the // 'PRIMARY' clipboard content at the cursor location. func (x *Settings) SetPropertyGtkEnablePrimaryPaste(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-enable-primary-paste", &v) } // GetPropertyGtkEnablePrimaryPaste gets the "gtk-enable-primary-paste" property. // Whether a middle click on a mouse should paste the // 'PRIMARY' clipboard content at the cursor location. func (x *Settings) GetPropertyGtkEnablePrimaryPaste() bool { var v gobject.Value x.GetProperty("gtk-enable-primary-paste", &v) return v.GetBoolean() } // SetPropertyGtkEntryPasswordHintTimeout sets the "gtk-entry-password-hint-timeout" property. // How long to show the last input character in hidden // entries. // // This value is in milliseconds. 0 disables showing the // last char. 600 is a good value for enabling it. func (x *Settings) SetPropertyGtkEntryPasswordHintTimeout(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("gtk-entry-password-hint-timeout", &v) } // GetPropertyGtkEntryPasswordHintTimeout gets the "gtk-entry-password-hint-timeout" property. // How long to show the last input character in hidden // entries. // // This value is in milliseconds. 0 disables showing the // last char. 600 is a good value for enabling it. func (x *Settings) GetPropertyGtkEntryPasswordHintTimeout() uint { var v gobject.Value x.GetProperty("gtk-entry-password-hint-timeout", &v) return v.GetUint() } // SetPropertyGtkEntrySelectOnFocus sets the "gtk-entry-select-on-focus" property. // Whether to select the contents of an entry when it is focused. func (x *Settings) SetPropertyGtkEntrySelectOnFocus(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-entry-select-on-focus", &v) } // GetPropertyGtkEntrySelectOnFocus gets the "gtk-entry-select-on-focus" property. // Whether to select the contents of an entry when it is focused. func (x *Settings) GetPropertyGtkEntrySelectOnFocus() bool { var v gobject.Value x.GetProperty("gtk-entry-select-on-focus", &v) return v.GetBoolean() } // SetPropertyGtkErrorBell sets the "gtk-error-bell" property. // When %TRUE, keyboard navigation and other input-related errors // will cause a beep. // // Since the error bell is implemented using gdk_surface_beep(), the // windowing system may offer ways to configure the error bell in many // ways, such as flashing the window or similar visual effects. func (x *Settings) SetPropertyGtkErrorBell(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-error-bell", &v) } // GetPropertyGtkErrorBell gets the "gtk-error-bell" property. // When %TRUE, keyboard navigation and other input-related errors // will cause a beep. // // Since the error bell is implemented using gdk_surface_beep(), the // windowing system may offer ways to configure the error bell in many // ways, such as flashing the window or similar visual effects. func (x *Settings) GetPropertyGtkErrorBell() bool { var v gobject.Value x.GetProperty("gtk-error-bell", &v) return v.GetBoolean() } // SetPropertyGtkFontName sets the "gtk-font-name" property. // The default font to use. // // GTK uses the family name and size from this string. func (x *Settings) SetPropertyGtkFontName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-font-name", &v) } // GetPropertyGtkFontName gets the "gtk-font-name" property. // The default font to use. // // GTK uses the family name and size from this string. func (x *Settings) GetPropertyGtkFontName() string { var v gobject.Value x.GetProperty("gtk-font-name", &v) return v.GetString() } // SetPropertyGtkFontconfigTimestamp sets the "gtk-fontconfig-timestamp" property. // Timestamp of the current fontconfig configuration. func (x *Settings) SetPropertyGtkFontconfigTimestamp(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("gtk-fontconfig-timestamp", &v) } // GetPropertyGtkFontconfigTimestamp gets the "gtk-fontconfig-timestamp" property. // Timestamp of the current fontconfig configuration. func (x *Settings) GetPropertyGtkFontconfigTimestamp() uint { var v gobject.Value x.GetProperty("gtk-fontconfig-timestamp", &v) return v.GetUint() } // SetPropertyGtkHintFontMetrics sets the "gtk-hint-font-metrics" property. // Whether hinting should be applied to font metrics. // // Note that this also turns off subpixel positioning of glyphs, // since it conflicts with metrics hinting. func (x *Settings) SetPropertyGtkHintFontMetrics(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-hint-font-metrics", &v) } // GetPropertyGtkHintFontMetrics gets the "gtk-hint-font-metrics" property. // Whether hinting should be applied to font metrics. // // Note that this also turns off subpixel positioning of glyphs, // since it conflicts with metrics hinting. func (x *Settings) GetPropertyGtkHintFontMetrics() bool { var v gobject.Value x.GetProperty("gtk-hint-font-metrics", &v) return v.GetBoolean() } // SetPropertyGtkIconThemeName sets the "gtk-icon-theme-name" property. // Name of the icon theme to use. // // See [class@Gtk.IconTheme] for details about how // GTK handles icon themes. func (x *Settings) SetPropertyGtkIconThemeName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-icon-theme-name", &v) } // GetPropertyGtkIconThemeName gets the "gtk-icon-theme-name" property. // Name of the icon theme to use. // // See [class@Gtk.IconTheme] for details about how // GTK handles icon themes. func (x *Settings) GetPropertyGtkIconThemeName() string { var v gobject.Value x.GetProperty("gtk-icon-theme-name", &v) return v.GetString() } // SetPropertyGtkImModule sets the "gtk-im-module" property. // Which IM (input method) module should be used by default. // // This is the input method that will be used if the user has not // explicitly chosen another input method from the IM context menu. // This also can be a colon-separated list of input methods, which GTK // will try in turn until it finds one available on the system. // // See [class@Gtk.IMContext]. func (x *Settings) SetPropertyGtkImModule(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-im-module", &v) } // GetPropertyGtkImModule gets the "gtk-im-module" property. // Which IM (input method) module should be used by default. // // This is the input method that will be used if the user has not // explicitly chosen another input method from the IM context menu. // This also can be a colon-separated list of input methods, which GTK // will try in turn until it finds one available on the system. // // See [class@Gtk.IMContext]. func (x *Settings) GetPropertyGtkImModule() string { var v gobject.Value x.GetProperty("gtk-im-module", &v) return v.GetString() } // SetPropertyGtkKeynavUseCaret sets the "gtk-keynav-use-caret" property. // Whether GTK should make sure that text can be navigated with // a caret, even if it is not editable. // // This is useful when using a screen reader. func (x *Settings) SetPropertyGtkKeynavUseCaret(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-keynav-use-caret", &v) } // GetPropertyGtkKeynavUseCaret gets the "gtk-keynav-use-caret" property. // Whether GTK should make sure that text can be navigated with // a caret, even if it is not editable. // // This is useful when using a screen reader. func (x *Settings) GetPropertyGtkKeynavUseCaret() bool { var v gobject.Value x.GetProperty("gtk-keynav-use-caret", &v) return v.GetBoolean() } // SetPropertyGtkLabelSelectOnFocus sets the "gtk-label-select-on-focus" property. // Whether to select the contents of a selectable // label when it is focused. func (x *Settings) SetPropertyGtkLabelSelectOnFocus(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-label-select-on-focus", &v) } // GetPropertyGtkLabelSelectOnFocus gets the "gtk-label-select-on-focus" property. // Whether to select the contents of a selectable // label when it is focused. func (x *Settings) GetPropertyGtkLabelSelectOnFocus() bool { var v gobject.Value x.GetProperty("gtk-label-select-on-focus", &v) return v.GetBoolean() } // SetPropertyGtkLongPressTime sets the "gtk-long-press-time" property. // The time for a button or touch press to be considered a “long press”. // // See [class@Gtk.GestureLongPress]. func (x *Settings) SetPropertyGtkLongPressTime(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("gtk-long-press-time", &v) } // GetPropertyGtkLongPressTime gets the "gtk-long-press-time" property. // The time for a button or touch press to be considered a “long press”. // // See [class@Gtk.GestureLongPress]. func (x *Settings) GetPropertyGtkLongPressTime() uint { var v gobject.Value x.GetProperty("gtk-long-press-time", &v) return v.GetUint() } // SetPropertyGtkOverlayScrolling sets the "gtk-overlay-scrolling" property. // Whether scrolled windows may use overlaid scrolling indicators. // // If this is set to %FALSE, scrolled windows will have permanent // scrollbars. func (x *Settings) SetPropertyGtkOverlayScrolling(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-overlay-scrolling", &v) } // GetPropertyGtkOverlayScrolling gets the "gtk-overlay-scrolling" property. // Whether scrolled windows may use overlaid scrolling indicators. // // If this is set to %FALSE, scrolled windows will have permanent // scrollbars. func (x *Settings) GetPropertyGtkOverlayScrolling() bool { var v gobject.Value x.GetProperty("gtk-overlay-scrolling", &v) return v.GetBoolean() } // SetPropertyGtkPrimaryButtonWarpsSlider sets the "gtk-primary-button-warps-slider" property. // If the value of this setting is %TRUE, clicking the primary button in a // `GtkRange` trough will move the slider, and hence set the range’s value, to // the point that you clicked. // // If it is %FALSE, a primary click will cause the slider/value to move // by the range’s page-size towards the point clicked. // // Whichever action you choose for the primary button, the other action will // be available by holding Shift and primary-clicking, or clicking the middle // mouse button. func (x *Settings) SetPropertyGtkPrimaryButtonWarpsSlider(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-primary-button-warps-slider", &v) } // GetPropertyGtkPrimaryButtonWarpsSlider gets the "gtk-primary-button-warps-slider" property. // If the value of this setting is %TRUE, clicking the primary button in a // `GtkRange` trough will move the slider, and hence set the range’s value, to // the point that you clicked. // // If it is %FALSE, a primary click will cause the slider/value to move // by the range’s page-size towards the point clicked. // // Whichever action you choose for the primary button, the other action will // be available by holding Shift and primary-clicking, or clicking the middle // mouse button. func (x *Settings) GetPropertyGtkPrimaryButtonWarpsSlider() bool { var v gobject.Value x.GetProperty("gtk-primary-button-warps-slider", &v) return v.GetBoolean() } // SetPropertyGtkPrintBackends sets the "gtk-print-backends" property. // A comma-separated list of print backends to use in the print // dialog. // // Available print backends depend on the GTK installation, // and may include "file", "cups", "lpr" or "papi". func (x *Settings) SetPropertyGtkPrintBackends(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-print-backends", &v) } // GetPropertyGtkPrintBackends gets the "gtk-print-backends" property. // A comma-separated list of print backends to use in the print // dialog. // // Available print backends depend on the GTK installation, // and may include "file", "cups", "lpr" or "papi". func (x *Settings) GetPropertyGtkPrintBackends() string { var v gobject.Value x.GetProperty("gtk-print-backends", &v) return v.GetString() } // SetPropertyGtkPrintPreviewCommand sets the "gtk-print-preview-command" property. // A command to run for displaying the print preview. // // The command should contain a `%f` placeholder, which will get // replaced by the path to the pdf file. The command may also // contain a `%s` placeholder, which will get replaced by the // path to a file containing the print settings in the format // produced by [method@Gtk.PrintSettings.to_file]. // // The preview application is responsible for removing the pdf // file and the print settings file when it is done. func (x *Settings) SetPropertyGtkPrintPreviewCommand(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-print-preview-command", &v) } // GetPropertyGtkPrintPreviewCommand gets the "gtk-print-preview-command" property. // A command to run for displaying the print preview. // // The command should contain a `%f` placeholder, which will get // replaced by the path to the pdf file. The command may also // contain a `%s` placeholder, which will get replaced by the // path to a file containing the print settings in the format // produced by [method@Gtk.PrintSettings.to_file]. // // The preview application is responsible for removing the pdf // file and the print settings file when it is done. func (x *Settings) GetPropertyGtkPrintPreviewCommand() string { var v gobject.Value x.GetProperty("gtk-print-preview-command", &v) return v.GetString() } // SetPropertyGtkRecentFilesEnabled sets the "gtk-recent-files-enabled" property. // Whether GTK should keep track of items inside the recently used // resources list. // // If set to %FALSE, the list will always be empty. func (x *Settings) SetPropertyGtkRecentFilesEnabled(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-recent-files-enabled", &v) } // GetPropertyGtkRecentFilesEnabled gets the "gtk-recent-files-enabled" property. // Whether GTK should keep track of items inside the recently used // resources list. // // If set to %FALSE, the list will always be empty. func (x *Settings) GetPropertyGtkRecentFilesEnabled() bool { var v gobject.Value x.GetProperty("gtk-recent-files-enabled", &v) return v.GetBoolean() } // SetPropertyGtkRecentFilesMaxAge sets the "gtk-recent-files-max-age" property. // The maximum age, in days, of the items inside the recently used // resources list. // // Items older than this setting will be excised from the list. // If set to 0, the list will always be empty; if set to -1, no // item will be removed. func (x *Settings) SetPropertyGtkRecentFilesMaxAge(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-recent-files-max-age", &v) } // GetPropertyGtkRecentFilesMaxAge gets the "gtk-recent-files-max-age" property. // The maximum age, in days, of the items inside the recently used // resources list. // // Items older than this setting will be excised from the list. // If set to 0, the list will always be empty; if set to -1, no // item will be removed. func (x *Settings) GetPropertyGtkRecentFilesMaxAge() int { var v gobject.Value x.GetProperty("gtk-recent-files-max-age", &v) return v.GetInt() } // SetPropertyGtkShellShowsAppMenu sets the "gtk-shell-shows-app-menu" property. // Set to %TRUE if the desktop environment is displaying // the app menu, %FALSE if the app should display it itself. func (x *Settings) SetPropertyGtkShellShowsAppMenu(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-shell-shows-app-menu", &v) } // GetPropertyGtkShellShowsAppMenu gets the "gtk-shell-shows-app-menu" property. // Set to %TRUE if the desktop environment is displaying // the app menu, %FALSE if the app should display it itself. func (x *Settings) GetPropertyGtkShellShowsAppMenu() bool { var v gobject.Value x.GetProperty("gtk-shell-shows-app-menu", &v) return v.GetBoolean() } // SetPropertyGtkShellShowsDesktop sets the "gtk-shell-shows-desktop" property. // Set to %TRUE if the desktop environment is displaying // the desktop folder, %FALSE if not. func (x *Settings) SetPropertyGtkShellShowsDesktop(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-shell-shows-desktop", &v) } // GetPropertyGtkShellShowsDesktop gets the "gtk-shell-shows-desktop" property. // Set to %TRUE if the desktop environment is displaying // the desktop folder, %FALSE if not. func (x *Settings) GetPropertyGtkShellShowsDesktop() bool { var v gobject.Value x.GetProperty("gtk-shell-shows-desktop", &v) return v.GetBoolean() } // SetPropertyGtkShellShowsMenubar sets the "gtk-shell-shows-menubar" property. // Set to %TRUE if the desktop environment is displaying // the menubar, %FALSE if the app should display it itself. func (x *Settings) SetPropertyGtkShellShowsMenubar(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-shell-shows-menubar", &v) } // GetPropertyGtkShellShowsMenubar gets the "gtk-shell-shows-menubar" property. // Set to %TRUE if the desktop environment is displaying // the menubar, %FALSE if the app should display it itself. func (x *Settings) GetPropertyGtkShellShowsMenubar() bool { var v gobject.Value x.GetProperty("gtk-shell-shows-menubar", &v) return v.GetBoolean() } // SetPropertyGtkShowStatusShapes sets the "gtk-show-status-shapes" property. // When %TRUE, widgets like switches include shapes to indicate their on/off state. func (x *Settings) SetPropertyGtkShowStatusShapes(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-show-status-shapes", &v) } // GetPropertyGtkShowStatusShapes gets the "gtk-show-status-shapes" property. // When %TRUE, widgets like switches include shapes to indicate their on/off state. func (x *Settings) GetPropertyGtkShowStatusShapes() bool { var v gobject.Value x.GetProperty("gtk-show-status-shapes", &v) return v.GetBoolean() } // SetPropertyGtkSoundThemeName sets the "gtk-sound-theme-name" property. // The XDG sound theme to use for event sounds. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use // a loadable module like the one that comes with libcanberra. func (x *Settings) SetPropertyGtkSoundThemeName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-sound-theme-name", &v) } // GetPropertyGtkSoundThemeName gets the "gtk-sound-theme-name" property. // The XDG sound theme to use for event sounds. // // See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec) // for more information on event sounds and sound themes. // // GTK itself does not support event sounds, you have to use // a loadable module like the one that comes with libcanberra. func (x *Settings) GetPropertyGtkSoundThemeName() string { var v gobject.Value x.GetProperty("gtk-sound-theme-name", &v) return v.GetString() } // SetPropertyGtkSplitCursor sets the "gtk-split-cursor" property. // Whether two cursors should be displayed for mixed left-to-right and // right-to-left text. func (x *Settings) SetPropertyGtkSplitCursor(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("gtk-split-cursor", &v) } // GetPropertyGtkSplitCursor gets the "gtk-split-cursor" property. // Whether two cursors should be displayed for mixed left-to-right and // right-to-left text. func (x *Settings) GetPropertyGtkSplitCursor() bool { var v gobject.Value x.GetProperty("gtk-split-cursor", &v) return v.GetBoolean() } // SetPropertyGtkThemeName sets the "gtk-theme-name" property. // Name of the theme to load. // // See [class@Gtk.CssProvider] for details about how // GTK finds the CSS stylesheet for a theme. func (x *Settings) SetPropertyGtkThemeName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-theme-name", &v) } // GetPropertyGtkThemeName gets the "gtk-theme-name" property. // Name of the theme to load. // // See [class@Gtk.CssProvider] for details about how // GTK finds the CSS stylesheet for a theme. func (x *Settings) GetPropertyGtkThemeName() string { var v gobject.Value x.GetProperty("gtk-theme-name", &v) return v.GetString() } // SetPropertyGtkTitlebarDoubleClick sets the "gtk-titlebar-double-click" property. // Determines the action to take when a double-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) SetPropertyGtkTitlebarDoubleClick(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-titlebar-double-click", &v) } // GetPropertyGtkTitlebarDoubleClick gets the "gtk-titlebar-double-click" property. // Determines the action to take when a double-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) GetPropertyGtkTitlebarDoubleClick() string { var v gobject.Value x.GetProperty("gtk-titlebar-double-click", &v) return v.GetString() } // SetPropertyGtkTitlebarMiddleClick sets the "gtk-titlebar-middle-click" property. // Determines the action to take when a middle-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) SetPropertyGtkTitlebarMiddleClick(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-titlebar-middle-click", &v) } // GetPropertyGtkTitlebarMiddleClick gets the "gtk-titlebar-middle-click" property. // Determines the action to take when a middle-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) GetPropertyGtkTitlebarMiddleClick() string { var v gobject.Value x.GetProperty("gtk-titlebar-middle-click", &v) return v.GetString() } // SetPropertyGtkTitlebarRightClick sets the "gtk-titlebar-right-click" property. // Determines the action to take when a right-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) SetPropertyGtkTitlebarRightClick(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-titlebar-right-click", &v) } // GetPropertyGtkTitlebarRightClick gets the "gtk-titlebar-right-click" property. // Determines the action to take when a right-click // occurs on the titlebar of client-side decorated windows. // // Recognized actions are minimize, toggle-maximize, menu, lower // or none. func (x *Settings) GetPropertyGtkTitlebarRightClick() string { var v gobject.Value x.GetProperty("gtk-titlebar-right-click", &v) return v.GetString() } // SetPropertyGtkXftAntialias sets the "gtk-xft-antialias" property. // Whether to antialias fonts. // // The values are 0 for no, 1 for yes, or -1 for the system default. func (x *Settings) SetPropertyGtkXftAntialias(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-xft-antialias", &v) } // GetPropertyGtkXftAntialias gets the "gtk-xft-antialias" property. // Whether to antialias fonts. // // The values are 0 for no, 1 for yes, or -1 for the system default. func (x *Settings) GetPropertyGtkXftAntialias() int { var v gobject.Value x.GetProperty("gtk-xft-antialias", &v) return v.GetInt() } // SetPropertyGtkXftDpi sets the "gtk-xft-dpi" property. // The font resolution, in 1024 * dots/inch. // // -1 to use the default value. func (x *Settings) SetPropertyGtkXftDpi(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-xft-dpi", &v) } // GetPropertyGtkXftDpi gets the "gtk-xft-dpi" property. // The font resolution, in 1024 * dots/inch. // // -1 to use the default value. func (x *Settings) GetPropertyGtkXftDpi() int { var v gobject.Value x.GetProperty("gtk-xft-dpi", &v) return v.GetInt() } // SetPropertyGtkXftHinting sets the "gtk-xft-hinting" property. // Whether to enable font hinting. // // The values are 0 for no, 1 for yes, or -1 for the system default. func (x *Settings) SetPropertyGtkXftHinting(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("gtk-xft-hinting", &v) } // GetPropertyGtkXftHinting gets the "gtk-xft-hinting" property. // Whether to enable font hinting. // // The values are 0 for no, 1 for yes, or -1 for the system default. func (x *Settings) GetPropertyGtkXftHinting() int { var v gobject.Value x.GetProperty("gtk-xft-hinting", &v) return v.GetInt() } // SetPropertyGtkXftHintstyle sets the "gtk-xft-hintstyle" property. // What degree of font hinting to use. // // The possible vaues are hintnone, hintslight, // hintmedium, hintfull. func (x *Settings) SetPropertyGtkXftHintstyle(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-xft-hintstyle", &v) } // GetPropertyGtkXftHintstyle gets the "gtk-xft-hintstyle" property. // What degree of font hinting to use. // // The possible vaues are hintnone, hintslight, // hintmedium, hintfull. func (x *Settings) GetPropertyGtkXftHintstyle() string { var v gobject.Value x.GetProperty("gtk-xft-hintstyle", &v) return v.GetString() } // SetPropertyGtkXftRgba sets the "gtk-xft-rgba" property. // The type of subpixel antialiasing to use. // // The possible values are none, rgb, bgr, vrgb, vbgr. // // Note that GSK does not support subpixel antialiasing, and this // setting has no effect on font rendering in GTK. func (x *Settings) SetPropertyGtkXftRgba(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("gtk-xft-rgba", &v) } // GetPropertyGtkXftRgba gets the "gtk-xft-rgba" property. // The type of subpixel antialiasing to use. // // The possible values are none, rgb, bgr, vrgb, vbgr. // // Note that GSK does not support subpixel antialiasing, and this // setting has no effect on font rendering in GTK. func (x *Settings) GetPropertyGtkXftRgba() string { var v gobject.Value x.GetProperty("gtk-xft-rgba", &v) return v.GetString() } var xSettingsGetDefault func() uintptr // Gets the `GtkSettings` object for the default display, creating // it if necessary. // // See [func@Gtk.Settings.get_for_display]. func SettingsGetDefault() *Settings { var cls *Settings cret := xSettingsGetDefault() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Settings{} cls.Ptr = cret return cls } var xSettingsGetForDisplay func(uintptr) uintptr // Gets the `GtkSettings` object for @display, creating it if necessary. func SettingsGetForDisplay(DisplayVar *gdk.Display) *Settings { var cls *Settings cret := xSettingsGetForDisplay(DisplayVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Settings{} cls.Ptr = cret return cls } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xSettingsGLibType, libs, "gtk_settings_get_type") core.PuregoSafeRegister(&xSettingsResetProperty, libs, "gtk_settings_reset_property") core.PuregoSafeRegister(&xSettingsGetDefault, libs, "gtk_settings_get_default") core.PuregoSafeRegister(&xSettingsGetForDisplay, libs, "gtk_settings_get_for_display") }