home *** CD-ROM | disk | FTP | other *** search
- /*
- * messages.c
- *
- * Routines to display requesters (by EasyRequest).
- *
- * MWS, 3/92.
- */
-
- #include <exec/types.h>
- #include <intuition/intuition.h>
- #include <proto/intuition.h>
- #include <stdarg.h>
-
- #include "messages.h"
-
- extern struct Window *window;
- static struct EasyStruct es;
-
-
- void InitMessages() /* MUST be called before routines are used */
- {
- es.es_StructSize = sizeof(struct EasyStruct);
- es.es_Flags = 0;
- es.es_Title = "PPData Message";
- }
-
-
- void __stdargs Message(char *s, ...) /* simple message - OK response */
- {
- va_list ap;
- va_start(ap,s);
-
- es.es_TextFormat = s;
- es.es_GadgetFormat = "OK";
- EasyRequestArgs(window, &es, NULL, (APTR)ap);
- }
-
-
- LONG __stdargs Confirm(char *s, ...) /* message requiring YES or NO response */
- { /* returns TRUE==YES, FALSE==NO */
- va_list ap;
- va_start(ap,s);
-
- es.es_TextFormat = s;
- es.es_GadgetFormat = "YES|NO";
- return EasyRequestArgs(window, &es, NULL, (APTR)ap);
- }
-
-
- LONG __stdargs MultiRequest(char *responses, char *s, ...)
- {
- va_list ap;
- va_start(ap,s);
-
- es.es_TextFormat = s;
- es.es_GadgetFormat = responses;
- return EasyRequestArgs(window, &es, NULL, (APTR)ap);
- }
-