File: prompt.xml

package info (click to toggle)
libuser 1%3A0.56.9.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 6,604 kB
  • ctags: 1,619
  • sloc: ansic: 15,970; sh: 10,210; xml: 2,060; python: 1,740; yacc: 782; makefile: 258; sed: 16
file content (115 lines) | stat: -rw-r--r-- 5,718 bytes parent folder | download | duplicates (2)
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
<refentry id="libuser-prompt">
<refmeta>
<refentrytitle role="top_of_page">prompt</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBUSER Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>prompt</refname>
<refpurpose>
Sample prompter functions for use with the libuser library.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>



<link linkend="gboolean">gboolean</link>            <link linkend="lu-prompt-console">lu_prompt_console</link>                   (<link linkend="struct-lu-prompt">struct lu_prompt</link> *prompts,
                                                         <link linkend="int">int</link> count,
                                                         <link linkend="gpointer">gpointer</link> callback_data,
                                                         <link linkend="struct-lu-error">struct lu_error</link> **error);
<link linkend="gboolean">gboolean</link>            <link linkend="lu-prompt-console-quiet">lu_prompt_console_quiet</link>             (<link linkend="struct-lu-prompt">struct lu_prompt</link> *prompts,
                                                         <link linkend="int">int</link> count,
                                                         <link linkend="gpointer">gpointer</link> callback_data,
                                                         <link linkend="struct-lu-error">struct lu_error</link> **error);
</synopsis>
</refsynopsisdiv>









<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
prompt.h declares two predefined prompter functions which applications can use
instead of providing their own.  These should suffice for most command-line
applications.  Authors of graphical applications are encouraged to supply
graphical implementations.
</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="lu-prompt-console" role="function"/>lu_prompt_console ()</title>
<indexterm><primary>lu_prompt_console</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            lu_prompt_console                   (<link linkend="struct-lu-prompt">struct lu_prompt</link> *prompts,
                                                         <link linkend="int">int</link> count,
                                                         <link linkend="gpointer">gpointer</link> callback_data,
                                                         <link linkend="struct-lu-error">struct lu_error</link> **error);</programlisting>
<para>
Prompts the user using a text console.
</para><variablelist role="params">
<varlistentry><term><parameter>prompts</parameter>&nbsp;:</term>
<listitem><simpara>An array of <link linkend="lu-prompt"><type>lu_prompt</type></link> structures.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>count</parameter>&nbsp;:</term>
<listitem><simpara>The number of elements in the <parameter>prompts</parameter> array.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara>Ignored.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara>The location to store error information in the event of an error.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>A <link linkend="gboolean"><type>gboolean</type></link> indicating success or failure.


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lu-prompt-console-quiet" role="function"/>lu_prompt_console_quiet ()</title>
<indexterm><primary>lu_prompt_console_quiet</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            lu_prompt_console_quiet             (<link linkend="struct-lu-prompt">struct lu_prompt</link> *prompts,
                                                         <link linkend="int">int</link> count,
                                                         <link linkend="gpointer">gpointer</link> callback_data,
                                                         <link linkend="struct-lu-error">struct lu_error</link> **error);</programlisting>
<para>
Prompts the user using a text console.  Unlike <link linkend="lu-prompt-console"><function>lu_prompt_console()</function></link>, this
function will not prompt users for a question for which the calling
application or module supplies a default, and will simply return the default.
</para><variablelist role="params">
<varlistentry><term><parameter>prompts</parameter>&nbsp;:</term>
<listitem><simpara>An array of <link linkend="lu-prompt"><type>lu_prompt</type></link> structures.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>count</parameter>&nbsp;:</term>
<listitem><simpara>The number of elements in the <parameter>prompts</parameter> array.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback_data</parameter>&nbsp;:</term>
<listitem><simpara>Ignored.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara>The location to store error information in the event of an error.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>A <link linkend="gboolean"><type>gboolean</type></link> indicating success or failure.


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>





<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>