Vips.SourceCustom¶
- Subclasses:
None
Methods¶
- Inherited:
Vips.Source (19), Vips.Connection (2), Vips.Object (27), GObject.Object (37)
- Structs:
class |
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
This signal is emitted to read bytes from the source into buffer. |
|
This signal is emitted to seek the source. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_object |
r |
Class Details¶
- class Vips.SourceCustom(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Subclass of [class`Source`] with action signals for handlers.
This is supposed to be useful for language bindings.
- classmethod new()¶
- Returns:
a new [class`SourceCustom`]
- Return type:
Create a [class`SourceCustom`]. Attach signals to implement read and seek.
- do_read(buffer, length) virtual¶
Signal Details¶
- Vips.SourceCustom.signals.read(source_custom, buffer, size)¶
- Signal Name:
read- Flags:
- Parameters:
source_custom (
Vips.SourceCustom) – The object which received the signalsize (
int) –gint64, size of buffer
- Returns:
the number of bytes read. Return 0 for EOF.
- Return type:
This signal is emitted to read bytes from the source into buffer.
- Vips.SourceCustom.signals.seek(source_custom, offset, whence)¶
- Signal Name:
seek- Flags:
- Parameters:
source_custom (
Vips.SourceCustom) – The object which received the signaloffset (
int) –gint64, seek offsetwhence (
int) –gint, seek origin
- Returns:
the new seek position.
- Return type:
This signal is emitted to seek the source. The handler should change the source position appropriately.
The handler for an unseekable source should always return -1.