From 5c1676dfe6d2f3c837a5e074117b45613fd29a72 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:30:19 +0200 Subject: Adding upstream version 2.10.34. Signed-off-by: Daniel Baumann --- .../html/libgimpconfig-GimpConfigWriter.html | 763 +++++++++++++++++++++ 1 file changed, 763 insertions(+) create mode 100644 devel-docs/libgimpconfig/html/libgimpconfig-GimpConfigWriter.html (limited to 'devel-docs/libgimpconfig/html/libgimpconfig-GimpConfigWriter.html') diff --git a/devel-docs/libgimpconfig/html/libgimpconfig-GimpConfigWriter.html b/devel-docs/libgimpconfig/html/libgimpconfig-GimpConfigWriter.html new file mode 100644 index 0000000..c6b7e56 --- /dev/null +++ b/devel-docs/libgimpconfig/html/libgimpconfig-GimpConfigWriter.html @@ -0,0 +1,763 @@ + + + + +GimpConfigWriter: GIMP Config Library Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GimpConfigWriter

+

GimpConfigWriter — Functions for writing config info to a file for +libgimpconfig.

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+GimpConfigWriter * + +gimp_config_writer_new_file () +
+GimpConfigWriter * + +gimp_config_writer_new_gfile () +
+GimpConfigWriter * + +gimp_config_writer_new_stream () +
+GimpConfigWriter * + +gimp_config_writer_new_fd () +
+GimpConfigWriter * + +gimp_config_writer_new_string () +
+void + +gimp_config_writer_open () +
+void + +gimp_config_writer_comment_mode () +
+void + +gimp_config_writer_print () +
+void + +gimp_config_writer_printf () +
+void + +gimp_config_writer_identifier () +
+void + +gimp_config_writer_string () +
+void + +gimp_config_writer_data () +
+void + +gimp_config_writer_comment () +
+void + +gimp_config_writer_linefeed () +
+void + +gimp_config_writer_revert () +
+void + +gimp_config_writer_close () +
+gboolean + +gimp_config_writer_finish () +
+
+
+

Types and Values

+
++++ + + + + +
 GimpConfigWriter
+
+
+

Description

+

Functions for writing config info to a file for libgimpconfig.

+
+
+

Functions

+
+

gimp_config_writer_new_file ()

+
GimpConfigWriter *
+gimp_config_writer_new_file (const gchar *filename,
+                             gboolean atomic,
+                             const gchar *header,
+                             GError **error);
+

Creates a new GimpConfigWriter and sets it up to write to +filename +. If atomic + is TRUE, a temporary file is used to avoid +possible race conditions. The temporary file is then moved to +filename + when the writer is closed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

filename

a filename

 

atomic

if TRUE the file is written atomically

 

header

text to include as comment at the top of the file

 

error

return location for errors

 
+
+
+

Returns

+

a new GimpConfigWriter or NULL in case of an error

+
+

Since: 2.4

+
+
+
+

gimp_config_writer_new_gfile ()

+
GimpConfigWriter *
+gimp_config_writer_new_gfile (GFile *file,
+                              gboolean atomic,
+                              const gchar *header,
+                              GError **error);
+

Creates a new GimpConfigWriter and sets it up to write to +file +. If atomic + is TRUE, a temporary file is used to avoid +possible race conditions. The temporary file is then moved to file + +when the writer is closed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

file

a GFile

 

atomic

if TRUE the file is written atomically

 

header

text to include as comment at the top of the file

 

error

return location for errors

 
+
+
+

Returns

+

a new GimpConfigWriter or NULL in case of an error

+
+

Since: 2.10

+
+
+
+

gimp_config_writer_new_stream ()

+
GimpConfigWriter *
+gimp_config_writer_new_stream (GOutputStream *output,
+                               const gchar *header,
+                               GError **error);
+

Creates a new GimpConfigWriter and sets it up to write to +output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

output

a GOutputStream

 

header

text to include as comment at the top of the file

 

error

return location for errors

 
+
+
+

Returns

+

a new GimpConfigWriter or NULL in case of an error

+
+

Since: 2.10

+
+
+
+

gimp_config_writer_new_fd ()

+
GimpConfigWriter *
+gimp_config_writer_new_fd (gint fd);
+
+

Returns

+

