Converted expat_au.library into the OS3, OS4 and MorphOS-compatible
[AROS.git] / workbench / prefs / palette / main.c
blob66bac4f9217cd8afc78dfd3e87e8b5f486929983
1 /*
2 Copyright © 2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 /*********************************************************************************************/
11 #define MUIMASTER_YES_INLINE_STDARG
13 #include <proto/alib.h>
14 #include <proto/intuition.h>
15 #include <proto/muimaster.h>
16 #include <proto/utility.h>
17 #include <proto/dos.h>
19 #include <stdlib.h> /* for exit() */
20 #include <stdio.h>
21 #include <string.h>
23 #include <intuition/intuition.h>
24 #include <intuition/gadgetclass.h>
26 #include <libraries/mui.h>
27 #include <zune/systemprefswindow.h>
29 #include <prefs/palette.h>
31 #include "locale.h"
32 #include "paleditor.h"
33 #include "args.h"
34 #include "prefs.h"
36 /* #define DEBUG 1 */
37 #include <aros/debug.h>
39 #define VERSION "$VER: Palette 1.1 (04.11.2011) AROS Dev Team"
40 /*********************************************************************************************/
42 int main(int argc, char **argv)
44 Object *application;
45 Object *window;
47 Locale_Initialize();
49 /* init */
50 if (ReadArguments(argc, argv))
52 if (ARG(USE) || ARG(SAVE))
54 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
56 else
58 application = (Object *)ApplicationObject,
59 MUIA_Application_Title, __(MSG_WINTITLE),
60 MUIA_Application_Version, (IPTR) VERSION,
61 MUIA_Application_Description, __(MSG_WINTITLE),
62 MUIA_Application_Base, (IPTR) "PALETTEPREF",
63 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
64 MUIA_Window_ID, ID_PALT,
65 WindowContents, (IPTR) PalEditorObject,
66 End,
67 End),
68 End;
70 if (application != NULL)
72 SET(window, MUIA_Window_Open, TRUE);
73 DoMethod(application, MUIM_Application_Execute);
75 MUI_DisposeObject(application);
78 FreeArguments();
81 Locale_Deinitialize();
82 return 0;
85 /*********************************************************************************************/