Vips.TargetCustom¶
- Subclasses:
None
Methods¶
- Inherited:
Vips.Target (13), 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 at the end of write. |
|
Deprecated for [signal`TargetCustom`:py:func:::end<Vips.TargetCustom.signals.end>]. |
|
This signal is emitted to read bytes from the target into buffer. |
|
This signal is emitted to seek the target. |
|
This signal is emitted to write bytes to the target. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_object |
r |
Class Details¶
- class Vips.TargetCustom(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Subclass of [class`Target`] with action signals for handlers.
This is supposed to be useful for language bindings.
- classmethod new()¶
- Returns:
a new [class`TargetCustom`]
- Return type:
Create a [class`TargetCustom`]. Attach signals to implement write and finish.
- do_finish() virtual¶
- do_read(buffer, length) virtual¶
Signal Details¶
- Vips.TargetCustom.signals.end(target_custom)¶
- Signal Name:
end- Flags:
- Parameters:
target_custom (
Vips.TargetCustom) – The object which received the signal- Returns:
0 on success, -1 on error.
- Return type:
This signal is emitted at the end of write. The target should do any finishing necessary.
- Vips.TargetCustom.signals.finish(target_custom)¶
- Signal Name:
finish- Flags:
- Parameters:
target_custom (
Vips.TargetCustom) – The object which received the signal
Deprecated for [signal`TargetCustom`:py:func:::end<Vips.TargetCustom.signals.end>].
- Vips.TargetCustom.signals.read(target_custom, buffer, size)¶
- Signal Name:
read- Flags:
- Parameters:
target_custom (
Vips.TargetCustom) – 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 target into buffer.
The handler for an unreadable target should always return -1.
- Vips.TargetCustom.signals.seek(target_custom, offset, whence)¶
- Signal Name:
seek- Flags:
- Parameters:
target_custom (
Vips.TargetCustom) – 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 target. The handler should change the target position appropriately.
The handler for an unseekable target should always return -1.
- Vips.TargetCustom.signals.write(target_custom, data, length)¶
- Signal Name:
write- Flags:
- Parameters:
target_custom (
Vips.TargetCustom) – The object which received the signallength (
int) –gint64, number of bytes
- Returns:
the number of bytes written.
- Return type:
This signal is emitted to write bytes to the target.