<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
               "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<refentry id="binding">
  <refmeta>
    <refentrytitle>Writing bindings for libvips</refentrytitle>
    <manvolnum>3</manvolnum>
    <refmiscinfo>VIPS Library</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>Binding</refname>
    <refpurpose>How to write bindings for libvips</refpurpose>
  </refnamediv>

  <refsect1 id="binding-goi">
    <title>Binding and gobject-introspection</title>
    <para>
      Write this section once the vips8 Python binding is done. 
    </para>

    <para>
If you are writing a language binding, you won't need these. Instead, make
a new operation with vips_operation_new() (all it does is look up the
operation by name with vips_type_find(), then call g_object_new() for you),
then use vips_argument_map() and friends to loop over the operation's
arguments setting them. Once you have set all arguments, use
vips_cache_operation_build() to look up the operation in the cache and
either build or dup it. If something goes wrong, you'll need to use
vips_object_unref_outputs() and g_object_unref() to free the
partially-built object. 
    </para>
  </refsect1>

</refentry>