gdk-pixbuf-csource.1 revision 11904
10139N/A<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
10139N/A<!--ArborText, Inc., 1988-1999, v.4002-->
10139N/A<!ENTITY cmd "gdk-pixbuf-csource">
10139N/A<!ENTITY % commonents SYSTEM "smancommon.ent">
10139N/A%commonents;
10139N/A<!ENTITY % booktitles SYSTEM "booktitles.ent">
10139N/A%booktitles;
10139N/A<!ENTITY suncopy "Copyright (c) 2003,2006 Sun Microsystems, Inc. All Rights Reserved.">
10139N/A]>
10139N/A<?Pub UDT _bookmark _target>
10139N/A<?Pub Inc>
10139N/A<refentry id="gdk-pixbuf-csource-1">
10139N/A<!-- %Z%%M% %I% %E% SMI; -->
10139N/A<refmeta><refentrytitle>gdk-pixbuf-csource</refentrytitle><manvolnum>1</manvolnum>
10139N/A<refmiscinfo class="date">02 April 2003</refmiscinfo>
10139N/A<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
10139N/A<refmiscinfo class="software">&release;</refmiscinfo>
10139N/A<refmiscinfo class="arch">generic</refmiscinfo>
10139N/A<refmiscinfo class="copyright">&suncopy;</refmiscinfo>
10139N/A</refmeta>
10139N/A<indexterm><primary>&cmd;</primary></indexterm><indexterm><primary>C code
10139N/Agenerator for GdkPixbuf images</primary></indexterm>
10139N/A<refnamediv id="gdk-pixbuf-csource-1-name"><refname>gdk-pixbuf-csource</refname><refpurpose>
10139N/AC code generator for GdkPixbuf images.</refpurpose></refnamediv>
10139N/A<refsynopsisdiv id="gdk-pixbuf-csource-1-synp"><title>&synp-tt;</title>
10139N/A<cmdsynopsis><command>&cmd;</command>
10139N/A<arg choice="opt"><option>-decoder</option></arg>
10139N/A<arg choice="opt"><option>-extern</option></arg>
10139N/A<arg choice="opt"><option>-help</option></arg>
10139N/A<arg choice="opt"><option>-g-fatal-warnings</option></arg>
10139N/A<arg choice="opt"><option>-macros</option></arg>
10139N/A<arg choice="opt"><option>-name=<replaceable>identifier</replaceable></option></arg>
10139N/A<arg choice="opt"><option>-raw</option></arg>
10139N/A<arg choice="opt"><option>-rle</option></arg>
10139N/A<arg choice="opt"><option>-static</option></arg>
10139N/A<arg choice="opt"><option>-stream</option></arg>
10139N/A<arg choice="opt"><option>-struct</option></arg>
10139N/A<arg choice="opt"><option>-version</option></arg>
10139N/A<arg choice="req"><replaceable>image</replaceable></arg>
10139N/A</cmdsynopsis>
10139N/A<cmdsynopsis><command>&cmd;</command>
10139N/A<arg choice="opt"><option>-decoder</option></arg>
10139N/A<arg choice="opt"><option>-extern</option></arg>
10139N/A<arg choice="opt"><option>-help</option></arg>
10139N/A<arg choice="opt"><option>-g-fatal-warnings</option></arg>
10139N/A<arg choice="opt"><option>-macros</option></arg>
10139N/A<arg choice="opt"><option>-raw</option></arg>
10139N/A<arg choice="opt"><option>-rle</option></arg>
10139N/A<arg choice="opt"><option>-static</option></arg>
10139N/A<arg choice="opt"><option>-stream</option></arg>
10139N/A<arg choice="opt"><option>-struct</option></arg>
10139N/A<arg choice="opt"><option>-version</option></arg>
10139N/A<arg choice="opt"><option>-build-list</option></arg>
10139N/A<arg choice="req">[<replaceable>name image</replaceable>]...
10139N/A</arg>
10139N/A</cmdsynopsis></refsynopsisdiv>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-desc"><title>&desc-tt;</title>
10139N/A<para>The <application>gdk-pixbuf-csource</application> utility generates
10139N/AC code containing images. You can use <application>gdk-pixbuf-csource</application>
10139N/Ato compile images directly into programs.</para>
10139N/A<para>You can use the following types of input with <application>gdk-pixbuf-csource
10139N/A</application>:</para>
10139N/A<itemizedlist>
10139N/A<listitem><para>A single file, to generate code for the file.</para></listitem>
10139N/A<listitem><para>A list of [<replaceable>name</replaceable> <replaceable>image
10139N/A</replaceable>] pairs, using the <option>-build-list</option>
10139N/Aoption, to generate code for a list of images into named variables.</para>
10139N/A</listitem>
10139N/A</itemizedlist>
10139N/A</refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-opts"><title>&opts-tt;</title>
10139N/A<para>The following options are supported:</para>
10139N/A<variablelist termlength="medium">
10139N/A<varlistentry><term><option>-build-list</option></term><listitem>
10139N/A<para>Enable [<replaceable>name</replaceable> <replaceable>image</replaceable>]
10139N/Apair parsing mode.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-decoder</option></term><listitem>
10139N/A<para>Provide the following macro definition to decode run-length encoded
10139N/Aimage data:</para>
10139N/A<itemizedlist mark="none">
10139N/A<listitem><para>*_RUN_LENGTH_DECODE</para>
10139N/A<para>image_buf, rle_data, size, bpp</para>
10139N/A</listitem>
10139N/A</itemizedlist>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-extern</option></term><listitem>
10139N/A<para>Generate extern symbols. This option is only useful with <option>
10139N/A-stream</option> or <option>-struct</option>. The <option>
10139N/A--extern</option> option causes the structure created to be defined as: <literal>
10139N/Aconst [...]</literal></para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>h</option>, <option>--help</option></term><listitem>
10139N/A<para>Print brief help and exit.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-g-fatal-warnings</option></term>
10139N/A<listitem><para>Make warnings fatal. This option causes the program
10139N/Ato abort when warnings occur.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-macros</option></term><listitem>
10139N/A<para>Generate the following macro definitions for the image: <itemizedlist>
10139N/A<listitem><para>*_ROWSTRIDE</para>
10139N/A</listitem>
10139N/A<listitem><para>*_WIDTH</para>
10139N/A</listitem>
10139N/A<listitem><para>*_HEIGHT</para>
10139N/A</listitem>
10139N/A<listitem><para>*_BYTES_PER_PIXEL</para>
10139N/A</listitem>
10139N/A<listitem><para>*_RLE_PIXEL_DATA or *_PIXEL_DATA</para>
10139N/A</listitem>
10139N/A</itemizedlist></para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-name=<replaceable>identifier</replaceable></option></term>
10139N/A<listitem><para>Specify the identifier name, or prefix, for the generated
10139N/Avariables or macros. This option is useful only if you do not specify <option>-build-list</option>.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-raw</option></term><listitem>
10139N/A<para>Disable run-length encoding for the generated pixel data. The
10139N/A<option>-raw</option> option dumps out each &ldquo;(line of data)&rdquo;
10139N/Ain raw image format</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-rle</option></term><listitem>
10139N/A<para>Enable run-length encoding for the generated pixel data. The
10139N/A<option>-rle</option> option dumps out each line of data in run-length-encoding
10139N/Aformat. This is a default setting.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-static</option></term><listitem>
10139N/A<para>Generate static symbols. This is a default setting. This option is only
10139N/Auseful with <option>-stream</option> or
10139N/A<option>-struct</option>. The <option>-static</option> option causes
10139N/Athe structure created to be defined as: <literal>static const [...]</literal></para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-stream</option></term><listitem>
10139N/A<para>Generate a pixbuf data stream; a single string containing a serialized
10139N/AGdkPixdata structure in network byte order. </para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>-struct</option></term><listitem>
10139N/A<para>Generate GdkPixdata structure; needs the GdkPixdata structure
10139N/Adefinition from gdk-pixdata.h.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><option>v</option>,
10139N/A<option>-version</option></term><listitem><para>Print version and exit.</para>
10139N/A</listitem></varlistentry>
10139N/A</variablelist></refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-exam"><title>&exam-tt;</title>
10139N/A<example role="example">
10139N/A<title>To Generate Code From a File</title>
10139N/A<para><screen>example% <userinput>&cmd; <replaceable>input_filename</replaceable></userinput></screen></para>
10139N/A<para>Running <command>&cmd;</command> without any options is the same as
10139N/Aspecifying the following options: </para>
10139N/A<itemizedlist>
10139N/A<listitem><para><option>-stream</option></para></listitem>
10139N/A<listitem><para><option>-rle</option></para></listitem>
10139N/A<listitem><para><option>-static</option></para></listitem>
10139N/A</itemizedlist>
10139N/A</example>
10139N/A<example role="example">
10139N/A<title>To Specify a Value for the Structure in the Generated Output</title>
10139N/A<para><screen>example% <userinput>&cmd; --name=my_struct --struct <replaceable>
10139N/Ainput_filename</replaceable></userinput></screen></para>
10139N/A<para>The <option>-name</option> option affects the name of
10139N/Athe structure in the generated output when you use either the
10139N/A<option>-stream</option> option or the <option>-struct</option> option.
10139N/AThe <option>-name</option> option affects the name of the macro
10139N/Awhen you use the <option>-macros</option> option.</para>
10139N/A<para>If you use either the <option>-stream</option> option
10139N/Aor the <option>-struct</option> option, but you do not specify
10139N/Athe <option>-name</option> option, then the default name of
10139N/Athe structure in the generated output is <literal>my_pixbuf</literal>.</para>
11904N/A<para>If you use the <option>-macros</option> option,
10139N/Abut you do not specify the <option>-name</option> option, then
10139N/Athe default macro names are prefixed with <literal>MY_PIXBUF_</literal>.</para>
10139N/A</example>
10139N/A<example role="example">
10139N/A<title>To Display the Command Output as an Array of Strings</title>
10139N/A<para><screen>example% <userinput>&cmd; --name=my_struct --stream <replaceable>
10139N/Ainput_filename</replaceable></userinput></screen><screen>static const guint8 my_struct[] =
10139N/A{ ""
10139N/A /* Pixbuf magic (0x47646b50) */
10139N/A "GdkP"
10139N/A /* length: header (24) + pixel_data (215281) */
10139N/A "\0\3I\11"
10139N/A /* pixdata_type (0x2010001) */
10139N/A "\2\1\0\1"
10139N/A /* rowstride (960) */
10139N/A "\0\0\3\300"
10139N/A /* width (320) */
10139N/A "\0\0\1@"
10139N/A /* height (240) */
10139N/A "\0\0\0\360"
10139N/A /* pixel_data: */
10139N/A "(line of data)"
10139N/A[...]</screen></para>
10139N/A</example>
10139N/A<example role="example">
10139N/A<title>To Display the Output as a GdkPixdata Structure</title>
10139N/A<para><screen>example% <userinput>&cmd; --name=my_struct --struct <replaceable>
10139N/Ainput_filename</replaceable></userinput></screen><screen>const GdkPixdata my_struct = {
10139N/A 0x47646b50, /* Pixbuf magic: 'GdkP' */
10139N/A 24 + 215281, /* header length + pixel_data length */
10139N/A 0x2010001, /* pixdata_type */
10139N/A 960, /* rowstride */
10139N/A 320, /* width */
10139N/A 240, /* height */
10139N/A /* pixel_data: */
10139N/A "(line of data)"
10139N/A[...]</screen></para>
10139N/A</example>
10139N/A<example role="example">
10139N/A<title>To Display the Output as C Macros</title>
10139N/A<para><screen>example% <userinput>&cmd; --name=my_struct --macros <replaceable>
10139N/Ainput_filename</replaceable></userinput></screen><screen>#define MY_STRUCT_ROWSTRIDE (960)
10139N/A#define MY_STRUCT_WIDTH (320)
10139N/A#define MY_STRUCT_HEIGHT (240)
10139N/A#define MY_STRUCT_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */
10139N/A#define MY_STRUCT_RLE_PIXEL_DATA ((guint8*) \
10139N/A "(line of data)" \
10139N/A[...]</screen></para>
10139N/A</example>
10139N/A</refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-exit"><title>&exit-tt;</title>
10139N/A<para>The following exit values are returned:</para>
10139N/A<variablelist termlength="xtranarrow">
10139N/A<varlistentry><term><returnvalue>0</returnvalue></term><listitem><para>Application
10139N/Aexited successfully.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term><returnvalue>1</returnvalue></term><listitem><para>Application
10139N/Aexited with failure, if any file specified on the command line cannot be read.
10139N/A</para>
10139N/A</listitem></varlistentry>
10139N/A</variablelist></refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-file"><title>&file-tt;</title>
10139N/A<para>The following files are used by this application:</para>
10139N/A<variablelist termlength="wholelength">
10139N/A<varlistentry><term><filename>/usr/bin/&cmd;</filename></term><listitem>
10139N/A<para>The command-line executable for the application.</para></listitem>
10139N/A</varlistentry>
10139N/A<varlistentry><term><filename>/usr/share/gtk-doc/html/gdk-pixbuf</filename></term><listitem>
10139N/A<para>Location of developer documentation</para></listitem>
10139N/A</varlistentry>
10139N/A</variablelist>
10139N/A</refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-attr"><title>&attr-tt;</title>
10139N/A<para>See <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry>
10139N/A<refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>
10139N/Afor descriptions of the following attributes:</para>
10139N/A<informaltable frame="all">
10139N/A<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="COLSPEC0" colwidth="1*">
10139N/A<colspec colname="COLSPEC1" colwidth="1*">
10139N/A<thead>
10139N/A<row><entry align="center" valign="middle">ATTRIBUTE TYPE</entry><entry align="center"
10139N/Avalign="middle">ATTRIBUTE VALUE</entry></row>
10139N/A</thead>
10139N/A<tbody>
10139N/A<row><entry><para>Availability</para></entry><entry><para>SUNWgnome-base-libs-devel</para></entry></row>
10139N/A<row><entry colname="COLSPEC0"><para>Interface stability</para></entry><entry colname="COLSPEC1"><para>Committed</para></entry></row>
10139N/A</tbody>
10139N/A</tgroup>
10139N/A</informaltable>
10139N/A</refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-also"><title>&also-tt;</title>
10139N/A<!--Reference to another man page-->
10139N/A<!--Reference to a Help manual-->
10139N/A<!--Reference to a book.-->
10139N/A<para>
10139N/A<citerefentry><refentrytitle>gdk-pixbuf-query-loaders</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>glib-genmarshal</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>glib-gettextize</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>glib-mkenums</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>gobject-query</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>gtk-query-immodules-2.0</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
10139N/A<citerefentry><refentrytitle>gtk-update-icon-cache</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
11904N/A<citerefentry><refentrytitle>libgdk_pixbuf-2.0</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
11904N/A<citerefentry><refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
11904N/A<citerefentry><refentrytitle>gnome-interfaces</refentrytitle><manvolnum>5</manvolnum></citerefentry>
11904N/A<para>
10139N/A</refsect1>
10139N/A<refsect1 id="gdk-pixbuf-csource-1-note"><title>&note-tt;</title>
10139N/A<para>Updated by Brian Cameron, Sun Microsystems Inc., April 2003, 2006.</para>
10139N/A<para>Written by Tim Janik timj@gtk.org</para>
10139N/A</refsect1>
10139N/A</refentry>