Gimp.Config¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gimp.Config¶
- copy(dest, flags)¶
- Parameters:
dest (
Gimp.Config
) – anotherGObject.Object
of 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.
New in version 2.6.
- deserialize(scanner, nest_level, data)¶
- Parameters:
scanner (
GLib.Scanner
) – theGLib.Scanner
to use.nest_level (
int
) – the nest level.
- Returns:
Whether serialization succeeded.
- Return type:
Deserialize the
Gimp.Config
object.New 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`].
New 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.Scanner
for you and calls the deserialize function of the self'sGimp.ConfigInterface
.New 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.
New 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_PAREN
on success, otherwise the expectedGLib.TokenType
orGLib.TokenType.NONE
if 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.New in version 2.4.
- deserialize_stream(input, data)¶
- Parameters:
input (
Gio.InputStream
) – the input stream to read configuration from.data (
object
orNone
) – 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.Scanner
for you and calls the deserialize function of the self'sGimp.ConfigInterface
.New 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.Scanner
for you and calls the deserialize function of the self'sGimp.ConfigInterface
.New in version 2.4.
- duplicate()¶
- Returns:
the duplicated
Gimp.Config
object- Return type:
Creates a copy of the passed object by copying all object properties. The default implementation of the
Gimp.ConfigInterface
only works for objects that are completely defined by their properties.New in version 2.4.
- is_equal_to(b)¶
- Parameters:
b (
Gimp.Config
) – anotherGObject.Object
of the same type as self.- Returns:
True
if the two objects are equal.- Return type:
Compares the two objects. The default implementation of the
Gimp.ConfigInterface
compares the object properties and thus only works for objects that are completely defined by their properties.New in version 2.4.
- reset()¶
Resets the object to its default state. The default implementation of the
Gimp.ConfigInterface
only works for objects that are completely defined by their properties.New in version 2.4.
- serialize(writer, data)¶
- Parameters:
writer (
Gimp.ConfigWriter
) – theGimp.ConfigWriter
to use.
- Returns:
Whether serialization succeeded.
- Return type:
Serialize the
Gimp.Config
object.New 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.
New 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.
New 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.
New 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.
New in version 2.6.
- serialize_to_fd(fd, data)¶
- Parameters:
- Returns:
- Return type:
Serializes the object properties of self to the given file descriptor.
New 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`].
New 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`].
New in version 3.0.
- serialize_to_stream(output, header, footer, data)¶
- Parameters:
output (
Gio.OutputStream
) – theGio.OutputStream
to write the configuration to.header (
str
orNone
) – optional file header (must be ASCII only)footer (
str
orNone
) – optional file footer (must be ASCII only)data (
object
orNone
) – 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.
New in version 2.10.