Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker Gtk.Settings

Class Gtk.Settings

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkSettings
Class : Settings
Implements: Gtk.StyleProvider
Extends: GObject.Object
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 and $XDG_CONFIG_HOME/gtk-3.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 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.
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gtk
Method
Gtk.icon_size_lookup_for_settings (Settings settings, gint32 size, Object out_values) : gboolean
Obtains the pixel size of a semantic icon size, possibly
modified by user preferences for a particular
GtkSettings.
Gtk
Method
Gtk.rc_find_pixmap_in_path (Settings settings, Scanner scanner, String pixmap_file) : String
Looks up a file in pixmap path for the specified GtkSettings.
Gtk
Method
Gtk.rc_get_style_by_paths (Settings settings, String widget_path, String class_path, Number type) : Gtk.Style
Creates up a GtkStyle from styles defined in a RC file by providing
the raw components used in matching.
Gtk
Method
Gtk.rc_reparse_all_for_settings (Settings settings, gboolean force_load) : gboolean
If the modification time on any previously read file
for the given GtkSettings has changed, discard all style information
and then reread all previously read RC files.
Gtk
Method
Gtk.rc_reset_styles (Settings settings) : none
This function recomputes the styles for all widgets that use a
particular GtkSettings object.
Gtk.Widget
Method
get_settings () : Gtk.Settings
Gets the settings object holding the settings used for this widget.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:13:52 GMT+0800 (HKT)