|##########|
|#MAGIC   #|DBGFFBIO
|#PROJECT #|""
|#PATHS   #|"EGSProject"
|#FLAGS   #|xx---x--x-----x-----------------
|#USERSW  #|--------------------------------
|#USERMASK#|--------------------------------
|#SWITCHES#|x----x----------
|##########|
DEFINITION MODULE GBColorPot;

FROM System IMPORT LONGSET,Regs;
IMPORT EGSIntui  AS I;
IMPORT EGSGadBox  AS GB;
FROM Exec IMPORT LibraryPtr;
FROM IntuiGfx IMPORT IntuiGfxPtr;
FROM EGS      IMPORT CLUEntry;

CONST
  ColorKEY       = LONGINT("C") SHL 24+
                   LONGINT("O") SHL 16+
                   LONGINT("L") SHL 8+
                   LONGINT("R");

TYPE
  ColorPotGadPtr = POINTER TO ColorPotGadget;
  ColorPotGadget = RECORD OF I.MasterGadget;
                     drop  : I.DropGadPtr;
                     drag  : I.GadgetPtr;
                     draw  : IntuiGfxPtr;
                     color : CLUEntry;
                     w     : INTEGER;
                   END;


VAR GBColorPotBase : LibraryPtr;

LIBRARY GBColorPotBase BY - 30
    PROCEDURE CreateColorPotGadget(con IN A0 : GB.GadContext;
                                   id  IN D0 : LONGINT;
                                   r   IN D1,
                                   g   IN D2,
                                   b   IN D3 : INTEGER):GB.GadBoxPtr;

LIBRARY GBColorPotBase BY - 36
    PROCEDURE ModifyColorPotGadget(win IN A0 : I.WindowPtr;
                                   gad IN A1 : I.GadgetPtr;
                                   r   IN D0,
                                   g   IN D1,
                                   b   IN D2 : INTEGER);

LIBRARY GBColorPotBase BY - 42
    PROCEDURE GCSetColorValue(con IN A0 : GB.GadContext;
                              id  IN D0 : LONGINT;
                              r   IN D1,
                              g   IN D2,
                              b   IN D2 : INTEGER);

LIBRARY GBColorPotBase BY - 48
    PROCEDURE GCGetColorValue(con IN A0 : GB.GadContext;
                              id  IN D0 : LONGINT):LONGINT;

END GBColorPot.


