home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 326.lha / DateRequester / MRGadgets.h < prev    next >
C/C++ Source or Header  |  1989-12-27  |  1KB  |  35 lines

  1.  
  2. /*  MRGadgets.h - Miscellaneous gadget support routines. */
  3.  
  4. /* The SelectRastPort macro selects a rastport from either a window or
  5.  * a requester. If the requester, <r> is non-null, it is used. Otherwise
  6.  * the window's (<w>) RastPort is used.
  7.  */
  8.  
  9. /*  Macros: */
  10.  
  11. /* Get the pointer to a gadget image, given a pointer to a gadget. */
  12. #define GadgetImage(g) (struct Image *) (g)->GadgetRender
  13.  
  14. /* Get the pointer to a gadget's image data. */
  15. #define GadgetImageData(g) (GadgetImage(g))->ImageData
  16.  
  17. /* Get the pointer to a gadget string, given a pointer to a gadget. */
  18. #define GadgetString(g) ((struct StringInfo *) ((g)->SpecialInfo))->Buffer
  19.  
  20. /* Get the longint value for a string gadget. */
  21. #define GadgetValue(g) ((struct StringInfo *) ((g)->SpecialInfo))->LongInt
  22.  
  23. /* Select a RastPort from either a window or a requester. */
  24. #define SelectRastPort(w, r) (struct RastPort *) (r ? r->ReqLayer->rp : w->RPort)
  25.  
  26. /*  Functions: */
  27.  
  28. void            EraseGadgetBox(/*gadget, window, requester*/);
  29. struct Gadget   *GetGadget(/* id, window */);
  30. void            ResetStringInfo(/* char * */);
  31. void            SelectGadget(/*gadget,window,requester,state*/);
  32. void            SetOptionGadget(/*gadget,window,requester,option*/);
  33. void            SetStringGadget(/*gadget,window,requester,string*/);
  34.  
  35.