2 Copyright © 1995-1997 Stefan Stuntz.
3 Copyright © 2009, The AROS Development Team.
13 #include <exec/memory.h>
14 #include <prefs/prefhdr.h>
15 #include <datatypes/pictureclass.h>
16 #include <libraries/locale.h>
17 #include <libraries/asl.h>
18 #include <libraries/gadtools.h>
20 #include <libraries/mui.h>
21 #include <libraries/muiscreen.h>
23 #include <proto/exec.h>
24 #include <proto/graphics.h>
25 #include <proto/intuition.h>
26 #include <proto/utility.h>
27 #include <proto/dos.h>
28 #include <proto/locale.h>
29 #include <proto/muimaster.h>
30 #include <proto/muiscreen.h>
31 #include <proto/alib.h>
32 #include <proto/asl.h>
33 #include <aros/debug.h>
36 #define CATCOMP_NUMBERS
40 #define USE_PSI_SIZES_BODY
41 #define USE_PSI_SIZES_COLORS
42 #include "psi_sizes.bh"
44 #define USE_PSI_COLORS_BODY
45 #include "psi_colors.bh"
47 #define USE_PSI_FREQS_BODY
48 #include "psi_freqs.bh"
50 /****************************************************************************/
51 /* Some Definitions */
52 /****************************************************************************/
54 #define MUISERIALNR_STUNTZI 1
55 #define TAGBASE_STUNTZI (TAG_USER | ( MUISERIALNR_STUNTZI << 16))
57 #define MUIA_DispIDinfo_ID (TAGBASE_STUNTZI | 0x1010)
59 #define MUIA_DispIDlist_CurrentID (TAGBASE_STUNTZI | 0x1020)
60 #define MUIA_DispIDlist_Quiet (TAGBASE_STUNTZI | 0x1021)
61 #define MUIM_DispIDlist_Change (TAGBASE_STUNTZI | 0x1022)
63 #define MUIM_EditPanel_SetScreen (TAGBASE_STUNTZI | 0x1030)
64 #define MUIM_EditPanel_GetScreen (TAGBASE_STUNTZI | 0x1031)
65 #define MUIM_EditPanel_Update (TAGBASE_STUNTZI | 0x1032)
66 #define MUIM_EditPanel_DefColors (TAGBASE_STUNTZI | 0x1035)
68 #define MUIM_EditPanel_ToggleForeign (TAGBASE_STUNTZI | 0x1036)
71 #define MUIA_EditWindow_Title (TAGBASE_STUNTZI | 0x1040)
72 #define MUIA_EditWindow_Originator (TAGBASE_STUNTZI | 0x1041)
73 #define MUIM_EditWindow_Close (TAGBASE_STUNTZI | 0x1042)
75 #define MUIM_ScreenList_Save (TAGBASE_STUNTZI | 0x1050)
76 #define MUIM_ScreenList_Load (TAGBASE_STUNTZI | 0x1051)
77 #define MUIM_ScreenList_Find (TAGBASE_STUNTZI | 0x1052)
79 #define MUIM_ScreenPanel_Create (TAGBASE_STUNTZI | 0x1060)
80 #define MUIM_ScreenPanel_Copy (TAGBASE_STUNTZI | 0x1061)
81 #define MUIM_ScreenPanel_Delete (TAGBASE_STUNTZI | 0x1062)
82 #define MUIM_ScreenPanel_Edit (TAGBASE_STUNTZI | 0x1063)
83 #define MUIM_ScreenPanel_Finish (TAGBASE_STUNTZI | 0x1064)
84 #define MUIM_ScreenPanel_CloseWindows (TAGBASE_STUNTZI | 0x1065)
85 #define MUIM_ScreenPanel_SetStates (TAGBASE_STUNTZI | 0x1066)
86 #define MUIM_ScreenPanel_Open (TAGBASE_STUNTZI | 0x1067)
87 #define MUIM_ScreenPanel_Close (TAGBASE_STUNTZI | 0x1068)
88 #define MUIM_ScreenPanel_Jump (TAGBASE_STUNTZI | 0x1069)
89 #define MUIM_ScreenPanel_Update (TAGBASE_STUNTZI | 0x106a)
90 #define MUIM_ScreenPanel_Foo (TAGBASE_STUNTZI | 0x106b)
92 #define MUIM_MainWindow_Finish (TAGBASE_STUNTZI | 0x1070)
93 #define MUIM_MainWindow_About (TAGBASE_STUNTZI | 0x1071)
94 #define MUIM_MainWindow_Restore (TAGBASE_STUNTZI | 0x1072)
95 #define MUIM_MainWindow_Open (TAGBASE_STUNTZI | 0x1073)
96 #define MUIM_MainWindow_SaveAs (TAGBASE_STUNTZI | 0x1074)
98 #define MUIM_ColorEdit_SetColors (TAGBASE_STUNTZI | 0x1082)
99 #define MUIM_ColorEdit_GetColors (TAGBASE_STUNTZI | 0x1083)
101 struct MUIP_EditPanel_SetScreen
{ STACKED ULONG MethodID
; STACKED
struct MUI_PubScreenDesc
*desc
; };
102 struct MUIP_EditPanel_GetScreen
{ STACKED ULONG MethodID
; STACKED
struct MUI_PubScreenDesc
*desc
; };
103 struct MUIP_EditPanel_Update
{ STACKED ULONG MethodID
; STACKED LONG level
; };
104 struct MUIP_EditPanel_DefColors
{ STACKED ULONG MethodID
; STACKED LONG nr
; };
106 struct MUIP_ScreenList_Save
{ STACKED ULONG MethodID
; STACKED
char *name
; };
107 struct MUIP_ScreenList_Load
{ STACKED ULONG MethodID
; STACKED
char *name
; STACKED LONG clear
; };
108 struct MUIP_ScreenList_Find
{ STACKED ULONG MethodID
; STACKED
char *name
; STACKED
struct MUI_PubScreenDesc
**desc
; };
110 struct MUIP_ScreenPanel_Finish
{ STACKED ULONG MethodID
; Object
*win
; LONG ok
; };
112 struct MUIP_MainWindow_Finish
{ STACKED ULONG MethodID
; STACKED LONG level
; };
113 struct MUIP_MainWindow_Restore
{ STACKED ULONG MethodID
; STACKED LONG envarc
; };
114 struct MUIP_MainWindow_Open
{ STACKED ULONG MethodID
; STACKED LONG append
; };
116 struct MUIP_ColorEdit_SetColors
{ STACKED ULONG MethodID
; STACKED
struct MUI_RGBcolor
*palette
; STACKED BYTE
*syspens
; STACKED
struct MUI_PenSpec
*muipens
; };
117 struct MUIP_ColorEdit_GetColors
{ STACKED ULONG MethodID
; STACKED
struct MUI_RGBcolor
*palette
; STACKED BYTE
*syspens
; STACKED
struct MUI_PenSpec
*muipens
; };
119 #define RectangleWidth(r) ((r).MaxX-(r).MinX+1)
120 #define RectangleHeight(r) ((r).MaxY-(r).MinY+1)
122 #define SYSPEN_OFFSET 1
123 #define MUIPEN_OFFSET 1
125 #define ForEntries(list,entry,succ) for (entry=(APTR)((struct Node *)(((struct List *)list)->lh_Head));succ=(APTR)((struct Node *)entry)->ln_Succ;entry=(APTR)succ)