2 Copyright © 2003-2011, 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
40 struct Library
*MUIMasterBase
;
42 /* On AmigaOS we build a fake library base, because it's not compiled as sharedlibrary yet */
43 #include "muimaster_intern.h"
45 int open_muimaster(void)
47 static struct MUIMasterBase_intern MUIMasterBase_instance
;
48 MUIMasterBase
= (struct Library
*)&MUIMasterBase_instance
;
50 MUIMasterBase_instance
.sysbase
= *((struct ExecBase
**)4);
51 MUIMasterBase_instance
.dosbase
= (void *)OpenLibrary("dos.library", 37);
52 MUIMasterBase_instance
.utilitybase
= (void *)OpenLibrary("utility.library", 37);
53 MUIMasterBase_instance
.aslbase
= OpenLibrary("asl.library", 37);
54 MUIMasterBase_instance
.gfxbase
= (void *)OpenLibrary("graphics.library", 37);
55 MUIMasterBase_instance
.layersbase
= OpenLibrary("layers.library", 37);
56 MUIMasterBase_instance
.intuibase
= (void *)OpenLibrary("intuition.library", 37);
57 MUIMasterBase_instance
.cxbase
= OpenLibrary("commodities.library",37);
58 MUIMasterBase_instance
.keymapbase
= OpenLibrary("keymap.library", 37);
59 MUIMasterBase_instance
.gadtoolsbase
= OpenLibrary("gadtools.library", 37);
60 MUIMasterBase_instance
.iffparsebase
= OpenLibrary("iffparse.library", 37);
61 MUIMasterBase_instance
.diskfontbase
= OpenLibrary("diskfont.library", 37);
62 __zune_prefs_init(&__zprefs
);
63 InitSemaphore(&MUIMB(MUIMasterBase
)->ZuneSemaphore
);
69 int open_muimaster(void)
76 void close_muimaster(void)
80 /****************************************************************
82 *****************************************************************/
94 /****************************************************************
95 Close opened libraries
96 *****************************************************************/
103 /****************************************************************
104 Create a simple label
105 *****************************************************************/
106 Object
*MakeLabel(STRPTR str
)
108 return (MUI_MakeObject(MUIO_Label
, str
, 0));
112 /****************************************************************
113 Easy getting an attributes value
114 *****************************************************************/
115 LONG
xget(Object
* obj
, ULONG attr
)
123 #endif /* _ZUNE_MUISUPPORT_H */