<refentry id="streamtuner-st-handler-field-api">
<refmeta>
<refentrytitle>STHandlerField</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>STREAMTUNER Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>STHandlerField</refname><refpurpose>a structure for defining a stream field.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="STHandlerField">STHandlerField</link>;
enum        <link linkend="STHandlerFieldFlags">STHandlerFieldFlags</link>;
<link linkend="STHandlerField">STHandlerField</link>* <link linkend="st-handler-field-new">st_handler_field_new</link>        (<link linkend="int">int</link> id,
                                             const <link linkend="char">char</link> *label,
                                             <link linkend="GType">GType</link> type,
                                             <link linkend="STHandlerFieldFlags">STHandlerFieldFlags</link> flags);
const <link linkend="char">char</link>* <link linkend="st-handler-field-get-label">st_handler_field_get_label</link>      (<link linkend="STHandlerField">STHandlerField</link> *field);
<link linkend="GType">GType</link>       <link linkend="st-handler-field-get-type">st_handler_field_get_type</link>       (<link linkend="STHandlerField">STHandlerField</link> *field);
<link linkend="STHandlerFieldFlags">STHandlerFieldFlags</link> <link linkend="st-handler-field-get-flags">st_handler_field_get_flags</link>
                                            (<link linkend="STHandlerField">STHandlerField</link> *field);
<link linkend="void">void</link>        <link linkend="st-handler-field-set-description">st_handler_field_set_description</link>
                                            (<link linkend="STHandlerField">STHandlerField</link> *field,
                                             const <link linkend="char">char</link> *description);
const <link linkend="char">char</link>* <link linkend="st-handler-field-get-description">st_handler_field_get_description</link>
                                            (<link linkend="STHandlerField">STHandlerField</link> *field);
</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="STHandlerField"/>struct STHandlerField</title>
<indexterm><primary>STHandlerField</primary></indexterm><programlisting>struct STHandlerField {

  int				id;
  STHandlerFieldPrivate		*priv;
};
</programlisting>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="int">int</link> <structfield>id</structfield></term>
<listitem><simpara>the ID passed to <link linkend="st-handler-field-new"><function>st_handler_field_new()</function></link> (read-only)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="STHandlerFieldPrivate">STHandlerFieldPrivate</link> *<structfield>priv</structfield></term>
<listitem><simpara>

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="STHandlerFieldFlags"/>enum STHandlerFieldFlags</title>
<indexterm><primary>STHandlerFieldFlags</primary></indexterm><programlisting>typedef enum
{
  ST_HANDLER_FIELD_VISIBLE		= 1 &lt;&lt; 0,
  ST_HANDLER_FIELD_EDITABLE		= 1 &lt;&lt; 1,
  ST_HANDLER_FIELD_VOLATILE		= 1 &lt;&lt; 2,
  ST_HANDLER_FIELD_NO_DEDICATED_COLUMN	= 1 &lt;&lt; 3,
  ST_HANDLER_FIELD_START_HIDDEN		= 1 &lt;&lt; 4
} STHandlerFieldFlags;
</programlisting>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>ST_HANDLER_FIELD_VISIBLE</literal></term>
<listitem><simpara>specifies that the field should be visible
in the user interface.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>ST_HANDLER_FIELD_EDITABLE</literal></term>
<listitem><simpara>specifies that the user may edit the field
value.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>ST_HANDLER_FIELD_VOLATILE</literal></term>
<listitem><simpara>specifies that the field value should not
be saved to permanent storage.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>ST_HANDLER_FIELD_NO_DEDICATED_COLUMN</literal></term>
<listitem><simpara>specifies that the field should
not have a dedicated column in the stream list.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>ST_HANDLER_FIELD_START_HIDDEN</literal></term>
<listitem><simpara>specifies that the field should be
hidden by default.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-new"/>st_handler_field_new ()</title>
<indexterm><primary>st_handler_field_new</primary></indexterm><programlisting><link linkend="STHandlerField">STHandlerField</link>* st_handler_field_new        (<link linkend="int">int</link> id,
                                             const <link linkend="char">char</link> *label,
                                             <link linkend="GType">GType</link> type,
                                             <link linkend="STHandlerFieldFlags">STHandlerFieldFlags</link> flags);</programlisting>
