![]() |
![]() |
![]() |
GIMP Config Library Reference Manual | ![]() |
---|---|---|---|---|
enum GimpConfigPathType; GParamSpec* gimp_param_spec_config_path (const gchar *name, const gchar *nick, const gchar *blurb, GimpConfigPathType type, const gchar *default_value, GParamFlags flags); GimpConfigPathType gimp_param_spec_config_path_type (GParamSpec *pspec); gchar* gimp_config_path_expand (const gchar *path, gboolean recode, GError **error); gchar* gimp_config_build_data_path (const gchar *name); gchar* gimp_config_build_writable_path (const gchar *name); gchar* gimp_config_build_plug_in_path (const gchar *name); #define GIMP_VALUE_HOLDS_CONFIG_PATH (value)
typedef enum { GIMP_CONFIG_PATH_FILE, GIMP_CONFIG_PATH_FILE_LIST, GIMP_CONFIG_PATH_DIR, GIMP_CONFIG_PATH_DIR_LIST } GimpConfigPathType;
GParamSpec* gimp_param_spec_config_path (const gchar *name, const gchar *nick, const gchar *blurb, GimpConfigPathType type, const gchar *default_value, GParamFlags flags);
Creates a param spec to hold a filename, dir name,
or list of file or dir names.
See g_param_spec_internal()
for more information.
|
Canonical name of the param |
|
Nickname of the param |
|
Brief desciption of param. |
|
a GimpParamConfigPathType value. |
|
Value to use if none is assigned. |
|
a combination of GParamFlags |
Returns : |
a newly allocated GParamSpec instance |
Since GIMP 2.4
GimpConfigPathType gimp_param_spec_config_path_type (GParamSpec *pspec);
Tells whether the path param encodes a filename, dir name, or list of file or dir names.
|
A GParamSpec for a path param |
Returns : |
a GimpConfigPathType value |
Since GIMP 2.4
gchar* gimp_config_path_expand (const gchar *path, gboolean recode, GError **error);
Paths as stored in the gimprc have to be treated special. The string may contain special identifiers such as for example ${gimp_dir} that have to be substituted before use. Also the user's filesystem may be in a different encoding than UTF-8 (which is what is used for the gimprc). This function does the variable substitution for you and can also attempt to convert to the filesystem encoding.
|
a NUL -terminated string in UTF-8 encoding
|
|
whether to convert to the filesystem's encoding |
|
return location for errors |
Returns : |
a newly allocated NUL -terminated string
|
Since GIMP 2.4
gchar* gimp_config_build_data_path (const gchar *name);
Creates a search path as it is used in the gimprc file. The path
returned by gimp_config_build_data_path()
includes a directory
below the user's gimp directory and one in the system-wide data
directory.
Note that you cannot use this path directly with gimp_path_parse()
.
As it is in the gimprc notation, you first need to expand and
recode it using gimp_config_path_expand()
.
|
directory name (in UTF-8 encoding) |
Returns : |
a newly allocated string |
Since GIMP 2.4
gchar* gimp_config_build_writable_path (const gchar *name);
Creates a search path as it is used in the gimprc file. The path
returned by gimp_config_build_writable_path()
is just the writable
parts of the search path constructed by gimp_config_build_data_path()
.
Note that you cannot use this path directly with gimp_path_parse()
.
As it is in the gimprc notation, you first need to expand and
recode it using gimp_config_path_expand()
.
|
directory name (in UTF-8 encoding) |
Returns : |
a newly allocated string |
Since GIMP 2.4
gchar* gimp_config_build_plug_in_path (const gchar *name);
Creates a search path as it is used in the gimprc file. The path
returned by gimp_config_build_plug_in_path()
includes a directory
below the user's gimp directory and one in the system-wide plug-in
directory.
Note that you cannot use this path directly with gimp_path_parse()
.
As it is in the gimprc notation, you first need to expand and
recode it using gimp_config_path_expand()
.
|
directory name (in UTF-8 encoding) |
Returns : |
a newly allocated string |
Since GIMP 2.4