GTK+ Reference Manual
<<< PrevHomeUpNext >>>

GtkSettings

GtkSettings —

Synopsis


#include <gtk/gtk.h>


struct      GtkSettings;
struct      GtkSettingsValue;
GtkSettings* gtk_settings_get_default       (void);
GtkSettings* gtk_settings_get_for_screen    (GdkScreen *screen);
void        gtk_settings_install_property   (GParamSpec *pspec);
void        gtk_settings_install_property_parser
                                            (GParamSpec *pspec,
                                             GtkRcPropertyParser parser);
gboolean    gtk_rc_property_parse_color     (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);
gboolean    gtk_rc_property_parse_enum      (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);
gboolean    gtk_rc_property_parse_flags     (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);
gboolean    gtk_rc_property_parse_requisition
                                            (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);
gboolean    gtk_rc_property_parse_border    (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);
void        gtk_settings_set_property_value (GtkSettings *settings,
                                             const gchar *name,
                                             const GtkSettingsValue *svalue);
void        gtk_settings_set_string_property
                                            (GtkSettings *settings,
                                             const gchar *name,
                                             const gchar *v_string,
                                             const gchar *origin);
void        gtk_settings_set_long_property  (GtkSettings *settings,
                                             const gchar *name,
                                             glong v_long,
                                             const gchar *origin);
void        gtk_settings_set_double_property
                                            (GtkSettings *settings,
                                             const gchar *name,
                                             gdouble v_double,
                                             const gchar *origin);


Object Hierarchy


  GObject
   +----GtkSettings

Properties


  "gtk-double-click-time" gint                 : Read / Write
  "gtk-cursor-blink"     gboolean             : Read / Write
  "gtk-cursor-blink-time" gint                 : Read / Write
  "gtk-split-cursor"     gboolean             : Read / Write
  "gtk-theme-name"       gchararray           : Read / Write
  "gtk-key-theme-name"   gchararray           : Read / Write
  "gtk-menu-bar-accel"   gchararray           : Read / Write
  "gtk-dnd-drag-threshold" gint                 : Read / Write
  "gtk-font-name"        gchararray           : Read / Write
  "gtk-icon-sizes"       gchararray           : Read / Write
  "gtk-color-palette"    gchararray           : Read / Write
  "gtk-entry-select-on-focus" gboolean             : Read / Write
  "gtk-can-change-accels" gboolean             : Read / Write
  "gtk-toolbar-style"    GtkToolbarStyle      : Read / Write
  "gtk-toolbar-icon-size" GtkIconSize          : Read / Write

Description

Details

struct GtkSettings

struct GtkSettings;


struct GtkSettingsValue

struct GtkSettingsValue
{
  /* origin should be something like "filename:linenumber" for rc files,
   * or e.g. "XProperty" for other sources
   */
  gchar *origin;

  /* valid types are LONG, DOUBLE and STRING corresponding to the token parsed,
   * or a GSTRING holding an unparsed statement
   */
  GValue value;
};


gtk_settings_get_default ()

GtkSettings* gtk_settings_get_default       (void);

Gets the GtkSettings object for the default GDK screen, creating it if necessary. See gtk_settings_get_for_screen().

Returns :

a GtkSettings object. If there is no default screen, then returns NULL.


gtk_settings_get_for_screen ()

GtkSettings* gtk_settings_get_for_screen    (GdkScreen *screen);

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

screen :

a GdkScreen.

Returns :

a GtkSettings object.


gtk_settings_install_property ()

void        gtk_settings_install_property   (GParamSpec *pspec);

pspec :


gtk_settings_install_property_parser ()

void        gtk_settings_install_property_parser
                                            (GParamSpec *pspec,
                                             GtkRcPropertyParser parser);

pspec :

parser :


gtk_rc_property_parse_color ()

gboolean    gtk_rc_property_parse_color     (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);

pspec :

gstring :

property_value :

Returns :


gtk_rc_property_parse_enum ()

gboolean    gtk_rc_property_parse_enum      (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);

pspec :

gstring :

property_value :

Returns :


gtk_rc_property_parse_flags ()

gboolean    gtk_rc_property_parse_flags     (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);

pspec :

gstring :

property_value :

Returns :


gtk_rc_property_parse_requisition ()

gboolean    gtk_rc_property_parse_requisition
                                            (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);

pspec :

gstring :

property_value :

Returns :


gtk_rc_property_parse_border ()

gboolean    gtk_rc_property_parse_border    (const GParamSpec *pspec,
                                             const GString *gstring,
                                             GValue *property_value);

pspec :

gstring :

property_value :

Returns :


gtk_settings_set_property_value ()

void        gtk_settings_set_property_value (GtkSettings *settings,
                                             const gchar *name,
                                             const GtkSettingsValue *svalue);

settings :

name :

svalue :


gtk_settings_set_string_property ()

void        gtk_settings_set_string_property
                                            (GtkSettings *settings,
                                             const gchar *name,
                                             const gchar *v_string,
                                             const gchar *origin);

settings :

name :

v_string :

origin :


gtk_settings_set_long_property ()

void        gtk_settings_set_long_property  (GtkSettings *settings,
                                             const gchar *name,
                                             glong v_long,
                                             const gchar *origin);

settings :

name :

v_long :

origin :


gtk_settings_set_double_property ()

void        gtk_settings_set_double_property
                                            (GtkSettings *settings,
                                             const gchar *name,
                                             gdouble v_double,
                                             const gchar *origin);

settings :

name :

v_double :

origin :

Properties

"gtk-double-click-time" (gint : Read / Write)

Maximum time allowed between two clicks for them to be considered a double click (in milliseconds).

"gtk-cursor-blink" (gboolean : Read / Write)

Whether the cursor should blink.

"gtk-cursor-blink-time" (gint : Read / Write)

Length of the cursor blink cycle, in milleseconds.

"gtk-split-cursor" (gboolean : Read / Write)

Whether two cursors should be displayed for mixed left-to-right and right-to-left text.

"gtk-theme-name" (gchararray : Read / Write)

Name of theme RC file to load.

"gtk-key-theme-name" (gchararray : Read / Write)

Name of key theme RC file to load.

"gtk-menu-bar-accel" (gchararray : Read / Write)

Keybinding to activate the menu bar.

"gtk-dnd-drag-threshold" (gint : Read / Write)

Number of pixels the cursor can move before dragging.

"gtk-font-name" (gchararray : Read / Write)

Name of default font to use.

"gtk-icon-sizes" (gchararray : Read / Write)

List of icon sizes (gtk-menu=16,16;gtk-button=20,20...

"gtk-color-palette" (gchararray : Read / Write)

Palette to use in the color selector.

"gtk-entry-select-on-focus" (gboolean : Read / Write)

Whether to select the contents of an entry when it is focused.

"gtk-can-change-accels" (gboolean : Read / Write)

Whether menu accelerators can be changed by pressing a key over the menu item.

"gtk-toolbar-style" (GtkToolbarStyle : Read / Write)

Whether default toolbars have text only, text and icons, icons only, etc.

"gtk-toolbar-icon-size" (GtkIconSize : Read / Write)

Size of icons in default toolbars.

<<< PrevHomeUpNext >>>
Resource FilesBindings