home *** CD-ROM | disk | FTP | other *** search
- (*
- (* $VER: Gadgets.mod 39.108 (22.05.93)
- ** derived from
- ** colorwheel.h 39.2 (22.06.92)
- ** gradientslider.h 39.1 (18.06.92)
- ** (Includes Release 39.108)
- **
- ** (C) Copyright 1991-1992 Commodore-Amiga, Inc.
- ** All Rights Reserved
- **
- ** (C) Copyright Oberon Interface 1993 by hartmut Goebel
- *) All Rights Reserved
- *)
-
- MODULE Gadgets;
-
- IMPORT
- e * := Exec,
- u * := Utility;
-
- (*****************************************************************************)
- CONST
- colorWheelName * = "colorwheel.gadget";
-
- TYPE
-
- ColorWheelHSBPtr *= UNTRACED POINTER TO ColorWheelHSB;
- ColorWheelRGBPtr *= UNTRACED POINTER TO ColorWheelRGB;
-
- (* For use with the WHEEL_HSB tag *)
- ColorWheelHSB * = STRUCT
- hue * : LONGINT;
- saturation * : LONGINT;
- brightness * : LONGINT;
- END;
-
- (* For use with the WHEEL_RGB tag *)
- ColorWheelRGB * = STRUCT
- red * : LONGINT;
- green * : LONGINT;
- blue * : LONGINT;
- END;
-
-
- (*****************************************************************************)
- CONST
-
- wheelDummy * = u.user+04000000H;
- wheelHue * = wheelDummy+1; (* set/get Hue *)
- wheelSaturation * = wheelDummy+2; (* set/get Saturation *)
- wheelBrightness * = wheelDummy+3; (* set/get Brightness *)
- wheelHSB * = wheelDummy+4; (* set/get ColorWheelHSB *)
- wheelRed * = wheelDummy+5; (* set/get Red *)
- wheelGreen * = wheelDummy+6; (* set/get Green *)
- wheelBlue * = wheelDummy+7; (* set/get Blue *)
- wheelRGB * = wheelDummy+8; (* set/get ColorWheelRGB *)
- wheelScreen * = wheelDummy+9; (* init screen/enviroment *)
- wheelAbbrv * = wheelDummy+10; (* "GCBMRY" if English *)
- wheelDonation * = wheelDummy+11; (* colors donated by app *)
- wheelBevelBox * = wheelDummy+12; (* inside a bevel box *)
- wheelGradientSlider * = wheelDummy+13; (* attached gradient slider *)
- wheelMaxPens * = wheelDummy+14; (* max # of pens to allocate *)
-
-
- (*****************************************************************************)
-
-
- gradDummy * = u.user+005000000H;
- gradMaxVal * = gradDummy+1; (* max value of slider *)
- gradCurVal * = gradDummy+2; (* current value of slider *)
- gradSkipVal * = gradDummy+3; (* "body click" move amount *)
- gradKnobPixels * = gradDummy+4; (* size of knob in pixels *)
- gradPenArray * = gradDummy+5; (* pen colors *)
-
-
- (*****************************************************************************)
-
- VAR
- cwBase * : e.LibraryPtr;
-
- (*--- functions in V39 or higher (beta release for developers only) ---*)
-
- (* Public entries *)
-
- PROCEDURE ConvertHSBToRGB *{cwBase,-01EH}(hsb{8} : ColorWheelHSB;
- VAR rgb{9}: ColorWheelRGB);
- PROCEDURE ConvertRGBToHSB *{cwBase,-024H}(rgb{8} : ColorWheelRGB;
- VAR hsb{9}: ColorWheelHSB);
-
- BEGIN
- cwBase := e.OpenLibrary(colorWheelName,39);
- CLOSE
- IF cwBase # NIL THEN e.CloseLibrary(cwBase); END;
-
- END Gadgets.
-