grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / system / Wanderer / iconwindow.h
blobca35204086f03877d4929dd228b5b80582e66bef
1 #ifndef _ICONWINDOW_H_
2 #define _ICONWINDOW_H_
4 /*
5 Copyright © 2004 - 2011, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <exec/types.h>
10 #include <libraries/mui.h>
12 #include "iconwindow_attributes.h"
14 #include "iconwindowbackfill.h"
16 /*** Public Methods *********************************************************/
18 #define MUIM_IconWindow_Open (MUIB_IconWindow | 0x00000000)
19 #define MUIM_IconWindow_UnselectAll (MUIB_IconWindow | 0x00000001)
21 /*** Private Methods ********************************************************/
23 #define MUIM_IconWindow_DoubleClicked (MUIB_IconWindow | 0x00000002)
24 #define MUIM_IconWindow_IconsDropped (MUIB_IconWindow | 0x00000003)
25 #define MUIM_IconWindow_Clicked (MUIB_IconWindow | 0x00000004)
26 #define MUIM_IconWindow_DirectoryUp (MUIB_IconWindow | 0x00000005)
27 #define MUIM_IconWindow_AppWindowDrop (MUIB_IconWindow | 0x00000006)
28 #define MUIM_IconWindow_Remove (MUIB_IconWindow | 0x00000007)
29 #define MUIM_IconWindow_RateLimitRefresh (MUIB_IconWindow | 0x00000008)
30 #define MUIM_IconWindow_Snapshot (MUIB_IconWindow | 0x00000009)
32 #define MUIM_IconWindow_BackFill_Register (MUIB_IconWindow | 0x00000010)
33 #define MUIM_IconWindow_BackFill_Setup (MUIB_IconWindow | 0x00000012)
34 #define MUIM_IconWindow_BackFill_Cleanup (MUIB_IconWindow | 0x00000013)
35 #define MUIM_IconWindow_BackFill_ProcessBackground (MUIB_IconWindow | 0x0000001a)
36 #define MUIM_IconWindow_BackFill_DrawBackground (MUIB_IconWindow | 0x0000001b)
38 struct MUIP_IconWindow_Snapshot {STACKED ULONG MethidID; STACKED BOOL snapshotall;};
39 struct MUIP_IconWindow_BackFill_Register {STACKED ULONG MethodID; STACKED struct IconWindow_BackFill_Descriptor *register_Node;};
40 struct MUIP_IconWindow_BackFill_Setup {STACKED ULONG MethodID;};
41 struct MUIP_IconWindow_BackFill_Cleanup {STACKED ULONG MethodID; STACKED IPTR BackFill_Data;};
42 struct MUIP_IconWindow_BackFill_ProcessBackground {STACKED ULONG MethodID; STACKED IPTR BackFill_Data; STACKED Object *BackFill_Root;};
43 struct MUIP_IconWindow_BackFill_DrawBackground {STACKED ULONG MethodID; STACKED IPTR BackFill_Data; STACKED struct IconWindowBackFillMsg *draw_BFM; STACKED IPTR draw_RastPort;};
44 /*** Private Constants ********************************************************/
46 extern struct MUI_CustomClass *IconWindow_CLASS;
48 /*** Private Data Structures ********************************************************/
50 struct BackFillMsg
52 STACKED struct Layer *Layer;
53 STACKED struct Rectangle Bounds;
54 STACKED LONG OffsetX;
55 STACKED LONG OffsetY;
58 struct IconWindowBackFillMsg
60 STACKED struct Layer *Layer;
61 STACKED struct Rectangle AreaBounds;
62 STACKED struct Rectangle DrawBounds;
63 STACKED LONG OffsetX;
64 STACKED LONG OffsetY;
67 struct IconWindow_ActionMsg
69 STACKED int type;
70 STACKED Object *iconlist;
71 STACKED int isroot;
72 STACKED struct IconList_Click *click;
73 STACKED struct IconList_Drop_Event *drop;
76 struct IconWindow_BackFill_Descriptor
78 struct Node bfd_Node;
79 char *bfd_BackFillID;
80 IPTR (*bfd_MUIM_IconWindow_BackFill_Setup)(Class *, Object *, struct MUIP_IconWindow_BackFill_Setup *);
81 IPTR (*bfd_MUIM_IconWindow_BackFill_Cleanup)(Class *, Object *, struct MUIP_IconWindow_BackFill_Cleanup *);
82 IPTR (*bfd_MUIM_IconWindow_BackFill_ProcessBackground)(Class *, Object *, struct MUIP_IconWindow_BackFill_ProcessBackground *);
83 IPTR (*bfd_MUIM_IconWindow_BackFill_DrawBackground)(Class *, Object *, struct MUIP_IconWindow_BackFill_DrawBackground *);
86 /*** Private Instance Data **********************************************************/
88 struct IconWindow_BackFillHookData
90 Class *bfhd_IWClass;
91 Object *bfhd_IWObject;
94 struct IconWindow_Panel_Data
96 Object *iwp_PanelContainerObj;
97 Object *iwp_PanelGroupObj;
98 Object *iwp_PanelGroupSpacerObj;
99 IPTR iwp_PanelPrivate;
102 struct IconWindow_DATA
104 struct Screen *iwd_Screen;
105 char *iwd_Title;
106 char iwd_DirectoryPath[IWD_MAX_DIRECTORYPATHLEN];
108 char *iwd_ViewSettings_Attrib;
109 Object *iwd_ViewSettings_PrefsNotificationObject;
111 Object *iwd_RootViewObj;
112 Object *iwd_IconListObj;
114 IPTR iwd_FSNotifyPort;
115 struct IconWindow_Panel_Data iwd_TopPanel;
116 struct IconWindow_Panel_Data iwd_LeftPanel;
117 struct IconWindow_Panel_Data iwd_BottomPanel;
119 #ifdef __AROS__
120 struct Hook iwd_PrefsUpdated_hook;
121 struct Hook iwd_ProcessBackground_hook;
122 #else
123 struct Hook *iwd_PrefsUpdated_hook;
124 struct Hook *iwd_ProcessBackground_hook;
125 #endif
127 struct Hook *iwd_ActionHook;
129 struct Hook *iwd_BackFill_hook;
130 struct BackFillInfo *iwd_BackFillInfo;
131 struct IconWindow_BackFillHookData iwd_BackFillHookData;
133 struct TextFont *iwd_WindowFont;
135 #define IWDFLAG_SETUP (1<<0)
136 #define IWDFLAG_NEEDSUPDATE (1<<1)
137 #define IWDFLAG_ISROOT (1<<4)
138 #define IWDFLAG_ISBACKDROP (1<<5)
139 UBYTE iwd_Flags;
140 UBYTE iwd_VolViewMode;
143 /*** Macros *****************************************************************/
145 #define SETUP_ICONWINDOW_INST_DATA struct IconWindow_DATA *data = INST_DATA(CLASS, self)
147 #ifdef __AROS__
148 #define IconWindowObject BOOPSIOBJMACRO_START(IconWindow_CLASS->mcc_Class)
149 #else
150 #define IconWindowObject NewObject(IconWindow_CLASS->mcc_Class, NULL
151 //#define IconWindowObject NewObject(IconWindow_Class->mcc_Class, NULL
152 #endif
154 struct iconWindow_Extension
156 struct Node iwe_Node;
157 IPTR (*iwe_Setup)(Class *, Object *, struct opSet *);
158 IPTR (*iwe_Cleanup)(Class *, Object *, Msg);
159 IPTR (*iwe_Set)(Class *, Object *, struct opSet *);
160 IPTR (*iwe_Get)(Class *, Object *, struct opGet *);
163 /* this macro is based on the ZUNE_CUSTOMCLASS_10 macros from zune/customclasses.h
164 and temporarily placed here */
165 #define ICONWINDOW_CUSTOMCLASS(name, base, parent_name, parent_class, \
166 m1, m1_msg_type, \
167 m2, m2_msg_type, \
168 m3, m3_msg_type, \
169 m4, m4_msg_type, \
170 m5, m5_msg_type, \
171 m6, m6_msg_type, \
172 m7, m7_msg_type, \
173 m8, m8_msg_type, \
174 m9, m9_msg_type, \
175 m10, m10_msg_type, \
176 m11, m11_msg_type, \
177 m12, m12_msg_type, \
178 m13, m13_msg_type, \
179 m14, m14_msg_type, \
180 m15, m15_msg_type, \
181 m16, m16_msg_type, \
182 m17, m17_msg_type, \
183 m18, m18_msg_type, \
184 m19, m19_msg_type, \
185 m20, m20_msg_type, \
186 m21, m21_msg_type) \
187 __ZUNE_CUSTOMCLASS_START(name) \
188 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m1, m1, m1_msg_type); \
189 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m2, m2, m2_msg_type); \
190 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m3, m3, m3_msg_type); \
191 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m4, m4, m4_msg_type); \
192 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m5, m5, m5_msg_type); \
193 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m6, m6, m6_msg_type); \
194 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m7, m7, m7_msg_type); \
195 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m8, m8, m8_msg_type); \
196 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m9, m9, m9_msg_type); \
197 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m10, m10, m10_msg_type); \
198 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m11, m11, m11_msg_type); \
199 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m12, m12, m12_msg_type); \
200 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m13, m13, m13_msg_type); \
201 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m14, m14, m14_msg_type); \
202 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m15, m15, m15_msg_type); \
203 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m16, m16, m16_msg_type); \
204 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m17, m17, m17_msg_type); \
205 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m18, m18, m18_msg_type); \
206 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m19, m19, m19_msg_type); \
207 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m20, m20, m20_msg_type); \
208 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m21, m21, m21_msg_type); \
209 __ZUNE_CUSTOMCLASS_END(name, base, parent_name, parent_class) \
211 IPTR IconWindow__MUIM_IconWindow_BackFill_Register(Class *CLASS, Object *self, struct MUIP_IconWindow_BackFill_Register *message);
213 #endif /* _ICONWINDOW_H_ */