Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / muimaster / staticlib / mui_makeobject.c
blobd43642904e60ddd40648b712ecab5558653702cc
1 /*
2 Copyright © 2002, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <stdarg.h>
10 /*****************************************************************************
12 NAME */
13 #define NO_INLINE_STDARG /* turn off inline def */
14 #include <proto/muimaster.h>
15 extern struct Library * MUIMasterBase;
17 Object * MUI_MakeObject (
19 /* SYNOPSIS */
20 LONG type,
21 ...)
23 /* FUNCTION
25 INPUTS
27 RESULT
29 NOTES
31 EXAMPLE
33 BUGS
35 SEE ALSO
37 INTERNALS
39 HISTORY
41 *****************************************************************************/
43 va_list args;
44 IPTR param[4];
45 WORD i, numparams = 0;
47 switch(type)
49 case 2: /* MUIO_Button */
50 case 3: /* MUIO_CheckMark */
51 case 8: /* MUIO_PopButton */
52 case 9: /* MUIO_HSpace */
53 case 10: /* MUIO_VSpace */
54 case 11: /* MUIO_HBar */
55 case 12: /* MUIO_VBar */
56 case 15: /* MUIO_BarTitle */
57 numparams = 1;
58 break;
60 case 1: /* MUIO_Label */
61 case 4: /* MUIO_Cycle */
62 case 5: /* MUIO_Radio */
63 case 7: /* MUIO_String */
64 case 13: /* MUIO_MenustripNM */
65 case 112: /* MUIO_ImageButton */
66 numparams = 2;
67 break;
69 case 6: /* MUIO_Slider */
70 case 111: /* MUIO_CoolButton */
71 numparams = 3;
72 break;
74 case 14: /* MUIO_MenuItem */
75 case 16: /* MUIO_NumericButton */
76 numparams = 4;
77 break;
80 if (numparams == 0) return NULL;
82 va_start(args, type);
84 for(i = 0; i < numparams; i++)
86 param[i] = va_arg(args, IPTR);
89 va_end (args);
91 return MUI_MakeObjectA(type, param);
93 } /* MUI_MakeObject */