gi-gtk-3.0.17: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Settings

Contents

Description

GtkSettings provide a mechanism to share global settings between applications.

On the X window system, this sharing is realized by an XSettings 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 KeyFile), 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:

C code

 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 settingsGetForScreen, but in many cases, it is more convenient to use widgetGetSettings. settingsGetDefault returns the GtkSettings instance for the default screen.

Synopsis

Exported types

Methods

getDefault

settingsGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m (Maybe Settings)

Returns: a Settings object. If there is no default screen, then returns Nothing.

Gets the Settings object for the default GDK screen, creating it if necessary. See settingsGetForScreen.

getForScreen

settingsGetForScreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) 
=> a

screen: a Screen.

-> m Settings

Returns: a Settings object.

Gets the Settings object for screen, creating it if necessary.

Since: 2.2

installProperty

settingsInstallProperty :: (HasCallStack, MonadIO m) => GParamSpec -> m () Source #

Deprecated: (Since version 3.16)This function is not useful outside GTK+.

No description available in the introspection data.

installPropertyParser

settingsInstallPropertyParser :: (HasCallStack, MonadIO m) => GParamSpec -> RcPropertyParser -> m () Source #

Deprecated: (Since version 3.16)This function is not useful outside GTK+.

No description available in the introspection data.

resetProperty

settingsResetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettings a) 
=> a

settings: a Settings object

-> Text

name: the name of the setting to reset

-> m () 

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.

Since: 3.20

setDoubleProperty

settingsSetDoubleProperty :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Double -> Text -> m () Source #

Deprecated: (Since version 3.16)Use g_object_set() instead.

No description available in the introspection data.

setLongProperty

settingsSetLongProperty :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> CLong -> Text -> m () Source #

Deprecated: (Since version 3.16)Use g_object_set() instead.

No description available in the introspection data.

setPropertyValue

settingsSetPropertyValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> SettingsValue -> m () Source #

Deprecated: (Since version 3.16)Use g_object_set() instead.

No description available in the introspection data.

setStringProperty

settingsSetStringProperty :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Text -> Text -> m () Source #

Deprecated: (Since version 3.16)Use g_object_set() instead.

No description available in the introspection data.

Properties

colorHash

gtkAlternativeButtonOrder

gtkAlternativeSortArrows

gtkApplicationPreferDarkTheme

gtkAutoMnemonics

gtkButtonImages

gtkCanChangeAccels

gtkColorPalette

gtkColorScheme

gtkCursorBlink

gtkCursorBlinkTime

gtkCursorBlinkTimeout

gtkCursorThemeName

gtkCursorThemeSize

gtkDecorationLayout

gtkDialogsUseHeader

gtkDndDragThreshold

gtkDoubleClickDistance

gtkDoubleClickTime

gtkEnableAccels

gtkEnableAnimations

gtkEnableEventSounds

gtkEnableInputFeedbackSounds

gtkEnableMnemonics

gtkEnablePrimaryPaste

gtkEnableTooltips

gtkEntryPasswordHintTimeout

gtkEntrySelectOnFocus

gtkErrorBell

gtkFallbackIconTheme

gtkFileChooserBackend

gtkFontName

gtkFontconfigTimestamp

gtkIconSizes

gtkIconThemeName

gtkImModule

gtkImPreeditStyle

gtkImStatusStyle

gtkKeyThemeName

gtkKeynavCursorOnly

gtkKeynavUseCaret

gtkKeynavWrapAround

gtkLabelSelectOnFocus

gtkLongPressTime

gtkMenuBarAccel

gtkMenuBarPopupDelay

gtkMenuImages

gtkMenuPopdownDelay

gtkMenuPopupDelay

gtkModules

gtkPrimaryButtonWarpsSlider

gtkPrintBackends

gtkPrintPreviewCommand

gtkRecentFilesEnabled

gtkRecentFilesLimit

gtkRecentFilesMaxAge

gtkScrolledWindowPlacement

gtkShellShowsAppMenu

gtkShellShowsDesktop

gtkShellShowsMenubar

gtkShowInputMethodMenu

gtkShowUnicodeMenu

gtkSoundThemeName

gtkSplitCursor

gtkThemeName

gtkTimeoutExpand

gtkTimeoutInitial

gtkTimeoutRepeat

gtkTitlebarDoubleClick

gtkTitlebarMiddleClick

gtkTitlebarRightClick

gtkToolbarIconSize

gtkToolbarStyle

gtkTooltipBrowseModeTimeout

gtkTooltipBrowseTimeout

gtkTooltipTimeout

gtkTouchscreenMode

gtkVisibleFocus

gtkXftAntialias

gtkXftDpi

gtkXftHinting

gtkXftHintstyle

gtkXftRgba