2 Copyright © 2003, The AROS Development Team.
8 #ifndef _ZUNE_MUISUPPORT_H
9 #define _ZUNE_MUISUPPORT_H
13 #include <exec/memory.h>
15 #include <libraries/asl.h>
16 #include <libraries/mui.h>
17 #include <prefs/prefhdr.h>
19 #include <clib/alib_protos.h>
20 #include <proto/exec.h>
21 #include <proto/dos.h>
22 #include <proto/intuition.h>
23 #include <proto/utility.h>
24 #include <proto/iffparse.h>
27 #include <proto/muimaster.h>
30 Object
*MakeLabel(STRPTR str
);
31 LONG
xget(Object
* obj
, ULONG attr
);
33 #define getstring(obj) (char *) xget(obj, MUIA_String_Contents)
35 #define SimpleText(text) TextObject, MUIA_Text_Contents, (IPTR) text, End
38 struct Library
*MUIMasterBase
;
43 /* On AmigaOS we build a fake library base, because it's not compiled as sharedlibrary yet */
44 #include "muimaster_intern.h"
46 int open_muimaster(void)
48 static struct MUIMasterBase_intern MUIMasterBase_instance
;
49 MUIMasterBase
= (struct Library
*)&MUIMasterBase_instance
;
51 MUIMasterBase_instance
.sysbase
= *((struct ExecBase
**)4);
52 MUIMasterBase_instance
.dosbase
= (void *)OpenLibrary("dos.library", 37);
53 MUIMasterBase_instance
.utilitybase
= (void *)OpenLibrary("utility.library", 37);
54 MUIMasterBase_instance
.aslbase
= OpenLibrary("asl.library", 37);
55 MUIMasterBase_instance
.gfxbase
= (void *)OpenLibrary("graphics.library", 37);
56 MUIMasterBase_instance
.layersbase
= OpenLibrary("layers.library", 37);
57 MUIMasterBase_instance
.intuibase
= (void *)OpenLibrary("intuition.library", 37);
58 MUIMasterBase_instance
.cxbase
= OpenLibrary("commodities.library",37);
59 MUIMasterBase_instance
.keymapbase
= OpenLibrary("keymap.library", 37);
60 MUIMasterBase_instance
.gadtoolsbase
= OpenLibrary("gadtools.library", 37);
61 MUIMasterBase_instance
.iffparsebase
= OpenLibrary("iffparse.library", 37);
62 MUIMasterBase_instance
.diskfontbase
= OpenLibrary("diskfont.library", 37);
63 __zune_prefs_init(&__zprefs
);
64 InitSemaphore(&MUIMB(MUIMasterBase
)->ZuneSemaphore
);
68 void close_muimaster(void)
74 int open_muimaster(void)
76 if ((MUIMasterBase
= OpenLibrary("muimaster.library", 0))) return 1;
80 void close_muimaster(void)
82 if (MUIMasterBase
) CloseLibrary(MUIMasterBase
);
88 /****************************************************************
90 *****************************************************************/
101 /****************************************************************
102 Close opened libraries
103 *****************************************************************/
104 void close_libs(void)
110 /****************************************************************
111 Create a simple label
112 *****************************************************************/
113 Object
*MakeLabel(STRPTR str
)
115 return (MUI_MakeObject(MUIO_Label
, str
, 0));
119 /****************************************************************
120 Easy getting an attributes value
121 *****************************************************************/
122 LONG
xget(Object
* obj
, ULONG attr
)
130 #endif /* _ZUNE_MUISUPPORT_H */