5 Copyright 2004, The AROS Development Team. All rights reserved.
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)
30 #define MUIM_IconWindow_BackFill_Register (MUIB_IconWindow | 0x00000010)
31 #define MUIM_IconWindow_BackFill_Setup (MUIB_IconWindow | 0x00000012)
32 #define MUIM_IconWindow_BackFill_Cleanup (MUIB_IconWindow | 0x00000013)
33 #define MUIM_IconWindow_BackFill_ProcessBackground (MUIB_IconWindow | 0x0000001a)
34 #define MUIM_IconWindow_BackFill_DrawBackground (MUIB_IconWindow | 0x0000001b)
36 struct MUIP_IconWindow_BackFill_Register
{STACKULONG MethodID
; struct IconWindow_BackFill_Descriptor
*register_Node
;};
37 struct MUIP_IconWindow_BackFill_Setup
{STACKULONG MethodID
;};
38 struct MUIP_IconWindow_BackFill_Cleanup
{STACKULONG MethodID
; IPTR BackFill_Data
;};
39 struct MUIP_IconWindow_BackFill_ProcessBackground
{STACKULONG MethodID
; IPTR BackFill_Data
; Object
*BackFill_Root
;};
40 struct MUIP_IconWindow_BackFill_DrawBackground
{STACKULONG MethodID
; IPTR BackFill_Data
; struct IconWindowBackFillMsg
*draw_BFM
; IPTR draw_RastPort
;};
41 /*** Private Constants ********************************************************/
43 extern struct MUI_CustomClass
*IconWindow_CLASS
;
45 /*** Private Data Structures ********************************************************/
49 STACKED
struct Layer
*Layer
;
50 STACKED
struct Rectangle Bounds
;
55 struct IconWindowBackFillMsg
57 STACKED
struct Layer
*Layer
;
58 STACKED
struct Rectangle AreaBounds
;
59 STACKED
struct Rectangle DrawBounds
;
64 struct IconWindow_ActionMsg
67 STACKED Object
*iconlist
;
69 STACKED
struct IconList_Click
*click
;
70 STACKED
struct IconList_Drop
*drop
;
71 /* to be continued...*/
74 struct IconWindow_BackFill_Descriptor
78 IPTR (*bfd_MUIM_IconWindow_BackFill_Setup
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_Setup
*);
79 IPTR (*bfd_MUIM_IconWindow_BackFill_Cleanup
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_Cleanup
*);
80 IPTR (*bfd_MUIM_IconWindow_BackFill_ProcessBackground
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_ProcessBackground
*);
81 IPTR (*bfd_MUIM_IconWindow_BackFill_DrawBackground
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_DrawBackground
*);
84 /*** Private Instance Data **********************************************************/
86 struct IconWindow_BackFillHookData
89 Object
*bfhd_IWObject
;
92 struct IconWindow_DATA
95 char iwd_DirectoryPath
[IWD_MAX_DIRECTORYPATHLEN
];
97 char *iwd_ViewSettings_Attrib
;
98 Object
*iwd_ViewSettings_PrefsNotificationObject
;
100 Object
*iwd_RootViewObj
;
101 Object
*iwd_IconListObj
;
103 Object
*iwd_ExtensionContainerObj
;
104 Object
*iwd_ExtensionGroupObj
;
105 Object
*iwd_ExtensionGroupSpacerObj
;
107 Object
*iwd_Toolbar_PrefsNotificationObject
;
109 Object
*iwd_Toolbar_PanelObj
;
110 Object
*iwd_Toolbar_LocationStringObj
;
112 struct Hook iwd_PrefsUpdated_hook
;
113 struct Hook
*iwd_ActionHook
;
114 struct Hook iwd_pathStrHook
;
115 struct Hook iwd_ProcessBackground_hook
;
116 struct Hook
*iwd_BackFill_hook
;
117 struct BackFillInfo
*iwd_BackFillInfo
;
118 struct IconWindow_BackFillHookData iwd_BackFillHookData
;
120 struct TextFont
*iwd_WindowFont
;
122 BOOL iwd_Flag_NEEDSUPDATE
;
123 BOOL iwd_Flag_ISROOT
;
124 BOOL iwd_Flag_ISBACKDROP
;
125 BOOL iwd_Flag_EXT_TOOLBARENABLED
;
128 /*** Macros *****************************************************************/
130 #define SETUP_ICONWINDOW_INST_DATA struct IconWindow_DATA *data = INST_DATA(CLASS, self)
132 #define IconWindowObject BOOPSIOBJMACRO_START(IconWindow_CLASS->mcc_Class)
135 /* this macro is based on the ZUNE_CUSTOMCLASS_10 macros from zune/customclasses.h
136 and temporarily placed here */
137 #define ICONWINDOW_CUSTOMCLASS(name, base, parent_name, parent_class, \
157 __ZUNE_CUSTOMCLASS_START(name) \
158 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m1, m1, m1_msg_type); \
159 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m2, m2, m2_msg_type); \
160 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m3, m3, m3_msg_type); \
161 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m4, m4, m4_msg_type); \
162 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m5, m5, m5_msg_type); \
163 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m6, m6, m6_msg_type); \
164 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m7, m7, m7_msg_type); \
165 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m8, m8, m8_msg_type); \
166 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m9, m9, m9_msg_type); \
167 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m10, m10, m10_msg_type); \
168 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m11, m11, m11_msg_type); \
169 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m12, m12, m12_msg_type); \
170 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m13, m13, m13_msg_type); \
171 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m14, m14, m14_msg_type); \
172 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m15, m15, m15_msg_type); \
173 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m16, m16, m16_msg_type); \
174 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m17, m17, m17_msg_type); \
175 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m18, m18, m18_msg_type); \
176 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m19, m19, m19_msg_type); \
177 __ZUNE_CUSTOMCLASS_END(name, base, parent_name, parent_class) \
179 IPTR IconWindow__MUIM_IconWindow_BackFill_Register(Class *CLASS, Object *self, struct MUIP_IconWindow_BackFill_Register *message);
181 #endif /* _ICONWINDOW_H_ */