<!--

  Copyright (c) 2005 os-cillation
  Copyright (c) 2020 Xfce Developement Team

  Written by Benedikt Meurer <benny@xfce.org>.
-->

<refentry id="xdt-csource">
  <refmeta>
    <refentrytitle>xdt-csource</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="manual">Xfce User's Manual</refmiscinfo>
    <refmiscinfo class="source">Xfce</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>xdt-csource</refname>
    <refpurpose>C code generation utility for arbitrary data</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>xdt-csource</command>
      <arg choice="opt">options</arg>
      <arg choice="opt">file</arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>xdt-csource</command>
      <arg choice="opt">options</arg>
      <arg choice="plain">--build-list</arg>
      <arg rep="repeat">
        <arg>name</arg>
        <arg>file</arg>
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>
    <para>
      <command>xdt-csource</command> is a small utility that generates C code
      containing arbitrary data, useful for compiling texts or other data
      directly into programs. It supersedes exo-csource.
    </para>
  </refsect1>

  <refsect1>
    <title>Invocation</title>
    <para>
      <command>xdt-csource</command> either takes as input one file name to
      generate code for, or, using the <option>--build-list</option> option,
      a list of (<replaceable>name</replaceable>, <replaceable>file</replaceable>)
      pairs to generate code for a list of images into named variables.
    </para>

    <refsect2>
      <title>Options</title>
      <variablelist>
        <varlistentry>
          <term><option>-h</option>, <option>--help</option></term>
          <listitem>
            <para>Print brief help and exit.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>-V</option>, <option>--version</option></term>
          <listitem>
            <para>Print version information and exit.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--extern</option></term>
          <listitem>
            <para>Generate extern symbols.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--static</option></term>
          <listitem>
            <para>Generate static symbols (default).</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--name=identifier</option></term>
          <listitem>
            <para>
              Specifies the <parameter>identifier</parameter> name (prefix) for the
              generated variables (only used if <option>--build-list</option> was
              not specified as well).
            </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--build-list</option></term>
          <listitem>
            <para>
              Enables (<replaceable>name</replaceable>, <replaceable>file</replaceable>)
              pair parsing mode.
            </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--strip-comments</option></term>
          <listitem>
            <para>
              Remove comments from XML files
            </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--strip-content</option></term>
          <listitem>
            <para>
              Remove node contents from XML files
            </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--output=identifier</option></term>
          <listitem>
            <para>
              Prints the output to <parameter>identifier</parameter> instead of
              stdout (only used if <option>--build-list</option> was
              not specified as well).
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
  </refsect1>

  <refsect1>
    <title>See also</title>
    <para>
      The <command>gdk-pixbuf-csource</command> utility which ships with the Gtk+
      distribution, available from <ulink url="https://www.gtk.org">www.gtk.org</ulink>.
    </para>
  </refsect1>

  <refsect1>
    <title>Author</title>
    <para>
      Original program <command>exo-csource</command> was written by Benedikt Meurer
      <email>benny@xfce.org</email>.
      <command>xdt-csource</command> supersedes it.
    </para>
    <para>
      This manual page was provided by the Xfce Development Team <email>xfce4-dev@xfce.org</email>.
    </para>
  </refsect1>
</refentry>
