Annotation of libwww/Library/src/HTAlert.html, revision 2.12.2.1
2.6 timbl 1: <HTML>
2: <HEAD>
2.12 frystyk 3: <TITLE>Handling user messages in libwww</TITLE>
2.6 timbl 4: <NEXTID N="z3">
5: </HEAD>
6: <BODY>
2.12 frystyk 7:
2.10 frystyk 8: <H1>Displaying Messages and Getting Input</H1>
9:
2.12 frystyk 10: <PRE>
11: /*
12: ** (c) COPYRIGHT CERN 1994.
13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16:
17: This modue may be overridden for GUI clients. It allows progress
18: indications and warning messages to be communicated to the user in a
19: portable way.
2.10 frystyk 20:
2.6 timbl 21: <UL>
22: <LI>May 92 Created By C.T. Barker
23: <LI>Feb 93 Portablized etc TBL
24: </UL>
2.12 frystyk 25:
26: This module is implemented by <A HREF="HTAlert.c">HTAlert.c</A>, and
27: it is a part of the <A
28: HREF="http://info.cern.ch/hypertext/WWW/Library/User/Guide/Guide.html">
29: Library of Common Code</A>.
30:
2.11 frystyk 31: <PRE>
2.12 frystyk 32: #ifndef HTALERT_H
33: #define HTALERT_H
2.11 frystyk 34: #include <A NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>
35: </PRE>
36:
37: <H2>Flags for This Module</H2>
2.8 luotonen 38:
2.11 frystyk 39: <PRE>
40: extern BOOL HTInteractive; /* Any prompts from the Library? */
2.6 timbl 41: </PRE>
2.11 frystyk 42:
43: <H2>HTPrompt and HTPromptPassword: Display a message and get the
44: input</H2>
45:
46: HTPromptPassword() doesn't echo reply on the screen.
47:
2.6 timbl 48: <H3>On entry,</H3>
49: <DL>
50: <DT>Msg
51: <DD> String to be displayed.
2.7 luotonen 52: <DT>deflt
2.9 timbl 53: <DD> If NULL the default value (only
54: for HTPrompt())
2.6 timbl 55: </DL>
56:
57: <H3>On exit,</H3>
58: <DL>
59: <DT>Return value
60: <DD> is malloc'd string which
61: must be freed.
62: </DL>
63:
64: <PRE>
1.1 timbl 65: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.7 luotonen 66: extern char * HTPromptPassword PARAMS((CONST char * Msg));
1.1 timbl 67:
2.8 luotonen 68: </PRE>
69: <H2>HTPromptUsernameAndPassword: Get both username and password</H2>
70: <H3>On entry,</H3>
71: <DL>
72: <DT>Msg<DD>String to be displayed.
73: <DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
74: points to a string. If non-NULL it is taken to be a default value.
75: <DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
76: points to a string. Initial value discarded.
77: </DL>
78: <H3>On exit,</H3>
79: <DL>
80: <DT>*username<DD> and
81: <DT>*password<DD> point to newly allocated strings representing
82: the typed-in username and password. Initial strings pointed to
83: by them are NOT freed!
84: </DL>
85: <PRE>
86: extern void HTPromptUsernameAndPassword PARAMS((CONST char * Msg,
87: char ** username,
88: char ** password));
1.1 timbl 89:
2.6 timbl 90: </PRE>
91: <H2>Display a message, don't wait for
92: input</H2>
93: <H3>On entry,</H3>
94: <DL>
95: <DT>Msg
96: <DD> String to be displayed.
97: </DL>
98:
99: <PRE>
1.1 timbl 100: extern void HTAlert PARAMS((CONST char * Msg));
101:
102:
2.6 timbl 103: </PRE>
104: <H2>Display a progress message for information
105: (and diagnostics) only</H2>
106: <H3>On entry,</H3>The input is a list of parameters
107: for printf.
108: <PRE>extern void HTProgress PARAMS((CONST char * Msg));
109:
110:
111: </PRE>
112: <H2>Display a message, then wait for
113: 'yes' or 'no'.</H2>
114: <H3>On entry,</H3>
115: <DL>
116: <DT>Msg
117: <DD> String to be displayed
118: </DL>
119:
120: <H3>On exit,</H3>
121: <DL>
122: <DT>Returns
123: <DD> If the user reacts in the
124: affirmative, returns TRUE, returns
125: FALSE otherwise.
126: </DL>
127:
128: <PRE>
1.1 timbl 129: extern BOOL HTConfirm PARAMS ((CONST char * Msg));
2.6 timbl 130:
2.12 frystyk 131: #endif
132: </PRE>
2.6 timbl 133:
2.12 frystyk 134: </BODY>
2.6 timbl 135: </HTML>
Webmaster