<para>
Creates a new <link linkend="STHandlerField"><type>STHandlerField</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> the numeric ID of the field. Handler fields must be numbered
from 0 to n_fields - 1.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>label</parameter>&nbsp;:</term>
<listitem><simpara> the field label.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> the field type. Must be <link linkend="G-TYPE-BOOLEAN-CAPS"><type>G_TYPE_BOOLEAN</type></link>, <link linkend="G-TYPE-INT-CAPS"><type>G_TYPE_INT</type></link>,
<link linkend="G-TYPE-UINT-CAPS"><type>G_TYPE_UINT</type></link>, <link linkend="G-TYPE-DOUBLE-CAPS"><type>G_TYPE_DOUBLE</type></link>, <link linkend="G-TYPE-STRING-CAPS"><type>G_TYPE_STRING</type></link>, or, if the
<link linkend="ST-HANDLER-FIELD-EDITABLE-CAPS"><type>ST_HANDLER_FIELD_EDITABLE</type></link> flag is not set, <link linkend="GDK-TYPE-PIXBUF-CAPS"><type>GDK_TYPE_PIXBUF</type></link> or
<link linkend="G-TYPE-VALUE-ARRAY-CAPS"><type>G_TYPE_VALUE_ARRAY</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> the field flags.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly created <link linkend="STHandlerField"><type>STHandlerField</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-get-label"/>st_handler_field_get_label ()</title>
<indexterm><primary>st_handler_field_get_label</primary></indexterm><programlisting>const <link linkend="char">char</link>* st_handler_field_get_label      (<link linkend="STHandlerField">STHandlerField</link> *field);</programlisting>
<para>
Gets the label of <parameter>field</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
<listitem><simpara> a field.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the label of <parameter>field</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-get-type"/>st_handler_field_get_type ()</title>
<indexterm><primary>st_handler_field_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link>       st_handler_field_get_type       (<link linkend="STHandlerField">STHandlerField</link> *field);</programlisting>
<para>
Gets the value type of <parameter>field</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
<listitem><simpara> a field.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the type of value held by <parameter>field</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-get-flags"/>st_handler_field_get_flags ()</title>
<indexterm><primary>st_handler_field_get_flags</primary></indexterm><programlisting><link linkend="STHandlerFieldFlags">STHandlerFieldFlags</link> st_handler_field_get_flags
                                            (<link linkend="STHandlerField">STHandlerField</link> *field);</programlisting>
<para>
Gets the flags of <parameter>field</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
<listitem><simpara> a field.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the flags of <parameter>field</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-set-description"/>st_handler_field_set_description ()</title>
<indexterm><primary>st_handler_field_set_description</primary></indexterm><programlisting><link linkend="void">void</link>        st_handler_field_set_description
                                            (<link linkend="STHandlerField">STHandlerField</link> *field,
                                             const <link linkend="char">char</link> *description);</programlisting>
<para>
Sets the description of <parameter>field</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
<listitem><simpara> a field.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>description</parameter>&nbsp;:</term>
<listitem><simpara> the field description, or <literal>NULL</literal> to unset.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-handler-field-get-description"/>st_handler_field_get_description ()</title>
<indexterm><primary>st_handler_field_get_description</primary></indexterm><programlisting>const <link linkend="char">char</link>* st_handler_field_get_description
                                            (<link linkend="STHandlerField">STHandlerField</link> *field);</programlisting>
<para>
Gets the description of <parameter>field</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
<listitem><simpara> a field.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the description of <parameter>field</parameter>, or <literal>NULL</literal> if not set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="STHandler"><type>STHandler</type></link>
</para>
</refsect1>

</refentry>
