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