revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / reqtools / reqtoolsstringify.c
blob8c56405e61440fe8f250d4795069f09ea0c45bac
1 /*
2 Copyright © 2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 0
7 #include <aros/debug.h>
9 #include <proto/alib.h>
10 #include <proto/intuition.h>
11 #include <proto/utility.h>
12 #include <proto/muimaster.h>
14 #include <libraries/mui.h>
15 #include <zune/customclasses.h>
17 #include <stdio.h>
19 #include "reqtoolsstringify.h"
21 struct ReqToolsStringify_DATA
23 UWORD Type;
24 char buf[5];
28 static IPTR ReqToolsStringify__OM_NEW(Class * cl, Object * obj, struct opSet * msg)
30 D(bug("[ReqToolsEditor.class] %s()\n", __PRETTY_FUNCTION__));
32 obj = (Object*) DoSuperMethodA(cl, obj, (Msg)msg);
34 if (obj != NULL)
36 #if (0)
37 struct ReqToolsStringify_DATA *data = INST_DATA(cl,obj);
38 #endif
40 return (IPTR) obj;
44 static IPTR ReqToolsStringify__MUIM_Numeric_Stringify(Class * cl, Object * obj, struct MUIP_Numeric_Stringify *msg)
46 struct ReqToolsStringify_DATA *data = INST_DATA(cl,obj);
48 D(bug("[ReqToolsEditor.class] %s()\n", __PRETTY_FUNCTION__));
50 sprintf((char *)data->buf, "%3d%%", (int)msg->value);
52 return (IPTR)data->buf;
56 ZUNE_CUSTOMCLASS_2
58 ReqToolsStringify, NULL, MUIC_Slider, NULL,
59 OM_NEW, struct opSet *,
60 MUIM_Numeric_Stringify, struct MUIP_Numeric_Stringify *