From 005fd7e38f07f3fd91d329146166e4726adb2c69 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 13 Mar 2015 16:19:13 +0000 Subject: [PATCH] - Made MUIA_Colorfield_Pen settable (an undocumented MUI feature). - Added AutoDocs for all attributes. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50196 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/libs/muimaster/classes/colorfield.c | 86 +++++++++++++++++++++++- workbench/libs/muimaster/classes/colorfield.conf | 4 +- workbench/libs/muimaster/classes/colorfield.h | 4 +- 3 files changed, 87 insertions(+), 7 deletions(-) diff --git a/workbench/libs/muimaster/classes/colorfield.c b/workbench/libs/muimaster/classes/colorfield.c index 922a9b9066..97ac26bbaa 100644 --- a/workbench/libs/muimaster/classes/colorfield.c +++ b/workbench/libs/muimaster/classes/colorfield.c @@ -1,5 +1,5 @@ /* - Copyright © 2002-2003, The AROS Development Team. All rights reserved. + Copyright © 2002-2015, The AROS Development Team. All rights reserved. $Id$ */ @@ -36,6 +36,86 @@ extern struct Library *MUIMasterBase; #define FLAG_NO_PEN 4 +/****** Colorfield.mui/MUIA_Colorfield_Pen *********************************** +* +* NAME +* MUIA_Colorfield_Pen -- (V4) [ISG], ULONG +* +* FUNCTION +* The used pen. If not set explicitly, a new one is obtained +* automatically. +* +* This attribute was incorrectly documented as gettable-only in the MUI +* documentation. +* +****************************************************************************** +* +*/ + +/****** Colorfield.mui/MUIA_Colorfield_Red *********************************** +* +* NAME +* MUIA_Colorfield_Red -- (V4) [ISG], ULONG +* +* FUNCTION +* The red component of the color field as an unsigned 32-bit value +* (0 to 0xFFFFFFFF). +* +* SEE ALSO +* MUIA_Colorfield_RGB, MUIA_Colorfield_Green, MUIA_Colorfield_Blue +* +****************************************************************************** +* +*/ + +/****** Colorfield.mui/MUIA_Colorfield_Green ********************************* +* +* NAME +* MUIA_Colorfield_Green -- (V4) [ISG], ULONG +* +* FUNCTION +* The green component of the color field as an unsigned 32-bit value +* (0 to 0xFFFFFFFF). +* +* SEE ALSO +* MUIA_Colorfield_RGB, MUIA_Colorfield_Red, MUIA_Colorfield_Blue +* +****************************************************************************** +* +*/ + +/****** Colorfield.mui/MUIA_Colorfield_Blue ********************************** +* +* NAME +* MUIA_Colorfield_Blue -- (V4) [ISG], ULONG +* +* FUNCTION +* The blue component of the color field as an unsigned 32-bit value +* (0 to 0xFFFFFFFF). +* +* SEE ALSO +* MUIA_Colorfield_RGB, MUIA_Colorfield_Red, MUIA_Colorfield_Green +* +****************************************************************************** +* +*/ + +/****** Colorfield.mui/MUIA_Colorfield_RGB *********************************** +* +* NAME +* MUIA_Colorfield_RGB -- (V4) [ISG], ULONG * +* +* FUNCTION +* The red, green and blue components of the color field as an array of +* unsigned 32-bit values (0 to 0xFFFFFFFF). +* +* SEE ALSO +* MUIA_Colorfield_Red, MUIA_Colorfield_Green, MUIA_Colorfield_Blue +* +****************************************************************************** +* +*/ + IPTR Colorfield__OM_NEW(struct IClass *cl, Object *obj, struct opSet *msg) { struct Colorfield_DATA *data; @@ -129,7 +209,7 @@ IPTR Colorfield__OM_SET(struct IClass *cl, Object *obj, ReleasePen(_screen(obj)->ViewPort.ColorMap, data->pen); data->flags &= ~(FLAG_PEN_ALLOCATED | FLAG_NO_PEN); } - data->pen = (UBYTE) data->pen; + data->pen = (UBYTE) tag->ti_Data; data->flags |= FLAG_FIXED_PEN; break; @@ -206,7 +286,7 @@ IPTR Colorfield__MUIM_Setup(struct IClass *cl, Object *obj, LONG pen; pen = ObtainPen(_screen(obj)->ViewPort.ColorMap, - (ULONG) - 1, + (ULONG) -1, data->rgb[0], data->rgb[1], data->rgb[2], PENF_EXCLUSIVE); if (pen == -1) diff --git a/workbench/libs/muimaster/classes/colorfield.conf b/workbench/libs/muimaster/classes/colorfield.conf index 18418b8ec4..017f3f8664 100644 --- a/workbench/libs/muimaster/classes/colorfield.conf +++ b/workbench/libs/muimaster/classes/colorfield.conf @@ -1,7 +1,7 @@ ##begin config basename Colorfield -version 1.1 -date 06.07.2003 +version 1.2 +date 13.3.2015 superclass MUIC_Area classdatatype struct Colorfield_DATA ##end config diff --git a/workbench/libs/muimaster/classes/colorfield.h b/workbench/libs/muimaster/classes/colorfield.h index f6541e85e9..b7a6e7c40b 100644 --- a/workbench/libs/muimaster/classes/colorfield.h +++ b/workbench/libs/muimaster/classes/colorfield.h @@ -1,5 +1,5 @@ /* - Copyright © 2002-2003, The AROS Development Team. All rights reserved. + Copyright © 2002-2015, The AROS Development Team. All rights reserved. $Id$ */ @@ -13,7 +13,7 @@ #define MUIB_Colorfield (MUIB_ZUNE | 0x00000800) /*** Attributes *************************************************************/ -#define MUIA_Colorfield_Pen (MUIB_MUI | 0x0042713a) /* ..g ULONG */ +#define MUIA_Colorfield_Pen (MUIB_MUI | 0x0042713a) /* isg ULONG */ #define MUIA_Colorfield_Red (MUIB_MUI | 0x004279f6) /* isg ULONG */ #define MUIA_Colorfield_Green (MUIB_MUI | 0x00424466) /* isg ULONG */ #define MUIA_Colorfield_Blue (MUIB_MUI | 0x0042d3b0) /* isg ULONG */ -- 2.11.4.GIT