Gimp.Config¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gimp.Config¶
- copy(dest, flags)¶
- Parameters:
dest (
Gimp.Config) – anotherGObject.Objectof the same type as a.flags (
GObject.ParamFlags) – a mask ofGObject.ParamFlags
- Returns:
- Return type:
Compares all read- and write-able properties from self and dest that have all flags set. Differing values are then copied from self to dest. If flags is 0, all differing read/write properties.
Properties marked as “construct-only” are not touched.
Added in version 2.6.
- deserialize(scanner, nest_level, data)¶
- Parameters:
scanner (
GLib.Scanner) – theGLib.Scannerto use.nest_level (
int) – the nest level.
- Returns:
Whether serialization succeeded.
- Return type:
Deserialize the
Gimp.Configobject.Added in version 2.8.
- deserialize_file(file, data)¶
- Parameters:
- Raises:
- Returns:
Whether deserialization succeeded.
- Return type:
Opens the file specified by file, reads configuration data from it and configures self accordingly. Basically this function creates a properly configured [struct`GLib`.Scanner] for you and calls the deserialize function of the self's [iface`ConfigInterface`].
Added in version 2.10.
- deserialize_parasite(parasite, data)¶
- Parameters:
parasite (
Gimp.Parasite) – parasite containing a serialized config string
- Raises:
- Returns:
- Return type:
Configures self from parasite. Basically this function creates a properly configured
GLib.Scannerfor you and calls the deserialize function of the self'sGimp.ConfigInterface.Added in version 3.0.
- deserialize_properties(scanner, nest_level)¶
- Parameters:
scanner (
GLib.Scanner) – aGLib.Scanner.nest_level (
int) – the nest level
- Returns:
- Return type:
This function uses the scanner to configure the properties of self.
Added in version 2.4.
- deserialize_property(scanner, nest_level)¶
- Parameters:
scanner (
GLib.Scanner) – aGLib.Scanner.nest_level (
int) – the nest level
- Returns:
GLib.TokenType.RIGHT_PARENon success, otherwise the expectedGLib.TokenTypeorGLib.TokenType.NONEif the expected token was found but couldn’t be parsed.- Return type:
This function deserializes a single property of self. You shouldn’t need to call this function directly. If possible, use
Gimp.Config.deserialize_properties() instead.Added in version 2.4.
- deserialize_stream(input, data)¶
- Parameters:
input (
Gio.InputStream) – the input stream to read configuration from.data (
objectorNone) – user data passed to the deserialize implementation.
- Raises:
- Returns:
Whether deserialization succeeded.
- Return type:
Reads configuration data from input and configures self accordingly. Basically this function creates a properly configured
GLib.Scannerfor you and calls the deserialize function of the self'sGimp.ConfigInterface.Added in version 2.10.
- deserialize_string(text, data)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Configures self from text. Basically this function creates a properly configured
GLib.Scannerfor you and calls the deserialize function of the self'sGimp.ConfigInterface.Added in version 2.4.
- duplicate()¶
- Returns:
the duplicated
Gimp.Configobject- Return type:
Creates a copy of the passed object by copying all object properties. The default implementation of the
Gimp.ConfigInterfaceonly works for objects that are completely defined by their properties.Added in version 2.4.
- get_xcf_version()¶
- Returns:
the XCF version associated with the self.
- Return type:
Returns the current XCF version of the self.
Added in version 3.0.8.
- is_equal_to(b)¶
- Parameters:
b (
Gimp.Config) – anotherGObject.Objectof the same type as self.- Returns:
Trueif the two objects are equal.- Return type:
Compares the two objects. The default implementation of the
Gimp.ConfigInterfacecompares the object properties and thus only works for objects that are completely defined by their properties.Added in version 2.4.
- reset()¶
Resets the object to its default state. The default implementation of the
Gimp.ConfigInterfaceonly works for objects that are completely defined by their properties.Added in version 2.4.
- serialize(writer, data)¶
- Parameters:
writer (
Gimp.ConfigWriter) – theGimp.ConfigWriterto use.
- Returns:
Whether serialization succeeded.
- Return type:
Serialize the
Gimp.Configobject.Added in version 2.8.
- serialize_changed_properties(writer)¶
- Parameters:
writer (
Gimp.ConfigWriter) – aGimp.ConfigWriter.- Returns:
- Return type:
This function writes all object properties that have been changed from their default values to the writer.
Added in version 2.4.
- serialize_properties(writer)¶
- Parameters:
writer (
Gimp.ConfigWriter) – aGimp.ConfigWriter.- Returns:
- Return type:
This function writes all object properties to the writer.
Added in version 2.4.
- serialize_property(param_spec, writer)¶
- Parameters:
param_spec (
GObject.ParamSpec) – aGObject.ParamSpec.writer (
Gimp.ConfigWriter) – aGimp.ConfigWriter.
- Returns:
- Return type:
This function serializes a single object property to the writer.
Added in version 2.4.
- serialize_property_by_name(prop_name, writer)¶
- Parameters:
prop_name (
str) – the property’s name.writer (
Gimp.ConfigWriter) – aGimp.ConfigWriter.
- Returns:
- Return type:
This function serializes a single object property to the writer.
Added in version 2.6.
- serialize_to_fd(fd, data)¶
- Parameters:
- Returns:
- Return type:
Serializes the object properties of self to the given file descriptor.
Added in version 2.4.
- serialize_to_file(file, header, footer, data)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Serializes the object properties of self to the file specified by file. If a file with that name already exists, it is overwritten. Basically this function opens file for you and calls the serialize function of the self's [iface`ConfigInterface`].
Added in version 2.10.
- serialize_to_parasite(parasite_name, parasite_flags, data)¶
- Parameters:
- Returns:
the newly allocated parasite.
- Return type:
Serializes the object properties of self to a [struct`Parasite`].
Added in version 3.0.
- serialize_to_stream(output, header, footer, data)¶
- Parameters:
output (
Gio.OutputStream) – theGio.OutputStreamto write the configuration to.header (
strorNone) – optional file header (must be ASCII only)footer (
strorNone) – optional file footer (must be ASCII only)data (
objectorNone) – user data passed to the serialize implementation.
- Raises:
- Returns:
Whether serialization succeeded.
- Return type:
Serializes the object properties of self to the stream specified by output.
Added in version 2.10.
- serialize_to_string(data)¶
- Parameters:
data (
objectorNone) – user data passed to the serialize implementation.- Returns:
a newly allocated NUL-terminated string.
- Return type:
Serializes the object properties of self to a string.
Added in version 2.4.
- set_xcf_version(xcf_version)¶
- Parameters:
xcf_version (
int) – a mask ofGObject.ParamFlags
Sets the current XCF version of the self. This information can be used to adjust how properties are serialized depending on the version of the XCF that it is being saved to.
Added in version 3.0.8.