home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / intuition / refreshglist.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  3.4 KB  |  135 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: refreshglist.c,v 1.9 1996/11/08 11:28:04 aros Exp $
  4.     $Log: refreshglist.c,v $
  5.     Revision 1.9  1996/11/08 11:28:04  aros
  6.     All OS function use now Amiga types
  7.  
  8.     Moved intuition-driver protos to intuition_intern.h
  9.  
  10.     Revision 1.8  1996/10/25 14:25:56  aros
  11.     Handle BOOPSI Gadgets
  12.  
  13.     Revision 1.7  1996/10/24 15:51:24  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.6  1996/10/10 13:31:07  digulla
  17.     Move Gadget code in own files
  18.  
  19.     Revision 1.5  1996/10/04 15:33:57  digulla
  20.     Added a comment
  21.  
  22.     Revision 1.4  1996/10/02 18:12:03  digulla
  23.     Draw text after border for IMAGE and BORDER gadgets and before for HCOMP-type
  24.     gadgets (The text of IMAGE-Gadgets was not visible)
  25.  
  26.     Revision 1.3  1996/08/29 13:57:38  digulla
  27.     Commented
  28.     Moved common code from driver to Intuition
  29.  
  30.     Revision 1.2  1996/08/29 07:50:49  digulla
  31.     Fixed a small bug in PropGadgets. The jumpsize of the knob was too small.
  32.  
  33.     Revision 1.1  1996/08/28 17:55:36  digulla
  34.     Proportional gadgets
  35.     BOOPSI
  36.  
  37.  
  38.     Desc:
  39.     Lang: english
  40. */
  41. #include <clib/graphics_protos.h>
  42. #include "intuition_intern.h"
  43. #include "boolgadgets.h"
  44. #include "boopsigadgets.h"
  45. #include "propgadgets.h"
  46.  
  47. /*****************************************************************************
  48.  
  49.     NAME */
  50.     #include <intuition/intuition.h>
  51.     #include <clib/intuition_protos.h>
  52.  
  53.     AROS_LH4(void, RefreshGList,
  54.  
  55. /*  SYNOPSIS */
  56.     AROS_LHA(struct Gadget    *, gadgets, A0),
  57.     AROS_LHA(struct Window    *, window, A1),
  58.     AROS_LHA(struct Requester *, requester, A2),
  59.     AROS_LHA(LONG              , numGad, D0),
  60.  
  61. /*  LOCATION */
  62.     struct IntuitionBase *, IntuitionBase, 72, Intuition)
  63.  
  64. /*  FUNCTION
  65.     Refresh (draw anew) the specified number of gadgets starting
  66.     at the specified gadget.
  67.  
  68.     INPUTS
  69.     gadgets - This is the first gadget which will be refreshed.
  70.     window - The window which contains the gadget
  71.     requester - If the gadget has GTYP_REQGADGET set, this must be
  72.         a pointer to a Requester; otherwise the value is
  73.         ignored.
  74.     numGad - How many gadgets should be refreshed. The value
  75.         may range from 0 to MAXLONG. If there are less gadgets
  76.         in the list than numGad, only the gadgets in the
  77.         list will be refreshed.
  78.  
  79.     RESULT
  80.     None.
  81.  
  82.     NOTES
  83.     This function *must not* be called inside a
  84.     BeginRefresh()/EndRefresh() pair.
  85.  
  86.     EXAMPLE
  87.     // Refresh one gadget
  88.     RefreshGList (&gadget, win, NULL, 1);
  89.  
  90.     // Refresh all gadgets in the window
  91.     RefreshGList (win->FirstGadget, win, NULL, -1L);
  92.  
  93.     BUGS
  94.  
  95.     SEE ALSO
  96.  
  97.     INTERNALS
  98.  
  99.     HISTORY
  100.     29-10-95    digulla automatically created from
  101.                 intuition_lib.fd and clib/intuition_protos.h
  102.  
  103. *****************************************************************************/
  104. {
  105.     AROS_LIBFUNC_INIT
  106.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  107.  
  108.     for ( ; gadgets && numGad; gadgets=gadgets->NextGadget, numGad --)
  109.     {
  110.     switch (gadgets->GadgetType & GTYP_GTYPEMASK)
  111.     {
  112.     case GTYP_BOOLGADGET:
  113.         RefreshBoolGadget (gadgets, window, IntuitionBase);
  114.         break;
  115.  
  116.     case GTYP_GADGET0002:
  117.         break;
  118.  
  119.     case GTYP_PROPGADGET:
  120.         RefreshPropGadget (gadgets, window, IntuitionBase);
  121.         break;
  122.  
  123.     case GTYP_STRGADGET:
  124.         break;
  125.  
  126.     case GTYP_CUSTOMGADGET:
  127.         RefreshBoopsiGadget (gadgets, window, IntuitionBase);
  128.         break;
  129.  
  130.     } /* switch GadgetType */
  131.     }
  132.  
  133.     AROS_LIBFUNC_EXIT
  134. } /* RefreshGList */
  135.