fix gtkdoc expansions in intro
This commit is contained in:
parent
008d6d7a78
commit
703514b85d
9
TODO
9
TODO
@ -1,12 +1,3 @@
|
|||||||
- try:
|
|
||||||
|
|
||||||
$ cd vips-x.x.x/libvips
|
|
||||||
$ g-ir-doc-tool --language=Python -o /tmp/vips-doc Vips-8.0.gir
|
|
||||||
$ yelp /tmp/vips-doc
|
|
||||||
|
|
||||||
shows gir contents
|
|
||||||
|
|
||||||
- why don't we get gtk-doc expansions in the leading chapters? we turn them on
|
|
||||||
|
|
||||||
- test other cpp arg types
|
- test other cpp arg types
|
||||||
|
|
||||||
|
@ -53,14 +53,14 @@ typedef struct _NegativeClass {
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
GObject has a handy macro to write some of the boilerplate for you.
|
%GObject has a handy macro to write some of the boilerplate for you.
|
||||||
|
|
||||||
<programlisting language="C">
|
<programlisting language="C">
|
||||||
G_DEFINE_TYPE( Negative, negative, VIPS_TYPE_OPERATION );
|
G_DEFINE_TYPE( Negative, negative, VIPS_TYPE_OPERATION );
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
This defines a function called negative_get_type(),
|
This defines a function called negative_get_type(),
|
||||||
which registers this new class and returns its #GType (a
|
which registers this new class and returns its %GType (a
|
||||||
pointer-sized integer). negative_get_type() in turn needs two
|
pointer-sized integer). negative_get_type() in turn needs two
|
||||||
functions, negative_init(), to initialise a new instance, and
|
functions, negative_init(), to initialise a new instance, and
|
||||||
negative_class_init(), to initialise a new class.
|
negative_class_init(), to initialise a new class.
|
||||||
@ -149,7 +149,7 @@ negative_class_init( NegativeClass *class )
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The build function is the thing VipsObject calls after supplying
|
The build function is the thing #VipsObject calls after supplying
|
||||||
arguments. It checks that all required arguments have been set and are
|
arguments. It checks that all required arguments have been set and are
|
||||||
valid and constructs the object. After build, the object is expected
|
valid and constructs the object. After build, the object is expected
|
||||||
to be ready for use.
|
to be ready for use.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!-- vim: set ts=2 sw=2 expandtab: -->
|
||||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||||
[
|
[
|
||||||
@ -17,24 +18,24 @@
|
|||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>VIPS Overview</title>
|
<title>VIPS Overview</title>
|
||||||
<para>
|
<para>
|
||||||
VIPS is a free image processing system. It is good with large
|
VIPS is a free image processing system. It is good with large
|
||||||
images (images larger than the amount of RAM you have available), with
|
images (images larger than the amount of RAM you have available), with
|
||||||
many CPUs (speed scales linearly to at least 32 threads), for working
|
many CPUs (speed scales linearly to at least 32 threads), for working
|
||||||
with colour, for scientific analysis and for general research
|
with colour, for scientific analysis and for general research
|
||||||
and development. As well as JPEG, TIFF and PNG images, it also
|
and development. As well as JPEG, TIFF and PNG images, it also
|
||||||
supports scientific formats like FITS, Matlab, Analyze, PFM,
|
supports scientific formats like FITS, Matlab, Analyze, PFM,
|
||||||
Radiance and OpenSlide. It works on many UNIX-like platforms,
|
Radiance and OpenSlide. It works on many UNIX-like platforms,
|
||||||
as well as Windows and OS X. VIPS is released under the GNU Library
|
as well as Windows and OS X. VIPS is released under the GNU Library
|
||||||
General Public License (GNU LGPL).
|
General Public License (GNU LGPL).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<xi:include href="using-command-line.xml"/>
|
<xi:include href="xml/using-command-line.xml"/>
|
||||||
<xi:include href="using-C.xml"/>
|
<xi:include href="xml/using-C.xml"/>
|
||||||
<xi:include href="using-python.xml"/>
|
<xi:include href="xml/using-python.xml"/>
|
||||||
<xi:include href="using-cpp.xml"/>
|
<xi:include href="xml/using-cpp.xml"/>
|
||||||
<xi:include href="binding.xml"/>
|
<xi:include href="xml/binding.xml"/>
|
||||||
<xi:include href="extending.xml"/>
|
<xi:include href="xml/extending.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!-- vim: set ts=2 sw=2 expandtab: -->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||||
]>
|
]>
|
||||||
<!-- vim: set ts=2 sw=2 expandtab: -->
|
|
||||||
<refentry id="using-from-c">
|
<refentry id="using-from-c">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>VIPS from C</refentrytitle>
|
<refentrytitle>VIPS from C</refentrytitle>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
When your program starts, use <code>VIPS_INIT()</code>
|
When your program starts, use <code>VIPS_INIT()</code>
|
||||||
to start up the VIPS library. You should pass it the name
|
to start up the VIPS library. You should pass it the name
|
||||||
of your program, usually <code>argv[0]</code>. Use
|
of your program, usually <code>argv[0]</code>. Use
|
||||||
<code>vips_shutdown()</code> when you exit.
|
vips_shutdown() when you exit.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -37,12 +37,10 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The basic data object is the <link
|
The basic data object is the #VipsImage. You can create an
|
||||||
linkend="VipsImage">VipsImage</link>.
|
image from a file on disc or from an area of memory, either
|
||||||
You can create an image from a file on disc or from an
|
as a C-style array, or as a formatted object, like JPEG. See
|
||||||
area of memory, either as a C-style array, or as a formatted object,
|
vips_image_new_from_file() and friends. Loading an
|
||||||
like JPEG. See <function>vips_image_new_from_file()</function> and
|
|
||||||
friends. Loading an
|
|
||||||
image is fast. VIPS read just enough of the image to be able to get
|
image is fast. VIPS read just enough of the image to be able to get
|
||||||
the various properties, such as width in pixels. It delays reading
|
the various properties, such as width in pixels. It delays reading
|
||||||
any pixels until they are really needed.
|
any pixels until they are really needed.
|
||||||
@ -51,14 +49,14 @@
|
|||||||
<para>
|
<para>
|
||||||
Once you have an image, you can get properties from it in the usual way.
|
Once you have an image, you can get properties from it in the usual way.
|
||||||
You can use projection functions, like vips_image_get_width() or
|
You can use projection functions, like vips_image_get_width() or
|
||||||
g_object_get(), to get GObject properties. All VIPS objects are
|
g_object_get(), to get %GObject properties. All VIPS objects are
|
||||||
immutable, meaning you can only get properties, you can't set them.
|
immutable, meaning you can only get properties, you can't set them.
|
||||||
See <link linkend="libvips-header">VIPS Header</link> to read about
|
See <link linkend="libvips-header">VIPS Header</link> to read about
|
||||||
image properties.
|
image properties.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
VIPS is based on the GObject library and is therefore refcounted.
|
VIPS is based on the %GObject library and is therefore refcounted.
|
||||||
vips_image_new_from_file() returns an object with a count of 1.
|
vips_image_new_from_file() returns an object with a count of 1.
|
||||||
When you are done with an image, use g_object_unref() to dispose of it.
|
When you are done with an image, use g_object_unref() to dispose of it.
|
||||||
If you pass an image to an operation and that operation needs to keep a
|
If you pass an image to an operation and that operation needs to keep a
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!-- vim: set ts=2 sw=2 expandtab: -->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||||
]>
|
]>
|
||||||
|
@ -85,9 +85,9 @@ main( int argc, char **argv )
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Everything before <code>VImage in = VImage::..</code> is exactly as the C
|
Everything before <code>VImage in = VImage::..</code> is exactly
|
||||||
API. This boilerplate gives the example a set of standard command-line
|
as the C API. This boilerplate gives the example a set of standard
|
||||||
flags.
|
command-line flags.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -104,7 +104,7 @@ main( int argc, char **argv )
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Instead of using varargs and a NULL-terminated option list, this
|
Instead of using varargs and a %NULL-terminated option list, this
|
||||||
function takes an optional <code>VOption</code> pointer. This
|
function takes an optional <code>VOption</code> pointer. This
|
||||||
gives a list of name / value pairs for optional arguments to the
|
gives a list of name / value pairs for optional arguments to the
|
||||||
function.
|
function.
|
||||||
@ -117,8 +117,8 @@ main( int argc, char **argv )
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The function will delete the #VOption pointer for us when it's
|
The function will delete the <code>VOption</code> pointer for
|
||||||
finished with it.
|
us when it's finished with it.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -156,13 +156,13 @@ main( int argc, char **argv )
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Like VImage::new_from_file(), function raises the
|
Like VImage::new_from_file(), function raises the
|
||||||
<code>vips::VError</code> exception on error.
|
<code>VError</code> exception on error.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Like VImage::new_from_file(), extra arguments are passed
|
Like VImage::new_from_file(), extra arguments are passed
|
||||||
via an optional #VOption parameter. There are none in this case,
|
via an optional <code>VOption</code> parameter. There are none
|
||||||
so the function brackets can be left empty.
|
in this case, so the function brackets can be left empty.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user