![]() | ![]() | ![]() | GIMP Base Library Reference Manual | ![]() |
---|
gimpenv — Functions to access the GIMP environment.
constgchar * gimp_directory (void);gchar * gimp_personal_rc_file (constgchar *basename); constgchar * gimp_data_directory (void); constgchar * gimp_locale_directory (void); constgchar * gimp_plug_in_directory (void); constgchar * gimp_sysconf_directory (void); constgchar * gimp_gtkrc (void);GList * gimp_path_parse (constgchar *path,gint max_paths,gboolean check,GList **check_failed);gchar * gimp_path_to_str (GList *path); void gimp_path_free (GList *path);gchar * gimp_path_get_user_writable_dir (GList *path);
A set of functions to find the locations of GIMP's data directories and configuration files.
constgchar * gimp_directory (void);
Returns the user-specific GIMP settings directory. If the environment variable GIMP_DIRECTORY exists, it is used. If it is an absolute path, it is used as is. If it is a relative path, it is taken to be a subdirectory of the home directory. If it is a relative path, and no home directory can be determined, it is taken to be a subdirectory of gimp_data_directory().
The usual case is that no GIMP_DIRECTORY environment variable exists, and then we use the GIMPDIR subdirectory of the home directory. If no home directory exists, we use a per-user subdirectory of gimp_data_directory(). In any case, we always return some non-empty string, whether it corresponds to an existing directory or not.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The user-specific GIMP settings directory. |
gchar * gimp_personal_rc_file (constgchar *basename);
Returns the name of a file in the user-specific GIMP settings directory.
The returned string is allocated dynamically and *SHOULD* be freed
with
basename : | The basename of a rc_file. |
Returns : | The name of a file in the user-specific GIMP settings directory. |
constgchar * gimp_data_directory (void);
Returns the top directory for GIMP data. If the environment variable GIMP_DATADIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The top directory for GIMP data. |
constgchar * gimp_locale_directory (void);
Returns the top directory for GIMP locale files. If the environment variable GIMP_LOCALEDIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The top directory for GIMP locale files. |
constgchar * gimp_plug_in_directory (void);
Returns the top directory for GIMP plug_ins and modules. If the environment variable GIMP_PLUGINDIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The top directory for GIMP plug_ins and modules. |
constgchar * gimp_sysconf_directory (void);
Returns the top directory for GIMP config files. If the environment variable GIMP_SYSCONFDIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The top directory for GIMP config files. |
constgchar * gimp_gtkrc (void);
Returns the name of the GIMP's application-specific gtkrc file.
The returned string is allocated just once, and should *NOT* be
freed with
Returns : | The name of the GIMP's application-specific gtkrc file. |
GList * gimp_path_parse (constgchar *path,gint max_paths,gboolean check,GList **check_failed);
path : | A list of directories separated by |
max_paths : | The maximum number of directories to return. |
check : | TRUE if you want the directories to be checked. |
check_failed : | Returns a |
Returns : | A |
gchar * gimp_path_to_str (GList *path);
path : | A list of directories as returned by gimp_path_parse(). |
Returns : | A searchpath string separated by |
void gimp_path_free (GList *path);
This function frees the memory allocated for the list and it's strings.
path : | A list of directories as returned by gimp_path_parse(). |
gchar * gimp_path_get_user_writable_dir (GList *path);
Note that you have to
path : | A list of directories as returned by gimp_path_parse(). |
Returns : | The first directory in path where the user has write permission. |
<< gimpdatafiles | gimpparasite >> |