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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: modifyprop.c,v 1.5 1997/01/27 00:36:41 ldp Exp $
  4.     $Log: modifyprop.c,v $
  5.     Revision 1.5  1997/01/27 00:36:41  ldp
  6.     Polish
  7.  
  8.     Revision 1.4  1996/12/10 14:00:05  aros
  9.     Moved #include into first column to allow makedepend to see it.
  10.  
  11.     Revision 1.3  1996/11/08 11:28:03  aros
  12.     All OS function use now Amiga types
  13.  
  14.     Moved intuition-driver protos to intuition_intern.h
  15.  
  16.     Revision 1.2  1996/10/24 15:51:22  aros
  17.     Use the official AROS macros over the __AROS versions.
  18.  
  19.     Revision 1.1  1996/08/28 17:55:35  digulla
  20.     Proportional gadgets
  21.     BOOPSI
  22.  
  23.  
  24.     Desc:
  25.     Lang: english
  26. */
  27. #include "intuition_intern.h"
  28.  
  29. /*****************************************************************************
  30.  
  31.     NAME */
  32. #include <intuition/intuition.h>
  33. #include <proto/intuition.h>
  34.  
  35.     AROS_LH8(void, ModifyProp,
  36.  
  37. /*  SYNOPSIS */
  38.     AROS_LHA(struct Gadget    *, gadget, A0),
  39.     AROS_LHA(struct Window    *, window, A1),
  40.     AROS_LHA(struct Requester *, requester, A2),
  41.     AROS_LHA(ULONG             , flags, D0),
  42.     AROS_LHA(ULONG             , horizPot, D1),
  43.     AROS_LHA(ULONG             , vertPot, D2),
  44.     AROS_LHA(ULONG             , horizBody, D3),
  45.     AROS_LHA(ULONG             , vertBody, D4),
  46.  
  47. /*  LOCATION */
  48.     struct IntuitionBase *, IntuitionBase, 26, Intuition)
  49.  
  50. /*  FUNCTION
  51.     Changes the values in the PropInfo-structure of a proportional
  52.     gadget and refreshes the display.
  53.  
  54.     INPUTS
  55.     gadget - Must be a PROPGADGET
  56.     window - The window which contains the gadget
  57.     requester - If the gadget has GTYP_REQGADGET set, this must be
  58.         non-NULL.
  59.     flags - New flags
  60.     horizPot - New value for the HorizPot field of the PropInfo
  61.     vertPot - New value for the VertPot field of the PropInfo
  62.     horizBody - New value for the HorizBody field of the PropInfo
  63.     vertBody - New value for the VertBody field of the PropInfo
  64.  
  65.     RESULT
  66.     None.
  67.  
  68.     NOTES
  69.     This function causes all gadgets from this gadget to the end of
  70.     the gadget list to be refreshed. If you want a better behaviour,
  71.     use NewModifProp().
  72.  
  73.     EXAMPLE
  74.  
  75.     BUGS
  76.  
  77.     SEE ALSO
  78.     NewModifyProp()
  79.  
  80.     INTERNALS
  81.  
  82.     HISTORY
  83.     29-10-95    digulla automatically created from
  84.                 intuition_lib.fd and clib/intuition_protos.h
  85.  
  86. *****************************************************************************/
  87. {
  88.     AROS_LIBFUNC_INIT
  89.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  90.     struct PropInfo * pi;
  91.  
  92.     if ((gadget->GadgetType & GTYP_GTYPEMASK) != GTYP_PROPGADGET
  93.     || !gadget->SpecialInfo
  94.     )
  95.     return;
  96.  
  97.     pi = gadget->SpecialInfo;
  98.  
  99.     pi->Flags = flags;
  100.     pi->HorizPot = horizPot;
  101.     pi->VertPot = vertPot;
  102.     pi->HorizBody = horizBody;
  103.     pi->VertBody = vertBody;
  104.  
  105.     RefreshGadgets (gadget, window, requester);
  106.  
  107.     AROS_LIBFUNC_EXIT
  108. } /* ModifyProp */
  109.