home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_USR08B.LHA / gerlib / examples / add / normal / ShowRequest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-12  |  1.8 KB  |  84 lines

  1. /*-- Rev Header - do NOT edit!
  2.  *
  3.  *  Filename : ShowRequest.c
  4.  *  Purpose  : Hilfsroutine zum Anzeigen von einem Requester
  5.  *
  6.  *  Program  : -
  7.  *  Author   : Gerhard Müller
  8.  *  Copyright: (c) by Gerhard Müller
  9.  *  Creation : Fri Sep 10 00:41:01 1993
  10.  *
  11.  *  compile  : makefile
  12.  *
  13.  *  Compile version  : 0.1
  14.  *  Ext. Version     : 0.1
  15.  *
  16.  *  REVISION HISTORY
  17.  *
  18.  *  Date                     Comment
  19.  *  ------------------------ -------------------------------------------------
  20.  *  Fri Sep 17 01:02:09 1993 Taken from another source-Text, I don't remeber
  21.  *                           where, sigh...
  22.  *
  23.  *
  24.  *
  25.  *-- REV_END --
  26.  */
  27.  
  28.     /*
  29.      * C-Includes, C-Definitionen
  30.      *
  31.      */
  32.  
  33. #include <exec/types.h>
  34. #include <intuition/classusr.h>
  35. #include <intuition/intuition.h>
  36. #include <dos/dos.h>
  37. #include <inline/stubs.h>
  38. #include <stdarg.h>
  39. #ifdef __OPTIMIZE__
  40. #include <inline/exec.h>
  41. #include <inline/dos.h>
  42. #include <inline/intuition.h>
  43. #else
  44. #include <clib/exec_protos.h>
  45. #include <clib/dos_protos.h>
  46. #include <clib/intuition_protos.h>
  47. #endif
  48.  
  49. #include "add.h"
  50.  
  51.     /* ShowRequest(struct Window *window,UBYTE *Title,UBYTE *Text,UBYTE *Gadgets,...)
  52.      *
  53.      *    Display an Intuition EasyRequest.
  54.      */
  55.  
  56. ULONG
  57. ShowRequest(struct Window *window,UBYTE *Title,UBYTE *Text,UBYTE *Gadgets,...)
  58. {
  59.     struct EasyStruct    Easy;
  60.     BOOL                Result;
  61.     ULONG                IDCMP = NULL;
  62.     va_list                 VarArgs;
  63.  
  64.         /* Initialize the EasyStruct structure with default values. */
  65.  
  66.     Easy . es_StructSize    = sizeof(struct EasyStruct);
  67.     Easy . es_Flags            = NULL;
  68.     Easy . es_Title            = (UBYTE *)Title;
  69.     Easy . es_TextFormat    = (UBYTE *)Text;
  70.     Easy . es_GadgetFormat    = (UBYTE *)Gadgets;
  71.  
  72.         /* Pick up the arguments passed to this routine and
  73.          * put up the requester.
  74.          */
  75.  
  76.     va_start(VarArgs,Gadgets);
  77.     Result = EasyRequestArgs(window,&Easy,&IDCMP,VarArgs);
  78.     va_end(VarArgs);
  79.  
  80.         /* Return the result. */
  81.  
  82.     return(Result);
  83. }
  84.