a new GimpConfigWriter or NULL in case of an error

+
+

Since: 2.4

+
+
+
+

gimp_config_writer_new_string ()

+
GimpConfigWriter *
+gimp_config_writer_new_string (GString *string);
+
+

Returns

+

a new GimpConfigWriter or NULL in case of an error

+
+

Since: 2.4

+
+
+
+

gimp_config_writer_open ()

+
void
+gimp_config_writer_open (GimpConfigWriter *writer,
+                         const gchar *name);
+

This function writes the opening parenthesis followed by name +. +It also increases the indentation level and sets a mark that +can be used by gimp_config_writer_revert().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

name

name of the element to open

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_comment_mode ()

+
void
+gimp_config_writer_comment_mode (GimpConfigWriter *writer,
+                                 gboolean enable);
+

This function toggles whether the writer + should create commented +or uncommented output. This feature is used to generate the +system-wide installed gimprc that documents the default settings.

+

Since comments have to start at the beginning of a line, this +function will insert a newline if necessary.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

enable

TRUE to enable comment mode, FALSE to disable it

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_print ()

+
void
+gimp_config_writer_print (GimpConfigWriter *writer,
+                          const gchar *string,
+                          gint len);
+

Appends a space followed by string + to the writer +. Note that string +must not contain any special characters that might need to be escaped.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

string

a string to write

 

len

number of bytes from string +or -1 if string +is NUL-terminated.

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_printf ()

+
void
+gimp_config_writer_printf (GimpConfigWriter *writer,
+                           const gchar *format,
+                           ...);
+

A printf-like function for GimpConfigWriter.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

format

a format string as described for g_strdup_printf().

 

...

list of arguments according to format +

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_identifier ()

+
void
+gimp_config_writer_identifier (GimpConfigWriter *writer,
+                               const gchar *identifier);
+

Writes an identifier to writer +. The string + is *not* quoted and special +characters are *not* escaped.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

identifier

a NUL-terminated string

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_string ()

+
void
+gimp_config_writer_string (GimpConfigWriter *writer,
+                           const gchar *string);
+

Writes a string value to writer +. The string + is quoted and special +characters are escaped.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

string

a NUL-terminated string

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_data ()

+
void
+gimp_config_writer_data (GimpConfigWriter *writer,
+                         gint length,
+                         const guint8 *data);
+
+

Parameters

+
+++++ + + + + + +

writer

a GimpConfigWriter

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_comment ()

+
void
+gimp_config_writer_comment (GimpConfigWriter *writer,
+                            const gchar *comment);
+

Appends the comment + to str + and inserts linebreaks and hash-marks to +format it as a comment. Note that this function does not handle non-ASCII +characters.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

comment

the comment to write (ASCII only)

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_linefeed ()

+
void
+gimp_config_writer_linefeed (GimpConfigWriter *writer);
+
+
+
+

gimp_config_writer_revert ()

+
void
+gimp_config_writer_revert (GimpConfigWriter *writer);
+

Reverts all changes to writer + that were done since the last call +to gimp_config_writer_open(). This can only work if you didn't call +gimp_config_writer_close() yet.

+
+

Parameters

+
+++++ + + + + + +

writer

a GimpConfigWriter

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_close ()

+
void
+gimp_config_writer_close (GimpConfigWriter *writer);
+

Closes an element opened with gimp_config_writer_open().

+
+

Parameters

+
+++++ + + + + + +

writer

a GimpConfigWriter

 
+
+

Since: 2.4

+
+
+
+

gimp_config_writer_finish ()

+
gboolean
+gimp_config_writer_finish (GimpConfigWriter *writer,
+                           const gchar *footer,
+                           GError **error);
+

This function finishes the work of writer + and frees it afterwards. +It closes all open elements, appends an optional comment and +releases all resources allocated by writer +. You must not access +the writer + afterwards.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

writer

a GimpConfigWriter

 

footer

text to include as comment at the bottom of the file

 

error

return location for possible errors

 
+
+
+

Returns

+

TRUE if everything could be successfully written, +FALSE otherwise

+
+

Since: 2.4

+
+
+
+

Types and Values

+
+

GimpConfigWriter

+
typedef struct _GimpConfigWriter GimpConfigWriter;
+
+
+
+ + + \ No newline at end of file -- cgit v1.2.3