Top |
GParamSpec * | gimp_param_spec_config_path () |
GimpConfigPathType | gimp_param_spec_config_path_type () |
gchar * | gimp_config_path_expand () |
GList * | gimp_config_path_expand_to_files () |
gchar * | gimp_config_path_unexpand () |
GFile * | gimp_file_new_for_config_path () |
gchar * | gimp_file_get_config_path () |
gchar * | gimp_config_build_data_path () |
gchar * | gimp_config_build_writable_path () |
gchar * | gimp_config_build_plug_in_path () |
#define | GIMP_VALUE_HOLDS_CONFIG_PATH() |
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.
name |
Canonical name of the param |
|
nick |
Nickname of the param |
|
blurb |
Brief description of param. |
|
type |
a GimpConfigPathType value. |
|
default_value |
Value to use if none is assigned. |
|
flags |
a combination of GParamFlags |
Since: 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.
Since: 2.4
gchar * gimp_config_path_expand (const gchar *path
,gboolean recode
,GError **error
);
Paths as stored in gimprc and other config files 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.
To reverse the expansion, use gimp_config_path_unexpand()
.
path |
a NUL-terminated string in UTF-8 encoding |
|
recode |
whether to convert to the filesystem's encoding |
|
error |
return location for errors |
Since: 2.4
GList * gimp_config_path_expand_to_files (const gchar *path
,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 runs path
through gimp_config_path_expand()
and
gimp_path_parse()
, then turns the filenames returned by
gimp_path_parse()
into GFile using g_file_new_for_path()
.
Since: 2.10
gchar * gimp_config_path_unexpand (const gchar *path
,gboolean recode
,GError **error
);
The inverse operation of gimp_config_path_expand()
This function takes a path
and tries to substitute the first
elements by well-known special identifiers such as for example
${gimp_dir}. The unexpanded path can then be stored in gimprc and
other config files.
If recode
is TRUE
then path
is in local filesystem encoding,
if recode
is FALSE
then path
is assumed to be UTF-8.
path |
a NUL-terminated string |
|
recode |
whether |
|
error |
return location for errors |
Since: 2.10
GFile * gimp_file_new_for_config_path (const gchar *path
,GError **error
);
Expands path
using gimp_config_path_expand()
and returns a GFile
for the expanded path.
To reverse the expansion, use gimp_file_get_config_path()
.
Since: 2.10
gchar * gimp_file_get_config_path (GFile *file
,GError **error
);
Unexpands file
's path using gimp_config_path_unexpand()
and
returns the unexpanded path.
The inverse operation of gimp_file_new_for_config_path()
.
Since: 2.10
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()
.
Since: 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()
.
Since: 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()
.
Since: 2.4