package Implements_Gtk_Style_Provider is new Glib.Types.Implements (Gtk.Style_Provider.Gtk_Style_Provider, Gtk_Settings_Record, Gtk_Settings);
type Gtk_Settings_Record is new GObject_Record with null record;
type Gtk_Settings is access all Gtk_Settings_Record'Class;
Color_Hash_Property : constant Glib.Properties.Property_Boxed;
Gtk_Alternative_Button_Order_Property : constant Glib.Properties.Property_Boolean;
Gtk_Alternative_Sort_Arrows_Property : constant Glib.Properties.Property_Boolean;
Gtk_Application_Prefer_Dark_Theme_Property : constant Glib.Properties.Property_Boolean;
Gtk_Auto_Mnemonics_Property : constant Glib.Properties.Property_Boolean;
Gtk_Button_Images_Property : constant Glib.Properties.Property_Boolean;
Gtk_Can_Change_Accels_Property : constant Glib.Properties.Property_Boolean;
Gtk_Color_Palette_Property : constant Glib.Properties.Property_String;
Gtk_Color_Scheme_Property : constant Glib.Properties.Property_String;
Gtk_Cursor_Blink_Property : constant Glib.Properties.Property_Boolean;
Gtk_Cursor_Blink_Time_Property : constant Glib.Properties.Property_Int;
Gtk_Cursor_Blink_Timeout_Property : constant Glib.Properties.Property_Int;
Gtk_Cursor_Theme_Name_Property : constant Glib.Properties.Property_String;
Gtk_Cursor_Theme_Size_Property : constant Glib.Properties.Property_Int;
Gtk_Dnd_Drag_Threshold_Property : constant Glib.Properties.Property_Int;
Gtk_Double_Click_Distance_Property : constant Glib.Properties.Property_Int;
Gtk_Double_Click_Time_Property : constant Glib.Properties.Property_Int;
Gtk_Enable_Accels_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Animations_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Event_Sounds_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Input_Feedback_Sounds_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Mnemonics_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Primary_Paste_Property : constant Glib.Properties.Property_Boolean;
Gtk_Enable_Tooltips_Property : constant Glib.Properties.Property_Boolean;
Gtk_Entry_Password_Hint_Timeout_Property : constant Glib.Properties.Property_Uint;
Gtk_Entry_Select_On_Focus_Property : constant Glib.Properties.Property_Boolean;
Gtk_Error_Bell_Property : constant Glib.Properties.Property_Boolean;
Gtk_Fallback_Icon_Theme_Property : constant Glib.Properties.Property_String;
Gtk_File_Chooser_Backend_Property : constant Glib.Properties.Property_String;
Gtk_Font_Name_Property : constant Glib.Properties.Property_String;
Gtk_Fontconfig_Timestamp_Property : constant Glib.Properties.Property_Uint;
Gtk_Icon_Sizes_Property : constant Glib.Properties.Property_String;
Gtk_Icon_Theme_Name_Property : constant Glib.Properties.Property_String;
Gtk_Im_Module_Property : constant Glib.Properties.Property_String;
Gtk_Im_Preedit_Style_Property : constant Glib.Properties.Property_Boxed;
Gtk_Im_Status_Style_Property : constant Glib.Properties.Property_Boxed;
Gtk_Key_Theme_Name_Property : constant Glib.Properties.Property_String;
Gtk_Keynav_Cursor_Only_Property : constant Glib.Properties.Property_Boolean;
Gtk_Keynav_Wrap_Around_Property : constant Glib.Properties.Property_Boolean;
Gtk_Label_Select_On_Focus_Property : constant Glib.Properties.Property_Boolean;
Gtk_Menu_Bar_Accel_Property : constant Glib.Properties.Property_String;
Gtk_Menu_Bar_Popup_Delay_Property : constant Glib.Properties.Property_Int;
Gtk_Menu_Images_Property : constant Glib.Properties.Property_Boolean;
Gtk_Menu_Popdown_Delay_Property : constant Glib.Properties.Property_Int;
Gtk_Menu_Popup_Delay_Property : constant Glib.Properties.Property_Int;
Gtk_Modules_Property : constant Glib.Properties.Property_String;
Gtk_Primary_Button_Warps_Slider_Property : constant Glib.Properties.Property_Boolean;
Gtk_Print_Backends_Property : constant Glib.Properties.Property_String;
Gtk_Print_Preview_Command_Property : constant Glib.Properties.Property_String;
Gtk_Recent_Files_Enabled_Property : constant Glib.Properties.Property_Boolean;
Gtk_Recent_Files_Limit_Property : constant Glib.Properties.Property_Int;
Gtk_Recent_Files_Max_Age_Property : constant Glib.Properties.Property_Int;
Gtk_Scrolled_Window_Placement_Property : constant Gtk.Enums.Property_Gtk_Corner_Type;
Gtk_Shell_Shows_App_Menu_Property : constant Glib.Properties.Property_Boolean;
Gtk_Shell_Shows_Menubar_Property : constant Glib.Properties.Property_Boolean;
Gtk_Show_Input_Method_Menu_Property : constant Glib.Properties.Property_Boolean;
Gtk_Show_Unicode_Menu_Property : constant Glib.Properties.Property_Boolean;
Gtk_Sound_Theme_Name_Property : constant Glib.Properties.Property_String;
Gtk_Split_Cursor_Property : constant Glib.Properties.Property_Boolean;
Gtk_Theme_Name_Property : constant Glib.Properties.Property_String;
Gtk_Timeout_Expand_Property : constant Glib.Properties.Property_Int;
Gtk_Timeout_Initial_Property : constant Glib.Properties.Property_Int;
Gtk_Timeout_Repeat_Property : constant Glib.Properties.Property_Int;
Gtk_Toolbar_Icon_Size_Property : constant Gtk.Enums.Property_Gtk_Icon_Size;
Gtk_Toolbar_Style_Property : constant Gtk.Enums.Property_Gtk_Toolbar_Style;
Gtk_Tooltip_Browse_Mode_Timeout_Property : constant Glib.Properties.Property_Int;
Gtk_Tooltip_Browse_Timeout_Property : constant Glib.Properties.Property_Int;
Gtk_Tooltip_Timeout_Property : constant Glib.Properties.Property_Int;
Gtk_Touchscreen_Mode_Property : constant Glib.Properties.Property_Boolean;
Gtk_Visible_Focus_Property : constant Gtk.Enums.Property_Gtk_Policy_Type;
Gtk_Xft_Antialias_Property : constant Glib.Properties.Property_Int;
Gtk_Xft_Dpi_Property : constant Glib.Properties.Property_Int;
Gtk_Xft_Hinting_Property : constant Glib.Properties.Property_Int;
Gtk_Xft_Hintstyle_Property : constant Glib.Properties.Property_String;
Gtk_Xft_Rgba_Property : constant Glib.Properties.Property_String;
function Get_Type return Glib.GType;
procedure Set_Double_Property
( | Self | : not null access Gtk_Settings_Record; |
Name | : UTF8_String; | |
V_Double | : Gdouble; | |
Origin | : UTF8_String); |
procedure Set_Long_Property
( | Self | : not null access Gtk_Settings_Record; |
Name | : UTF8_String; | |
V_Long | : Glong; | |
Origin | : UTF8_String); |
procedure Set_String_Property
( | Self | : not null access Gtk_Settings_Record; |
Name | : UTF8_String; | |
V_String | : UTF8_String; | |
Origin | : UTF8_String); |
procedure Set_Property_Value
( | Settings | : not null access Gtk_Settings_Record; |
Name | : String; | |
Value | : GValue; | |
Origin | : String); |
procedure Get_Style_Property
( | Self | : not null access Gtk_Settings_Record; |
Path | : Gtk.Widget.Gtk_Widget_Path; | |
State | : Gtk.Enums.Gtk_State_Flags; | |
Pspec | : in out Glib.Param_Spec; | |
Value | : out Glib.Values.GValue; | |
Found | : out Boolean); |
function Get_Default return Gtk_Settings;
function Get_For_Screen
( | Screen | : not null access Gdk.Screen.Gdk_Screen_Record'Class) return Gtk_Settings; |
procedure Install_Property
( | Pspec | : in out Glib.Param_Spec); |
function "+"
( | Widget | : access Gtk_Settings_Record'Class) return Gtk.Style_Provider.Gtk_Style_Provider renames Implements_Gtk_Style_Provider.To_Interface; |
function "-"
( | Interf | : Gtk.Style_Provider.Gtk_Style_Provider) return Gtk_Settings renames Implements_Gtk_Style_Provider.To_Object; |
GtkSettings provide a mechanism to share global settings between applications.
On the X window system, this sharing is realized by an <ulink url="http://www.freedesktop.org/wiki/Specifications/xsettings-spec">XSettings</ulink> 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 Gkey.File.Gkey_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 with Gtk.Settings.Set_String_Property, Gtk.Settings.Set_Long_Property, etc. 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-menu-images", 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.