class_docstr: Custom sources allow reading data from otherwise unsupported sources.
  Requires libvips `>= 8.9.0`.
  
  To use, create a SourceCustom object, then provide callbacks to
  :meth:`on_read` and :meth:`on_seek`.
docstr: Attach a seek handler.
  
  The interface is the same as io.seek(), so the handler is passed
  parameters for offset and whence with the same meanings.
  
  However, the handler MUST return the new seek position. A simple way
  to do this is to call io.tell() and return that result.
  
  Seek handlers are optional. If you do not set one, your source will be
  treated as unseekable and libvips will do extra caching.
docstr_tok: ["Attach","a","seek","handler",".","The","interface","is","the","same","as","io.seek","(",")",",","so","the","handler","is","passed","parameters","for","offset","and","whence","with","the","same","meanings",".","However",",","the","handler","MUST","return","the","new","seek","position",".","A","simple","way","to","do","this","is","to","call","io.tell","(",")","and","return","that","result",".","Seek","handlers","are","optional",".","If","you","do","not","set","one",",","your","source","will","be","treated","as","unseekable","and","libvips","will","do","extra","caching","."]
code: def on_seek(self, handler):
      """Attach a seek handler.
  
      The interface is the same as io.seek(), so the handler is passed
      parameters for offset and whence with the same meanings.
  
      However, the handler MUST return the new seek position. A simple way
      to do this is to call io.tell() and return that result.
  
      Seek handlers are optional. If you do not set one, your source will be
      treated as unseekable and libvips will do extra caching.
  
      """
  
      self.signal_connect("seek", handler)
  
file_path: pyvips/pyvips/vsourcecustom.py
imports: from __future__ import division
  import logging
  import pyvips
  from pyvips import ffi, vips_lib
label_desc: Use image node_id 3 for calling the SourceCustom obj's underlying member method code with example usage: obj.on_seek(handler) without return types