| Top |
| gchar * | gimp_any_to_utf8 () |
| const gchar * | gimp_filename_to_utf8 () |
| const gchar * | gimp_file_get_utf8_name () |
| gboolean | gimp_file_has_extension () |
| gboolean | gimp_file_show_in_file_manager () |
| gchar * | gimp_utf8_strtrim () |
| gchar * | gimp_escape_uline () |
| gchar * | gimp_strip_uline () |
| gchar * | gimp_canonicalize_identifier () |
| GimpEnumDesc * | gimp_enum_get_desc () |
| gboolean | gimp_enum_get_value () |
| const gchar * | gimp_enum_value_get_desc () |
| const gchar * | gimp_enum_value_get_help () |
| const gchar * | gimp_enum_value_get_abbrev () |
| GimpFlagsDesc * | gimp_flags_get_first_desc () |
| gboolean | gimp_flags_get_first_value () |
| const gchar * | gimp_flags_value_get_desc () |
| const gchar * | gimp_flags_value_get_help () |
| const gchar * | gimp_flags_value_get_abbrev () |
| gboolean | gimp_stack_trace_available () |
| gboolean | gimp_stack_trace_print () |
| void | gimp_stack_trace_query () |
gchar * gimp_any_to_utf8 (const gchar *str,gssize len,const gchar *warning_format,...);
This function takes any string (UTF-8 or not) and always returns a valid UTF-8 string.
If str
is valid UTF-8, a copy of the string is returned.
If UTF-8 validation fails, g_locale_to_utf8() is tried and if it
succeeds the resulting string is returned.
Otherwise, the portion of str
that is UTF-8, concatenated
with "(invalid UTF-8 string)" is returned. If not even the start
of str
is valid UTF-8, only "(invalid UTF-8 string)" is returned.
const gchar *
gimp_filename_to_utf8 (const gchar *filename);
Convert a filename in the filesystem's encoding to UTF-8
temporarily. The return value is a pointer to a string that is
guaranteed to be valid only during the current iteration of the
main loop or until the next call to gimp_filename_to_utf8().
The only purpose of this function is to provide an easy way to pass a filename in the filesystem encoding to a function that expects an UTF-8 encoded filename.
const gchar *
gimp_file_get_utf8_name (GFile *file);
This function works like gimp_filename_to_utf8() and returns
a UTF-8 encoded string that does not need to be freed.
It converts a GFile's path or uri to UTF-8 temporarily. The
return value is a pointer to a string that is guaranteed to be
valid only during the current iteration of the main loop or until
the next call to gimp_file_get_utf8_name().
The only purpose of this function is to provide an easy way to pass a GFile's name to a function that expects an UTF-8 encoded string.
A temporarily valid UTF-8 representation of file
's name.
This string must not be changed or freed.
Since: 2.10
gboolean gimp_file_has_extension (GFile *file,const gchar *extension);
This function checks if file
's URI ends with extension
. It behaves
like g_str_has_suffix() on g_file_get_uri(), except that the string
comparison is done case-insensitively using g_ascii_strcasecmp().
Since: 2.10
gboolean gimp_file_show_in_file_manager (GFile *file,GError **error);
Shows file
in the system file manager.
Since: 2.10
gchar * gimp_utf8_strtrim (const gchar *str,gint max_chars);
Creates a (possibly trimmed) copy of str
. The string is cut if it
exceeds max_chars
characters or on the first newline. The fact
that the string was trimmed is indicated by appending an ellipsis.
str |
an UTF-8 encoded string (or |
|
max_chars |
the maximum number of characters before the string get trimmed |
A (possibly trimmed) copy of str
which should be freed
using g_free() when it is not needed any longer.
gchar *
gimp_escape_uline (const gchar *str);
This function returns a copy of str
with all underline converted
to two adjacent underlines. This comes in handy when needing to display
strings with underlines (like filenames) in a place that would convert
them to mnemonics.
A (possibly escaped) copy of str
which should be
freed using g_free() when it is not needed any longer.
Since: 2.2