File: streamtuner-st-dialog-api.html

package info (click to toggle)
streamtuner 0.99.99-15
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 5,220 kB
  • ctags: 2,980
  • sloc: ansic: 27,119; sh: 8,206; xml: 4,811; makefile: 444; python: 366
file content (168 lines) | stat: -rw-r--r-- 16,598 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>st-dialog</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="streamtuner Developers Manual"><link rel="up" href="api-reference.html" title="API Reference"><link rel="prev" href="streamtuner-st-category-api.html" title="STCategory"><link rel="next" href="streamtuner-STHandler.html" title="STHandler"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
        .synopsis, .classsynopsis {
            background: #eeeeee;
            border: solid 1px #aaaaaa;
            padding: 0.5em;
        }
        .programlisting {
            background: #feffde;
            border: solid 1px #e9ed1c;
            padding: 0.5em;
        }
        .variablelist {
            padding: 4px;
            margin-left: 3em;
        }
        .navigation {
            background: #daffd1;
            border: solid 1px #74ff54;
            margin-top: 0.5em;
            margin-bottom: 0.5em;
        }
        .navigation a {
            color: #2fba0f;
        }
        .navigation a:visited {
            color: #22850b;
        }
        .navigation .title {
            font-size: 200%;
        }
      </style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="streamtuner-st-category-api.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="api-reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">streamtuner Developers Manual</th><td><a accesskey="n" href="streamtuner-STHandler.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="streamtuner-st-dialog-api"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">st-dialog</span></h2><p>st-dialog &#8212; functions for outputting messages and displaying simple dialogs.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">



void        <a href="streamtuner-st-dialog-api.html#st-notice">st_notice</a>                       (const char *format,
                                             ...);
void        <a href="streamtuner-st-dialog-api.html#st-info-dialog">st_info_dialog</a>                  (const char *primary,
                                             const char *format,
                                             ...);
void        <a href="streamtuner-st-dialog-api.html#st-error-dialog">st_error_dialog</a>                 (const char *primary,
                                             const char *format,
                                             ...);
char*       <a href="streamtuner-st-dialog-api.html#st-search-dialog">st_search_dialog</a>                (void);
gboolean    <a href="streamtuner-st-dialog-api.html#st-auth-dialog">st_auth_dialog</a>                  (const char *default_name,
                                             const char *default_password,
                                             char **name,
                                             char **password,
                                             const char *primary,
                                             const char *format,
                                             ...);
char*       <a href="streamtuner-st-dialog-api.html#st-dialog-normalize">st_dialog_normalize</a>             (const char *str);
void        <a href="streamtuner-st-dialog-api.html#st-warning">st_warning</a>                      (const char *format,
                                             ...);
void        <a href="streamtuner-st-dialog-api.html#st-error">st_error</a>                        (const char *format,
                                             ...);
int         <a href="streamtuner-st-dialog-api.html#st-question">st_question</a>                     (const char *format,
                                             ...);
char*       <a href="streamtuner-st-dialog-api.html#st-prompt">st_prompt</a>                       (gboolean hidden,
                                             const char *init,
                                             const char *format,
                                             ...);
</pre></div><div class="refsect1" lang="en"><a name="id2599543"></a><h2>Description</h2><p>
These functions provide support for outputting messages to the console
as well as displaying graphical message dialogs.
</p></div><div class="refsect1" lang="en"><a name="id2599553"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2599558"></a><h3><a name="st-notice"></a>st_notice ()</h3><a class="indexterm" name="id2599566"></a><pre class="programlisting">void        st_notice                       (const char *format,
                                             ...);</pre><p>
Outputs a formatted streamtuner notice to the standard error output.
</p><p>
If you need to output a notice regarding a specific handler, use
<a href="streamtuner-STHandler.html#st-handler-notice"><tt class="function">st_handler_notice()</tt></a> instead of this function.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td> the message format. See the <tt class="function">printf()</tt> documentation.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> the parameters to insert into the format string.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2599715"></a><h3><a name="st-info-dialog"></a>st_info_dialog ()</h3><a class="indexterm" name="id2599723"></a><pre class="programlisting">void        st_info_dialog                  (const char *primary,
                                             const char *format,
                                             ...);</pre><p>
Displays an informational dialog.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>primary</tt></i>:</span></td><td> the primary text, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td> the secondary text format, or <tt class="literal">NULL</tt>. See the <tt class="function">printf()</tt>
documentation.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> the parameters to insert into the format string.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2599822"></a><h3><a name="st-error-dialog"></a>st_error_dialog ()</h3><a class="indexterm" name="id2599831"></a><pre class="programlisting">void        st_error_dialog                 (const char *primary,
                                             const char *format,
                                             ...);</pre><p>
