libvips/doc/reference/binding.xml

37 lines
1.2 KiB
XML
Raw Normal View History

<?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" [
]>
2014-07-26 12:19:46 +02:00
<refentry id="binding">
<refmeta>
2014-07-26 12:19:46 +02:00
<refentrytitle>Writing bindings for libvips</refentrytitle>
<manvolnum>3</manvolnum>
2014-07-26 12:19:46 +02:00
<refmiscinfo>VIPS Library</refmiscinfo>
</refmeta>
<refnamediv>
2014-07-26 12:19:46 +02:00
<refname>Binding</refname>
<refpurpose>How to write bindings for libvips</refpurpose>
</refnamediv>
2014-07-26 12:19:46 +02:00
<refsect1 id="binding-goi">
<title>Binding and gobject-introspection</title>
<para>
2014-08-08 18:34:30 +02:00
Write this section once the vips8 Python binding is done.
</para>
2014-08-12 14:37:16 +02:00
<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>