home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / intuition / refreshglist.c < prev    next >
C/C++ Source or Header  |  1997-01-27  |  4KB  |  141 lines

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