GNOME UI Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
#include <libgnomeui/libgnomeui.h> GnomeThemeFile; void (*GnomeThemeFileSectionFunc) (GnomeThemeFile *df
,const char *name
,gpointer data
); enum GnomeThemeFileParseError; void (*GnomeThemeFileLineFunc) (GnomeThemeFile *df
,const char *key
,const char *locale
,const char *value
,gpointer data
); GnomeThemeFile * gnome_theme_file_new_from_string (char *data
,GError **error
); char * gnome_theme_file_to_string (GnomeThemeFile *df
); void gnome_theme_file_free (GnomeThemeFile *df
); void gnome_theme_file_foreach_section (GnomeThemeFile *df
,GnomeThemeFileSectionFunc func
,gpointer user_data
); void gnome_theme_file_foreach_key (GnomeThemeFile *df
,const char *section
,gboolean include_localized
,GnomeThemeFileLineFunc func
,gpointer user_data
); gboolean gnome_theme_file_get_raw (GnomeThemeFile *df
,const char *section
,const char *keyname
,const char *locale
,char **val
); gboolean gnome_theme_file_get_integer (GnomeThemeFile *df
,const char *section
,const char *keyname
,int *val
); gboolean gnome_theme_file_get_string (GnomeThemeFile *df
,const char *section
,const char *keyname
,char **val
); gboolean gnome_theme_file_get_locale_string (GnomeThemeFile *df
,const char *section
,const char *keyname
,char **val
); #define GNOME_THEME_FILE_PARSE_ERROR GQuark gnome_theme_file_parse_error_quark (void
);
Details
GnomeThemeFile
typedef struct _GnomeThemeFile GnomeThemeFile;
Warning
GnomeThemeFile
is deprecated and should not be used in newly-written code.
A GnomeThemeFile contains information about the number of sections, pointers to the sections and information about the current locale.
GnomeThemeFileSectionFunc ()
void (*GnomeThemeFileSectionFunc) (GnomeThemeFile *df
,const char *name
,gpointer data
);
Warning
GnomeThemeFileSectionFunc
is deprecated and should not be used in newly-written code.
enum GnomeThemeFileParseError
typedef enum { GNOME_THEME_FILE_PARSE_ERROR_INVALID_SYNTAX, GNOME_THEME_FILE_PARSE_ERROR_INVALID_ESCAPES, GNOME_THEME_FILE_PARSE_ERROR_INVALID_CHARS } GnomeThemeFileParseError;
Warning
GnomeThemeFileParseError
is deprecated and should not be used in newly-written code.
GnomeThemeFileLineFunc ()
void (*GnomeThemeFileLineFunc) (GnomeThemeFile *df
,const char *key
,const char *locale
,const char *value
,gpointer data
);
Warning
GnomeThemeFileLineFunc
is deprecated and should not be used in newly-written code.
gnome_theme_file_new_from_string ()
GnomeThemeFile * gnome_theme_file_new_from_string (char *data
,GError **error
);
Warning
gnome_theme_file_new_from_string
is deprecated and should not be used in newly-written code.
Creates a GnomeThemeFile from the data string passed.
|
the string used to create a GnomeThemeFile. |
|
location to store the error occuring, or NULL to ignore errors |
Returns : |
a GnomeThemeFile. |
Since 2.2
gnome_theme_file_to_string ()
char * gnome_theme_file_to_string (GnomeThemeFile *df
);
Warning
gnome_theme_file_to_string
is deprecated and should not be used in newly-written code.
This function retrieves the string representing the GnomeThemeFile.
|
A GnomeThemeFile |
Returns : |
a char *. |
Since 2.2
gnome_theme_file_free ()
void gnome_theme_file_free (GnomeThemeFile *df
);
Warning
gnome_theme_file_free
is deprecated and should not be used in newly-written code.
Frees the GnomeThemeFile structure.
|
a GnomeThemeFile. |
Since 2.2
gnome_theme_file_foreach_section ()
void gnome_theme_file_foreach_section (GnomeThemeFile *df
,GnomeThemeFileSectionFunc func
,gpointer user_data
);
Warning
gnome_theme_file_foreach_section
is deprecated and should not be used in newly-written code.
Calls func
for each section in the GnomeThemeFile with user_data
.
|
a GnomeThemeFile. |
|
a GnomeThemeFileSectionFunc |
|
a pointer to the user data. |
Since 2.2
gnome_theme_file_foreach_key ()
void gnome_theme_file_foreach_key (GnomeThemeFile *df
,const char *section
,gboolean include_localized
,GnomeThemeFileLineFunc func
,gpointer user_data
);
Warning
gnome_theme_file_foreach_key
is deprecated and should not be used in newly-written code.
Looks for the section section_name
. If found, this function calls func
for each line
in the section with fields of line and user_data
.
|
a GnomeThemeFile. |
|
name of the section |
|
a boolean value |
|
a GnomeThemeFileLineFunc. |
|
a pointer to user_data. |
Since 2.2
gnome_theme_file_get_raw ()
gboolean gnome_theme_file_get_raw (GnomeThemeFile *df
,const char *section
,const char *keyname
,const char *locale
,char **val
);
Warning
gnome_theme_file_get_raw
is deprecated and should not be used in newly-written code.
Searches section name and line in the GnomeThemeFile data structure.
If found, sets the val
to value field in GnomeThemeFileLine and returns a boolean value.
|
A GnomeThemeFile. |
|
the string representing the section name |
|
the string representing the key name. |
|
the string representing the locale. |
|
a char**. |
Returns : |
TRUE if section and line were found in the GnomeThemeFile, FALSE otherwise. |
Since 2.2
gnome_theme_file_get_integer ()
gboolean gnome_theme_file_get_integer (GnomeThemeFile *df
,const char *section
,const char *keyname
,int *val
);
Warning
gnome_theme_file_get_integer
is deprecated and should not be used in newly-written code.
This function calls gnome_theme_file_get_raw()
with the parameters. If gnome_theme_file_get_raw returns
TRUE
, then converts the value string filled in by the function to an integer and writes it in val
.
|
a GnomeThemeFile. |
|
the section name. |
|
the key name. |
|
an int*. |
Returns : |
TRUE if gnome_theme_file_get_raw returns TRUE , FALSE otherwise. |
Since 2.2
gnome_theme_file_get_string ()
gboolean gnome_theme_file_get_string (GnomeThemeFile *df
,const char *section
,const char *keyname
,char **val
);
Warning
gnome_theme_file_get_string
is deprecated and should not be used in newly-written code.
This function calls gnome_theme_file_get_raw()
with the parameters and returns the
boolean value.
|
A GnomeThemeFile. |
|
the section name. |
|
the key name. |
|
a char**. |
Returns : |
a gboolean value. |
Since 2.2
gnome_theme_file_get_locale_string ()
gboolean gnome_theme_file_get_locale_string (GnomeThemeFile *df
,const char *section
,const char *keyname
,char **val
);
Warning
gnome_theme_file_get_locale_string
is deprecated and should not be used in newly-written code.
Calculates the locale if the current_locale field of df
is NULL. Then calls gnome_theme_file_get_raw()
with the
parameters and returns the boolean value obtained.
|
A GnomeThemeFile |
|
the section name. |
|
the keyname. |
|
a char **. |
Returns : |
a gboolean value. |
Since 2.2
GNOME_THEME_FILE_PARSE_ERROR
#define GNOME_THEME_FILE_PARSE_ERROR gnome_theme_file_parse_error_quark()
Warning
GNOME_THEME_FILE_PARSE_ERROR
is deprecated and should not be used in newly-written code.