grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / system / Wanderer / Classes / iconlist.h
blob5da4059135ed16fa9848b49ec94c395c1a96ad3d
1 #ifndef _MUI_CLASSES_ICONLIST_H
2 #define _MUI_CLASSES_ICONLIST_H
4 /*
5 Copyright 2002-2010, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <string.h>
10 #include <stdlib.h>
11 #include <stdio.h>
12 #include <time.h>
13 #include <math.h>
14 #include <stdarg.h>
15 #include <exec/types.h>
16 #include <exec/memory.h>
17 #include <dos/dos.h>
18 #include <intuition/intuitionbase.h>
19 #include <intuition/classusr.h>
20 #include <clib/alib_protos.h>
21 #include <utility/utility.h>
22 #include <dos/dosextens.h>
23 #include <libraries/mui.h>
24 #include <clib/alib_protos.h>
25 #include <proto/exec.h>
26 #include <proto/dos.h>
27 #include <proto/muimaster.h>
28 #include <proto/intuition.h>
30 #include "iconlist_attributes.h"
32 /****************************************************************************/
33 /*** Name *******************************************************************/
34 #define MUIC_IconList "IconList.mui"
36 /*** Methods ****************************************************************/
37 #define MUIM_IconList_Clear (MUIB_IconList | 0x00000000)
38 #define MUIM_IconList_Update (MUIB_IconList | 0x00000001)
39 #define MUIM_IconList_RethinkDimensions (MUIB_IconList | 0x00000002)
40 #define MUIM_IconList_CreateEntry (MUIB_IconList | 0x00000010) /* returns 0 For Failure or (struct IconEntry *) */
41 #define MUIM_IconList_UpdateEntry (MUIB_IconList | 0x00000011) /* returns 0 For Failure or (struct IconEntry *) */
42 #define MUIM_IconList_DestroyEntry (MUIB_IconList | 0x00000012)
43 #define MUIM_IconList_PropagateEntryPos (MUIB_IconList | 0x00000013)
44 #define MUIM_IconList_DrawEntry (MUIB_IconList | 0x00000020)
45 #define MUIM_IconList_DrawEntryLabel (MUIB_IconList | 0x00000021)
46 #define MUIM_IconList_MakeEntryVisible (MUIB_IconList | 0x00000024)
47 #define MUIM_IconList_SelectAll (MUIB_IconList | 0x00000030)
48 #define MUIM_IconList_UnselectAll (MUIB_IconList | 0x00000031)
49 #define MUIM_IconList_NextIcon (MUIB_IconList | 0x00000034)
50 #define MUIM_IconList_Sort (MUIB_IconList | 0x00000040)
51 #define MUIM_IconList_CoordsSort (MUIB_IconList | 0x00000041)
52 #define MUIM_IconList_PositionIcons (MUIB_IconList | 0x00000042)
53 #define MUIM_IconList_GetIconPrivate (MUIB_IconList | 0x000000FF)
55 struct MUIP_IconList_Clear {STACKED ULONG MethodID;};
56 struct MUIP_IconList_Update {STACKED ULONG MethodID;};
57 struct MUIP_IconList_RethinkDimensions {STACKED ULONG MethodID; STACKED struct IconEntry *singleicon;};
58 struct MUIP_IconList_CreateEntry {STACKED ULONG MethodID; STACKED STRPTR filename; STACKED STRPTR label; STACKED struct FileInfoBlock *fib; STACKED struct DiskObject *entry_dob; STACKED ULONG type; STACKED APTR udata;};
59 struct MUIP_IconList_UpdateEntry {STACKED ULONG MethodID; STACKED struct IconEntry *entry; STACKED STRPTR filename; STACKED STRPTR label; STACKED struct FileInfoBlock *fib; STACKED struct DiskObject *entry_dob; STACKED ULONG type;};
60 struct MUIP_IconList_DestroyEntry {STACKED ULONG MethodID; STACKED struct IconEntry *entry;};
61 struct MUIP_IconList_PropagateEntryPos {STACKED ULONG MethodID; STACKED struct IconEntry *entry;};
62 struct MUIP_IconList_DrawEntry {STACKED ULONG MethodID; STACKED struct IconEntry *entry; STACKED IPTR drawmode;};
63 struct MUIP_IconList_DrawEntryLabel {STACKED ULONG MethodID; STACKED struct IconEntry *entry; STACKED IPTR drawmode;};
64 struct MUIP_IconList_NextIcon {STACKED ULONG MethodID; STACKED IPTR nextflag; STACKED struct IconList_Entry **entry;};
65 struct MUIP_IconList_Sort {STACKED ULONG MethodID;};
66 struct MUIP_IconList_PositionIcons {STACKED ULONG MethodID;};
67 struct MUIP_IconList_MakeEntryVisible {STACKED ULONG MethodID; STACKED struct IconEntry *entry;};
68 struct MUIP_IconList_GetIconPrivate {STACKED ULONG MethodID; STACKED struct IconList_Entry *entry;}; /* *entry must be a valid Icon */
70 /* used by MUIM_IconList_NextIcon */
71 struct IconList_Entry
73 struct IconEntry *ile_IconEntry;
74 char *label; /* The label which is displayed (often FilePart(filename)) */
75 LONG type;
76 void *udata;
79 #define ILE_TYPE_APPICON 10
80 #define ILE_TYPE_CUSTOM (ILE_TYPE_APPICON + 1)
82 struct IconList_Click
84 int shift; /* TRUE for shift click */
85 struct IconList_Entry *entry; /* might be NULL */
88 struct IconList_Drop_SourceEntry
90 struct Node dropse_Node;
93 struct IconList_Drop_Event
95 struct List drop_SourceList; /* iconlist obj */
96 Object *drop_TargetObj; /* iconlist obj */
97 STRPTR drop_TargetPath; /* destination path */
100 struct IconEntry
102 struct Node ie_IconNode;
103 struct Node ie_SelectionNode;
105 struct IconList_Entry ie_IconListEntry;
107 struct DiskObject *ie_DiskObj; /* The icons disk objects */
108 struct FileInfoBlock *ie_FileInfoBlock;
110 LONG ie_IconX, /* Top Left Co-ords of Icons "AREA" */
111 ie_IconY,
112 ie_ProvidedIconX, /* Co-ords of last known "provided" position */
113 ie_ProvidedIconY;
115 ULONG ie_IconWidth, /* Width/Height of Icon "Image" */
116 ie_IconHeight,
117 ie_AreaWidth, /* Width/Height of Icon "AREA" .. */
118 ie_AreaHeight; /* if the icons Label Width is larger than
119 ie_IconWidth, AreaWidth = the icons label Width
120 else it will be the same as ie_IconWidth */
122 ULONG ie_Flags;
124 UBYTE *ie_TxtBuf_DisplayedLabel;
125 ULONG ie_SplitParts;
126 ULONG ie_TxtBuf_DisplayedLabelWidth;
127 UBYTE *ie_TxtBuf_DATE;
128 ULONG ie_TxtBuf_DATEWidth;
129 UBYTE *ie_TxtBuf_TIME;
130 ULONG ie_TxtBuf_TIMEWidth;
131 UBYTE *ie_TxtBuf_SIZE;
132 ULONG ie_TxtBuf_SIZEWidth;
133 UBYTE *ie_TxtBuf_PROT;
136 APTR *ie_User1; /* Pointer to data provided by user */
139 /* Note:
140 * ie_Icon[X|Y] vs ie_ProvidedIcon[X|Y]
142 * ie_Icon[X|Y] always contains the current position in rendering view
143 * ie_ProvidedIcon[X|Y] has following fixed characteristics:
144 * a) is it set to do_Currect[X|Y] at IconEntry creation time
145 * b) if it is different then NO_ICON_POSITION, the auto layouting will not apply to the IconEntry
148 /****************************************************************************/
149 /*** Name *******************************************************************/
150 #define MUIC_IconDrawerList "IconDrawerList.mui"
152 /****************************************************************************/
153 /*** Name *******************************************************************/
154 #define MUIC_IconVolumeList "IconVolumeList.mui"
156 struct VolumeIcon_Private
158 ULONG vip_FLags; /* These flags will set volume attributes */
159 struct NotifyRequest vip_FSNotifyRequest;
162 #define _volpriv(entry) ((struct VolumeIcon_Private *)entry->ie_IconListEntry.udata)
164 extern const struct __MUIBuiltinClass _MUI_IconList_desc; /* PRIV */
165 extern const struct __MUIBuiltinClass _MUI_IconDrawerList_desc; /* PRIV */
166 extern const struct __MUIBuiltinClass _MUI_IconVolumeList_desc; /* PRIV */
168 #ifdef __AROS__
169 #define IconListObject MUIOBJMACRO_START(MUIC_IconList)
170 #define IconVolumeListObject MUIOBJMACRO_START(MUIC_IconVolumeList)
171 #define IconDrawerListObject MUIOBJMACRO_START(MUIC_IconDrawerList)
172 #else
173 #define IconDrawerListObject NewObject(IconDrawerList_Class->mcc_Class, NULL
174 #define IconVolumeListObject NewObject(IconVolumeList_Class->mcc_Class, NULL
175 #define IconListObject NewObject(IconList_Class->mcc_Class, NULL
176 #endif
178 #endif /* _MUI_CLASSES_ICONLIST_H */