5 Copyright 2004 - 2009, 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
{STACKED ULONG MethodID
; STACKED
struct IconWindow_BackFill_Descriptor
*register_Node
;};
37 struct MUIP_IconWindow_BackFill_Setup
{STACKED ULONG MethodID
;};
38 struct MUIP_IconWindow_BackFill_Cleanup
{STACKED ULONG MethodID
; STACKED IPTR BackFill_Data
;};
39 struct MUIP_IconWindow_BackFill_ProcessBackground
{STACKED ULONG MethodID
; STACKED IPTR BackFill_Data
; STACKED Object
*BackFill_Root
;};
40 struct MUIP_IconWindow_BackFill_DrawBackground
{STACKED ULONG MethodID
; STACKED IPTR BackFill_Data
; STACKED
struct IconWindowBackFillMsg
*draw_BFM
; STACKED 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_Event
*drop
;
73 struct IconWindow_BackFill_Descriptor
77 IPTR (*bfd_MUIM_IconWindow_BackFill_Setup
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_Setup
*);
78 IPTR (*bfd_MUIM_IconWindow_BackFill_Cleanup
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_Cleanup
*);
79 IPTR (*bfd_MUIM_IconWindow_BackFill_ProcessBackground
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_ProcessBackground
*);
80 IPTR (*bfd_MUIM_IconWindow_BackFill_DrawBackground
)(Class
*, Object
*, struct MUIP_IconWindow_BackFill_DrawBackground
*);
83 /*** Private Instance Data **********************************************************/
85 struct IconWindow_BackFillHookData
88 Object
*bfhd_IWObject
;
91 struct IconWindow_Panel_Data
93 Object
*iwp_PanelContainerObj
;
94 Object
*iwp_PanelGroupObj
;
95 Object
*iwp_PanelGroupSpacerObj
;
96 IPTR iwp_PanelPrivate
;
99 struct IconWindow_DATA
101 struct Screen
*iwd_Screen
;
103 char iwd_DirectoryPath
[IWD_MAX_DIRECTORYPATHLEN
];
105 char *iwd_ViewSettings_Attrib
;
106 Object
*iwd_ViewSettings_PrefsNotificationObject
;
108 Object
*iwd_RootViewObj
;
109 Object
*iwd_IconListObj
;
111 IPTR iwd_FSNotifyPort
;
112 struct IconWindow_Panel_Data iwd_TopPanel
;
113 struct IconWindow_Panel_Data iwd_LeftPanel
;
114 struct IconWindow_Panel_Data iwd_BottomPanel
;
117 struct Hook iwd_PrefsUpdated_hook
;
118 struct Hook iwd_ProcessBackground_hook
;
120 struct Hook
*iwd_PrefsUpdated_hook
;
121 struct Hook
*iwd_ProcessBackground_hook
;
124 struct Hook
*iwd_ActionHook
;
126 struct Hook
*iwd_BackFill_hook
;
127 struct BackFillInfo
*iwd_BackFillInfo
;
128 struct IconWindow_BackFillHookData iwd_BackFillHookData
;
130 struct TextFont
*iwd_WindowFont
;
132 #define IWDFLAG_SETUP (1<<0)
133 #define IWDFLAG_NEEDSUPDATE (1<<1)
134 #define IWDFLAG_ISROOT (1<<4)
135 #define IWDFLAG_ISBACKDROP (1<<5)
137 UBYTE iwd_VolViewMode
;
140 /*** Macros *****************************************************************/
142 #define SETUP_ICONWINDOW_INST_DATA struct IconWindow_DATA *data = INST_DATA(CLASS, self)
145 #define IconWindowObject BOOPSIOBJMACRO_START(IconWindow_CLASS->mcc_Class)
147 #define IconWindowObject NewObject(IconWindow_CLASS->mcc_Class, NULL
148 //#define IconWindowObject NewObject(IconWindow_Class->mcc_Class, NULL
151 struct iconWindow_Extension
153 struct Node iwe_Node
;
154 IPTR (*iwe_Setup
)(Class
*, Object
*, struct opSet
*);
155 IPTR (*iwe_Cleanup
)(Class
*, Object
*, struct opSet
*);
156 IPTR (*iwe_Set
)(Class
*, Object
*, struct opSet
*);
157 IPTR (*iwe_Get
)(Class
*, Object
*, struct opGet
*);
160 /* this macro is based on the ZUNE_CUSTOMCLASS_10 macros from zune/customclasses.h
161 and temporarily placed here */
162 #define ICONWINDOW_CUSTOMCLASS(name, base, parent_name, parent_class, \
182 __ZUNE_CUSTOMCLASS_START(name) \
183 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m1, m1, m1_msg_type); \
184 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m2, m2, m2_msg_type); \
185 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m3, m3, m3_msg_type); \
186 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m4, m4, m4_msg_type); \
187 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m5, m5, m5_msg_type); \
188 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m6, m6, m6_msg_type); \
189 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m7, m7, m7_msg_type); \
190 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m8, m8, m8_msg_type); \
191 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m9, m9, m9_msg_type); \
192 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m10, m10, m10_msg_type); \
193 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m11, m11, m11_msg_type); \
194 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m12, m12, m12_msg_type); \
195 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m13, m13, m13_msg_type); \
196 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m14, m14, m14_msg_type); \
197 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m15, m15, m15_msg_type); \
198 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m16, m16, m16_msg_type); \
199 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m17, m17, m17_msg_type); \
200 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m18, m18, m18_msg_type); \
201 __ZUNE_CUSTOMCLASS_METHOD(name ## __ ## m19, m19, m19_msg_type); \
202 __ZUNE_CUSTOMCLASS_END(name, base, parent_name, parent_class) \
204 IPTR IconWindow__MUIM_IconWindow_BackFill_Register(Class *CLASS, Object *self, struct MUIP_IconWindow_BackFill_Register *message);
206 #endif /* _ICONWINDOW_H_ */