Enumerations | Functions
gntstyle.h File Reference

Style API. More...

#include "gnt.h"
#include "gntwm.h"

Go to the source code of this file.

Enumerations

enum  GntStyle {
  GNT_STYLE_SHADOW = 0, GNT_STYLE_COLOR = 1, GNT_STYLE_MOUSE = 2, GNT_STYLE_WM = 3,
  GNT_STYLE_REMPOS = 4, GNT_STYLES
}
 

Functions

void gnt_style_read_configure_file (const char *filename)
 Read configuration from a file. More...
 
const char * gnt_style_get (GntStyle style)
 Get the user-setting for a style. More...
 
char * gnt_style_get_from_name (const char *group, const char *key)
 Get the value of a preference in ~/.gntrc. More...
 
char ** gnt_style_get_string_list (const char *group, const char *key, gsize *length)
 Get the value of a preference in ~/.gntrc. More...
 
int gnt_style_get_color (char *group, char *key)
 Get the value of a color pair in ~/.gntrc. More...
 
gboolean gnt_style_parse_bool (const char *value)
 Parse a boolean preference. More...
 
gboolean gnt_style_get_bool (GntStyle style, gboolean def)
 Get the boolean value for a user-setting. More...
 
void gnt_styles_get_keyremaps (GType type, GHashTable *hash)
 
void gnt_style_read_actions (GType type, GntBindableClass *klass)
 
gboolean gnt_style_read_menu_accels (const char *name, GHashTable *table)
 Read menu-accels from ~/.gntrc. More...
 
void gnt_style_read_workspaces (GntWM *wm)
 
void gnt_init_styles (void)
 Initialize style settings.
 
void gnt_uninit_styles (void)
 Uninitialize style settings.
 

Detailed Description

Style API.

Definition in file gntstyle.h.

Function Documentation

const char* gnt_style_get ( GntStyle  style)

Get the user-setting for a style.

Parameters
styleThe style.
Returns
The user-setting, or NULL.
gboolean gnt_style_get_bool ( GntStyle  style,
gboolean  def 
)

Get the boolean value for a user-setting.

Parameters
styleThe style.
defThe default value (i.e, the value if the user didn't define any value)
Returns
The value of the setting.
int gnt_style_get_color ( char *  group,
char *  key 
)

Get the value of a color pair in ~/.gntrc.

Parameters
groupThe name of the group in the keyfile. If NULL, the prgname will be used first, if available. Otherwise, "general" will be used.
keyThe key
Returns
The value of the color as an int, or 0 on error.
Since
2.4.0
char* gnt_style_get_from_name ( const char *  group,
const char *  key 
)

Get the value of a preference in ~/.gntrc.

Parameters
groupThe name of the group in the keyfile. If NULL, the prgname will be used first, if available. Otherwise, "general" will be used.
keyThe key
Returns
The value of the setting as a string, or NULL
Since
2.0.0 (gnt), 2.1.0 (pidgin)
char** gnt_style_get_string_list ( const char *  group,
const char *  key,
gsize *  length 
)

Get the value of a preference in ~/.gntrc.

Parameters
groupThe name of the group in the keyfile. If NULL, the prgname will be used first, if available. Otherwise, "general" will be used.
keyThe key
lengthReturn location for the number of strings returned, or NULL
Returns
NULL terminated string array. The array should be freed with g_strfreev().
Since
2.4.0
gboolean gnt_style_parse_bool ( const char *  value)

Parse a boolean preference.

For example, if 'value' is "false" (ignoring case) or "0", the return value will be FALSE, otherwise TRUE.

Parameters
valueThe value of the boolean setting as a string
Returns
The boolean value
Since
2.0.0 (gnt), 2.1.0 (pidgin)
void gnt_style_read_configure_file ( const char *  filename)

Read configuration from a file.

Parameters
filenameThe filename to read configuration from.
gboolean gnt_style_read_menu_accels ( const char *  name,
GHashTable *  table 
)

Read menu-accels from ~/.gntrc.

Parameters
nameThe name of the window.
tableThe hastable to store the accel information.
Returns
TRUE if some accels were read, FALSE otherwise.