Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

prefs.h File Reference

Prefs API. More...

#include <glib.h>

Include dependency graph for prefs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Prefs API

void gaim_prefs_init ()
 Initialize core prefs.

void gaim_prefs_uninit (void)
 Uninitializes the prefs subsystem.

void gaim_prefs_add_none (const char *name)
 Add a new typeless pref.

void gaim_prefs_add_bool (const char *name, gboolean value)
 Add a new boolean pref.

void gaim_prefs_add_int (const char *name, int value)
 Add a new integer pref.

void gaim_prefs_add_string (const char *name, const char *value)
 Add a new string pref.

void gaim_prefs_add_string_list (const char *name, GList *value)
 Add a new string list pref.

void gaim_prefs_remove (const char *name)
 Remove a pref.

void gaim_prefs_rename (const char *oldname, const char *newname)
 Rename a pref.

void gaim_prefs_rename_boolean_toggle (const char *oldname, const char *newname)
 Rename a boolean pref, toggling it's value.

void gaim_prefs_destroy ()
 Remove all prefs.

void gaim_prefs_set_generic (const char *name, gpointer value)
 Set raw pref value.

void gaim_prefs_set_bool (const char *name, gboolean value)
 Set boolean pref value.

void gaim_prefs_set_int (const char *name, int value)
 Set integer pref value.

void gaim_prefs_set_string (const char *name, const char *value)
 Set string pref value.

void gaim_prefs_set_string_list (const char *name, GList *value)
 Set string pref value.

GaimPrefType gaim_prefs_get_type (const char *name)
 Get pref type.

gboolean gaim_prefs_get_bool (const char *name)
 Get boolean pref value.

int gaim_prefs_get_int (const char *name)
 Get integer pref value.

const char * gaim_prefs_get_string (const char *name)
 Get string pref value.

GList * gaim_prefs_get_string_list (const char *name)
 Get string pref value.

guint gaim_prefs_connect_callback (const char *name, GaimPrefCallback cb, gpointer data)
 Add a callback to a pref (and its children).

void gaim_prefs_disconnect_callback (guint callback_id)
 Remove a callback to a pref.

void gaim_prefs_trigger_callback (const char *name)
 Trigger callbacks as if the pref changed.

gboolean gaim_prefs_load ()
 Read preferences.

void gaim_prefs_sync ()
 Force an immediate write of preferences.


Typedefs

typedef enum _GaimPrefType GaimPrefType
 Pref data types.

typedef void(* GaimPrefCallback )(const char *name, GaimPrefType type, gpointer val, gpointer data)
 Pref change callback type.


Enumerations

enum  _GaimPrefType {
  GAIM_PREF_NONE, GAIM_PREF_BOOLEAN, GAIM_PREF_INT, GAIM_PREF_STRING,
  GAIM_PREF_STRING_LIST
}
 Pref data types.


Detailed Description

Prefs API.

gaim

Gaim is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Function Documentation

void gaim_prefs_add_bool const char *  name,
gboolean  value
 

Add a new boolean pref.

Parameters:
name The name of the pref
value The initial value to set

void gaim_prefs_add_int const char *  name,
int  value
 

Add a new integer pref.

Parameters:
name The name of the pref
value The initial value to set

void gaim_prefs_add_none const char *  name  ) 
 

Add a new typeless pref.

Parameters:
name The name of the pref

void gaim_prefs_add_string const char *  name,
const char *  value
 

Add a new string pref.

Parameters:
name The name of the pref
value The initial value to set

void gaim_prefs_add_string_list const char *  name,
GList *  value
 

Add a new string list pref.

Parameters:
name The name of the pref
value The initial value to set

gboolean gaim_prefs_get_bool const char *  name  ) 
 

Get boolean pref value.

Parameters:
name The name of the pref
Returns:
The value of the pref

int gaim_prefs_get_int const char *  name  ) 
 

Get integer pref value.

Parameters:
name The name of the pref
Returns:
The value of the pref

const char* gaim_prefs_get_string const char *  name  ) 
 

Get string pref value.

Parameters:
name The name of the pref
Returns:
The value of the pref

GList* gaim_prefs_get_string_list const char *  name  ) 
 

Get string pref value.

Parameters:
name The name of the pref
Returns:
The value of the pref

GaimPrefType gaim_prefs_get_type const char *  name  ) 
 

Get pref type.

Parameters:
name The name of the pref
Returns:
The type of the pref

void gaim_prefs_remove const char *  name  ) 
 

Remove a pref.

Parameters:
name The name of the pref

void gaim_prefs_rename const char *  oldname,
const char *  newname
 

Rename a pref.

Parameters:
oldname The old name of the pref
newname The new name for the pref

void gaim_prefs_rename_boolean_toggle const char *  oldname,
const char *  newname
 

Rename a boolean pref, toggling it's value.

Parameters:
oldname The old name of the pref
newname The new name for the pref

void gaim_prefs_set_bool const char *  name,
gboolean  value
 

Set boolean pref value.

Parameters:
name The name of the pref
value The value to set

void gaim_prefs_set_generic const char *  name,
gpointer  value
 

Set raw pref value.

Parameters:
name The name of the pref
value The value to set

void gaim_prefs_set_int const char *  name,
int  value
 

Set integer pref value.

Parameters:
name The name of the pref
value The value to set

void gaim_prefs_set_string const char *  name,
const char *  value
 

Set string pref value.

Parameters:
name The name of the pref
value The value to set

void gaim_prefs_set_string_list const char *  name,
GList *  value
 

Set string pref value.

Parameters:
name The name of the pref
value The value to set


Generated on Sun Aug 29 03:45:13 2004 for gaim by doxygen 1.3.4