GValue
¶
This module defines the pyvips GValue
class. You can use instances of
this class to get and set GObject
properties.
- class pyvips.gvalue.GValue[source]¶
Wrap GValue in a Python class.
This class wraps
GValue
in a convenient interface. You can use instances of this class to get and setGObject
properties.On construction,
GValue
is all zero (empty). You can pass it to a get function to have it filled byGObject
, or use init to set a type, set to set a value, then use it to set an object property.GValue lifetime is managed automatically.
- static gtype_to_python(gtype)[source]¶
Map a gtype to the name of the Python type we use to represent it.
- static to_enum(gtype, value)[source]¶
Turn a string into an enum value ready to be passed into libvips.
- set_type(gtype)[source]¶
Set the type of a GValue.
GValues have a set type, fixed at creation time. Use set_type to set the type of a GValue before assigning to it.
GTypes are 32 or 64-bit integers (depending on the platform). See type_find.