Displays an error dialog.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>primary</tt></i>:</span></td><td> the primary text, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td> the secondary text format, or <tt class="literal">NULL</tt>. See the <tt class="function">printf()</tt>
documentation.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> the parameters to insert into the format string.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2599929"></a><h3><a name="st-search-dialog"></a>st_search_dialog ()</h3><a class="indexterm" name="id2599938"></a><pre class="programlisting">char*       st_search_dialog                (void);</pre><p>
Prompts the user for a search string.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a search string which should be freed after use, or
<tt class="literal">NULL</tt> if the user pressed the cancel button.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2599982"></a><h3><a name="st-auth-dialog"></a>st_auth_dialog ()</h3><a class="indexterm" name="id2599991"></a><pre class="programlisting">gboolean    st_auth_dialog                  (const char *default_name,
                                             const char *default_password,
                                             char **name,
                                             char **password,
                                             const char *primary,
                                             const char *format,
                                             ...);</pre><p>
Prompts the user for a name and password. The name and password
entries will be initialized to <i class="parameter"><tt>default_name</tt></i> and <i class="parameter"><tt>default_password</tt></i>,
if provided.
</p><p>
The entered name and password will be stored in <i class="parameter"><tt>name</tt></i> and
<i class="parameter"><tt>password</tt></i>, and should be freed when no longer needed. If <i class="parameter"><tt>name</tt></i> is
<tt class="literal">NULL</tt>, the name entry will not be made sensitive.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>default_name</tt></i>:</span></td><td> a default name, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>default_password</tt></i>:</span></td><td> a default password, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>:</span></td><td> a location to return the entered name, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>password</tt></i>:</span></td><td> a location to return the entered password.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>primary</tt></i>:</span></td><td> the primary text, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td> the secondary text format, or <tt class="literal">NULL</tt>. See the <tt class="function">printf()</tt>
documentation.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> the parameters to insert into the format string.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> if the user pressed the "Authenticate" button,
<tt class="literal">FALSE</tt> otherwise. If <tt class="literal">FALSE</tt> is returned, <i class="parameter"><tt>name</tt></i> and <i class="parameter"><tt>password</tt></i> will
not be set.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2600325"></a><h3><a name="st-dialog-normalize"></a>st_dialog_normalize ()</h3><a class="indexterm" name="id2600333"></a><pre class="programlisting">char*       st_dialog_normalize             (const char *str);</pre><p>
Normalizes a string so that it can be used stand-alone as the
secondary string of a dialog.
</p><p>
Normalization will remove trailing newlines and convert the string
to a sentence.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>str</tt></i>:</span></td><td> a string to normalize.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a normalized string, which should be freed after use.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2600392"></a><h3><a name="st-warning"></a>st_warning ()</h3><a class="indexterm" name="id2600401"></a><pre class="programlisting">void        st_warning                      (const char *format,
                                             ...);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">st_warning</tt> is deprecated and should not be used in newly-written code.</p></div><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2600466"></a><h3><a name="st-error"></a>st_error ()</h3><a class="indexterm" name="id2600474"></a><pre class="programlisting">void        st_error                        (const char *format,
                                             ...);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">st_error</tt> is deprecated and should not be used in newly-written code.</p></div><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2600539"></a><h3><a name="st-question"></a>st_question ()</h3><a class="indexterm" name="id2600548"></a><pre class="programlisting">int         st_question                     (const char *format,
                                             ...);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">st_question</tt> is deprecated and should not be used in newly-written code.</p></div><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2600691"></a><h3><a name="st-prompt"></a>st_prompt ()</h3><a class="indexterm" name="id2600699"></a><pre class="programlisting">char*       st_prompt                       (gboolean hidden,
                                             const char *init,
                                             const char *format,
                                             ...);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">st_prompt</tt> is deprecated and should not be used in newly-written code.</p></div><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>hidden</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>init</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>


</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2600813"></a><h2>See Also</h2><p>
<a href="streamtuner-STHandler.html#st-handler-notice"><tt class="function">st_handler_notice()</tt></a>
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="streamtuner-st-category-api.html"><b>&lt;&lt;STCategory</b></a></td><td align="right"><a accesskey="n" href="streamtuner-STHandler.html"><b>STHandler&gt;&gt;</b></a></td></tr></table></body></html>