Annotation of libwww/Library/src/HTAlert.html, revision 2.11
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>
2.11 ! frystyk 17: <PRE>
! 18: #include <A NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>
2.6 timbl 19:
2.8 luotonen 20: #ifdef SHORT_NAMES
21: #define HTPrPass HTPromptPassword
22: #define HTPUnAPw HTPromptUsernameAndPassword
23: #endif /*SHORT_NAMES*/
2.11 ! frystyk 24: </PRE>
! 25:
! 26: <H2>Flags for This Module</H2>
2.8 luotonen 27:
2.11 ! frystyk 28: <PRE>
! 29: extern BOOL HTInteractive; /* Any prompts from the Library? */
2.6 timbl 30: </PRE>
2.11 ! frystyk 31:
! 32: <H2>HTPrompt and HTPromptPassword: Display a message and get the
! 33: input</H2>
! 34:
! 35: HTPromptPassword() doesn't echo reply on the screen.
! 36:
2.6 timbl 37: <H3>On entry,</H3>
38: <DL>
39: <DT>Msg
40: <DD> String to be displayed.
2.7 luotonen 41: <DT>deflt
2.9 timbl 42: <DD> If NULL the default value (only
43: for HTPrompt())
2.6 timbl 44: </DL>
45:
46: <H3>On exit,</H3>
47: <DL>
48: <DT>Return value
49: <DD> is malloc'd string which
50: must be freed.
51: </DL>
52:
53: <PRE>
1.1 timbl 54: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.7 luotonen 55: extern char * HTPromptPassword PARAMS((CONST char * Msg));
1.1 timbl 56:
2.8 luotonen 57: </PRE>
58: <H2>HTPromptUsernameAndPassword: Get both username and password</H2>
59: <H3>On entry,</H3>
60: <DL>
61: <DT>Msg<DD>String to be displayed.
62: <DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
63: points to a string. If non-NULL it is taken to be a default value.
64: <DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
65: points to a string. Initial value discarded.
66: </DL>
67: <H3>On exit,</H3>
68: <DL>
69: <DT>*username<DD> and
70: <DT>*password<DD> point to newly allocated strings representing
71: the typed-in username and password. Initial strings pointed to
72: by them are NOT freed!
73: </DL>
74: <PRE>
75: extern void HTPromptUsernameAndPassword PARAMS((CONST char * Msg,
76: char ** username,
77: char ** password));
1.1 timbl 78:
2.6 timbl 79: </PRE>
80: <H2>Display a message, don't wait for
81: input</H2>
82: <H3>On entry,</H3>
83: <DL>
84: <DT>Msg
85: <DD> String to be displayed.
86: </DL>
87:
88: <PRE>
1.1 timbl 89: extern void HTAlert PARAMS((CONST char * Msg));
90:
91:
2.6 timbl 92: </PRE>
93: <H2>Display a progress message for information
94: (and diagnostics) only</H2>
95: <H3>On entry,</H3>The input is a list of parameters
96: for printf.
97: <PRE>extern void HTProgress PARAMS((CONST char * Msg));
98:
99:
100: </PRE>
101: <H2>Display a message, then wait for
102: 'yes' or 'no'.</H2>
103: <H3>On entry,</H3>
104: <DL>
105: <DT>Msg
106: <DD> String to be displayed
107: </DL>
108:
109: <H3>On exit,</H3>
110: <DL>
111: <DT>Returns
112: <DD> If the user reacts in the
113: affirmative, returns TRUE, returns
114: FALSE otherwise.
115: </DL>
116:
117: <PRE>
1.1 timbl 118: extern BOOL HTConfirm PARAMS ((CONST char * Msg));
2.6 timbl 119:
120:
121:
122:
2.9 timbl 123:
124: </A></PRE></BODY>
2.6 timbl 125: </HTML>
Webmaster