W Wrapl, The Programming Language

Libraries:Gtk:Gtk:Settings

Types

T

Inherits from:

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, settings can also be specified in RC files.

Applications can override system-wide settings with SetStringProperty, SetLongProperty, 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:

1
2
3
4
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 GetForScreen, but in many cases, it is more convenient to use Gtk.Gtk.Widget.GetSettings. GetDefault returns the GtkSettings instance for the default screen.



Constants

Nil : T

Functions

GetDefault() : Gtk.Gtk.Settings.T

Gets the T object for the default GDK screen, creating it if necessary. See GetForScreen.

Returns a T object. If there is no default screen, then returns NULL. [transfer none]


GetForScreen(screen @ Gtk.Gdk.Screen.T) : Gtk.Gtk.Settings.T

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

screen a Gtk.Gdk.Screen.T.
Returns a T object. [transfer none]


GetType() : Gtk.GObject.Type.T



InstallProperty(pspec @ Gtk.GObject.GParamSpec.T) : Std.Object.T



InstallPropertyParser(pspec @ Gtk.GObject.GParamSpec.T, parser @ Std.Function.T) : Std.Object.T



Methods

:SetDoubleProperty(self @ T, name @ Std.String.T, v_double @ Std.Real.T, origin @ Std.String.T) : Std.Object.T



:SetLongProperty(self @ T, name @ Std.String.T, v_long @ Std.Integer.SmallT, origin @ Std.String.T) : Std.Object.T



:SetPropertyValue(self @ T, name @ Std.String.T, svalue @ Gtk.Gtk.SettingsValue.T) : Std.Object.T



:SetStringProperty(self @ T, name @ Std.String.T, v_string @ Std.String.T, origin @ Std.String.T) : Std.Object.T