Safer handling of Booleans.
[AROS.git] / workbench / libs / muimaster / classes / list.h
blobb0376bad707d3e70b9fb65df8cd608743b674182
1 #ifndef _MUI_CLASSES_LIST_H
2 #define _MUI_CLASSES_LIST_H
4 /*
5 Copyright © 2002-2011, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 /****************************************************************************/
10 /*** Name *******************************************************************/
11 #define MUIC_List "List.mui"
13 /*** Identifier base (for Zune extensions) **********************************/
14 #define MUIB_List (MUIB_ZUNE | 0x00001400)
16 /*** Methods ****************************************************************/
17 #define MUIM_List_Clear (MUIB_MUI | 0x0042ad89) /* MUI: V4 */
18 #define MUIM_List_Compare (MUIB_MUI | 0x00421b68) /* MUI: V20 */
19 #define MUIM_List_Construct (MUIB_MUI | 0x0042d662) /* MUI: V20 */
20 #define MUIM_List_CreateImage (MUIB_MUI | 0x00429804) /* MUI: V11 */
21 #define MUIM_List_DeleteImage (MUIB_MUI | 0x00420f58) /* MUI: V11 */
22 #define MUIM_List_Destruct (MUIB_MUI | 0x00427d51) /* MUI: V20 */
23 #define MUIM_List_Display (MUIB_MUI | 0x00425377) /* MUI: V20 */
24 #define MUIM_List_Exchange (MUIB_MUI | 0x0042468c) /* MUI: V4 */
25 #define MUIM_List_GetEntry (MUIB_MUI | 0x004280ec) /* MUI: V4 */
26 #define MUIM_List_Insert (MUIB_MUI | 0x00426c87) /* MUI: V4 */
27 #define MUIM_List_InsertSingle (MUIB_MUI | 0x004254d5) /* MUI: V7 */
28 #define MUIM_List_Jump (MUIB_MUI | 0x0042baab) /* MUI: V4 */
29 #define MUIM_List_Move (MUIB_MUI | 0x004253c2) /* MUI: V9 */
30 #define MUIM_List_NextSelected (MUIB_MUI | 0x00425f17) /* MUI: V6 */
31 #define MUIM_List_Redraw (MUIB_MUI | 0x00427993) /* MUI: V4 */
32 #define MUIM_List_Remove (MUIB_MUI | 0x0042647e) /* MUI: V4 */
33 #define MUIM_List_Select (MUIB_MUI | 0x004252d8) /* MUI: V4 */
34 #define MUIM_List_Sort (MUIB_MUI | 0x00422275) /* MUI: V4 */
35 #define MUIM_List_TestPos (MUIB_MUI | 0x00425f48) /* MUI: V11 */
37 struct MUIP_List_Clear
39 STACKED ULONG MethodID;
42 struct MUIP_List_Compare
44 STACKED ULONG MethodID;
45 STACKED APTR entry1;
46 STACKED APTR entry2;
47 STACKED LONG sort_type1;
48 STACKED LONG sort_type2;
51 struct MUIP_List_Construct
53 STACKED ULONG MethodID;
54 STACKED APTR entry;
55 STACKED APTR pool;
58 struct MUIP_List_CreateImage
60 STACKED ULONG MethodID;
61 STACKED Object *obj;
62 STACKED ULONG flags;
65 struct MUIP_List_DeleteImage
67 STACKED ULONG MethodID;
68 STACKED APTR listimg;
71 struct MUIP_List_Destruct
73 STACKED ULONG MethodID;
74 STACKED APTR entry;
75 STACKED APTR pool;
78 struct MUIP_List_Display
80 STACKED ULONG MethodID;
81 STACKED APTR entry;
82 STACKED STRPTR *array;
83 STACKED LONG entry_pos;
84 STACKED STRPTR *preparses;
87 struct MUIP_List_Exchange
89 STACKED ULONG MethodID;
90 STACKED LONG pos1;
91 STACKED LONG pos2;
94 struct MUIP_List_GetEntry
96 STACKED ULONG MethodID;
97 STACKED LONG pos;
98 STACKED APTR *entry;
101 struct MUIP_List_Insert
103 STACKED ULONG MethodID;
104 STACKED APTR *entries;
105 STACKED LONG count;
106 STACKED LONG pos;
109 struct MUIP_List_InsertSingle
111 STACKED ULONG MethodID;
112 STACKED APTR entry;
113 STACKED LONG pos;
116 struct MUIP_List_Jump
118 STACKED ULONG MethodID;
119 STACKED LONG pos;
122 struct MUIP_List_Move
124 STACKED ULONG MethodID;
125 STACKED LONG from;
126 STACKED LONG to;
129 struct MUIP_List_NextSelected
131 STACKED ULONG MethodID;
132 STACKED LONG *pos;
135 struct MUIP_List_Redraw
137 STACKED ULONG MethodID;
138 STACKED LONG pos;
139 STACKED APTR entry;
142 struct MUIP_List_Remove
144 STACKED ULONG MethodID;
145 STACKED LONG pos;
148 struct MUIP_List_Select
150 STACKED ULONG MethodID;
151 STACKED LONG pos;
152 STACKED LONG seltype;
153 STACKED LONG *info;
156 struct MUIP_List_Sort
158 STACKED ULONG MethodID;
161 struct MUIP_List_TestPos
163 STACKED ULONG MethodID;
164 STACKED LONG x;
165 STACKED LONG y;
166 STACKED struct MUI_List_TestPos_Result *res;
169 #define MUIM_List_SelectChange /* PRIV */ \
170 (MUIB_List | 0x00000004) /* Zune: V1 same like NLIST, PRIV for now! */
172 struct MUIP_List_SelectChange
174 STACKED ULONG MethodID;
175 STACKED LONG pos;
176 STACKED LONG state;
177 STACKED ULONG flags;
180 /*** Attributes *************************************************************/
181 #define MUIA_List_Active \
182 (MUIB_MUI | 0x0042391c) /* MUI: V4 isg LONG */
183 #define MUIA_List_AdjustHeight \
184 (MUIB_MUI | 0x0042850d) /* MUI: V4 i.. BOOL */
185 #define MUIA_List_AdjustWidth \
186 (MUIB_MUI | 0x0042354a) /* MUI: V4 i.. BOOL */
187 #define MUIA_List_AutoVisible \
188 (MUIB_MUI | 0x0042a445) /* MUI: V11 isg BOOL */
189 #define MUIA_List_CompareHook \
190 (MUIB_MUI | 0x00425c14) /* MUI: V4 is. struct Hook * */
191 #define MUIA_List_ConstructHook \
192 (MUIB_MUI | 0x0042894f) /* MUI: V4 is. struct Hook * */
193 #define MUIA_List_DestructHook \
194 (MUIB_MUI | 0x004297ce) /* MUI: V4 is. struct Hook * */
195 #define MUIA_List_DisplayHook \
196 (MUIB_MUI | 0x0042b4d5) /* MUI: V4 is. struct Hook * */
197 #define MUIA_List_DragSortable \
198 (MUIB_MUI | 0x00426099) /* MUI: V11 isg BOOL */
199 #define MUIA_List_DropMark \
200 (MUIB_MUI | 0x0042aba6) /* MUI: V11 ..g LONG */
201 #define MUIA_List_Entries \
202 (MUIB_MUI | 0x00421654) /* MUI: V4 ..g LONG */
203 #define MUIA_List_First \
204 (MUIB_MUI | 0x004238d4) /* MUI: V4 ..g LONG */
205 #define MUIA_List_Format \
206 (MUIB_MUI | 0x00423c0a) /* MUI: V4 isg STRPTR */
207 #define MUIA_List_InsertPosition \
208 (MUIB_MUI | 0x0042d0cd) /* MUI: V9 ..g LONG */
209 #define MUIA_List_MinLineHeight \
210 (MUIB_MUI | 0x0042d1c3) /* MUI: V4 i.. LONG */
211 #define MUIA_List_MultiTestHook \
212 (MUIB_MUI | 0x0042c2c6) /* MUI: V4 is. struct Hook * */
213 #define MUIA_List_Pool \
214 (MUIB_MUI | 0x00423431) /* MUI: V13 i.. APTR */
215 #define MUIA_List_PoolPuddleSize \
216 (MUIB_MUI | 0x0042a4eb) /* MUI: V13 i.. ULONG */
217 #define MUIA_List_PoolThreshSize \
218 (MUIB_MUI | 0x0042c48c) /* MUI: V13 i.. ULONG */
219 #define MUIA_List_Quiet \
220 (MUIB_MUI | 0x0042d8c7) /* MUI: V4 .s. BOOL */
221 #define MUIA_List_ShowDropMarks \
222 (MUIB_MUI | 0x0042c6f3) /* MUI: V11 isg BOOL */
223 #define MUIA_List_SourceArray \
224 (MUIB_MUI | 0x0042c0a0) /* MUI: V4 i.. APTR */
225 #define MUIA_List_Title \
226 (MUIB_MUI | 0x00423e66) /* MUI: V6 isg char * */
227 #define MUIA_List_Visible \
228 (MUIB_MUI | 0x0042191f) /* MUI: V4 ..g LONG */
229 #define MUIA_List_Prop_Entries /* PRIV */ \
230 (MUIB_MUI | 0x0042a8f5) /* .sg LONG PRIV */
231 #define MUIA_List_Prop_Visible /* PRIV */ \
232 (MUIB_MUI | 0x004273e9) /* .sg LONG PRIV */
233 #define MUIA_List_Prop_First /* PRIV */ \
234 (MUIB_MUI | 0x00429df3) /* .sg LONG PRIV */
236 #define MUIA_List_VertProp_Entries /* PRIV */ \
237 MUIA_List_Prop_Entries /* PRIV */
238 #define MUIA_List_VertProp_Visible /* PRIV */ \
239 MUIA_List_Prop_Visible /* PRIV */
240 #define MUIA_List_VertProp_First /* PRIV */ \
241 MUIA_List_Prop_First /* PRIV */
242 #define MUIA_List_HorizProp_Entries /* PRIV */ \
243 (MUIB_List | 0x00000000) /* ... LONG PRIV */
244 #define MUIA_List_HorizProp_Visible /* PRIV */ \
245 (MUIB_List | 0x00000001) /* ... LONG PRIV */
246 #define MUIA_List_HorizProp_First /* PRIV */ \
247 (MUIB_List | 0x00000002) /* ... LONG PRIV */
249 /* Structure of the List Position Text (MUIM_List_TestPos) */
250 struct MUI_List_TestPos_Result
252 LONG entry; /* entry number, maybe -1 if testpos is not over valid
253 * entry */
254 WORD column; /* the number of the column, maybe -1 (unvalid) */
255 UWORD flags; /* some flags, see below */
256 WORD xoffset; /* x offset (in pixels) of testpos relative to the start
257 * of the column */
258 WORD yoffset; /* y offset (in pixels) of testpos relative from center
259 * of line( <0 => testpos was above, >0 => testpos was
260 * below center) */
263 #define MUI_LPR_ABOVE (1<<0)
264 #define MUI_LPR_BELOW (1<<1)
265 #define MUI_LPR_LEFT (1<<2)
266 #define MUI_LPR_RIGHT (1<<3)
268 enum
270 MUIV_List_Active_Off = -1,
271 MUIV_List_Active_Top = -2,
272 MUIV_List_Active_Bottom = -3,
273 MUIV_List_Active_Up = -4,
274 MUIV_List_Active_Down = -5,
275 MUIV_List_Active_PageUp = -6,
276 MUIV_List_Active_PageDown = -7,
279 #define MUIV_List_ConstructHook_String (IPTR)-1
280 #define MUIV_List_CopyHook_String (IPTR)-1
281 #define MUIV_List_CursorType_None 0
282 #define MUIV_List_CursorType_Bar 1
283 #define MUIV_List_CursorType_Rect 2
284 #define MUIV_List_DestructHook_String (IPTR)-1
286 enum
288 MUIV_List_Insert_Top = 0,
289 MUIV_List_Insert_Active = -1,
290 MUIV_List_Insert_Sorted = -2,
291 MUIV_List_Insert_Bottom = -3
294 enum
296 MUIV_List_Remove_First = 0,
297 MUIV_List_Remove_Active = -1,
298 MUIV_List_Remove_Last = -2,
299 MUIV_List_Remove_Selected = -3,
302 enum
304 MUIV_List_Select_Active = -1,
305 MUIV_List_Select_All = -2,
307 MUIV_List_Select_Off = 0,
308 MUIV_List_Select_On = 1,
309 MUIV_List_Select_Toggle = 2,
310 MUIV_List_Select_Ask = 3,
313 enum
315 MUIV_List_GetEntry_Active = -1,
318 enum
320 MUIV_List_Redraw_Active = -1,
321 MUIV_List_Redraw_All = -2,
322 MUIV_List_Redraw_Entry = -3,
325 enum
327 MUIV_List_Move_Top = 0,
328 MUIV_List_Move_Active = -1,
329 MUIV_List_Move_Bottom = -2,
330 MUIV_List_Move_Next = -3, /* for 2nd parameter only */
331 MUIV_List_Move_Previous = -4, /* for 2nd parameter only */
334 enum
336 MUIV_List_Exchange_Top = 0,
337 MUIV_List_Exchange_Active = -1,
338 MUIV_List_Exchange_Bottom = -2,
339 MUIV_List_Exchange_Next = -3, /* for 2nd parameter only */
340 MUIV_List_Exchange_Previous = -4, /* for 2nd parameter only */
343 enum
345 MUIV_List_Jump_Top = 0,
346 MUIV_List_Jump_Active = -1,
347 MUIV_List_Jump_Bottom = -2,
348 MUIV_List_Jump_Down = -3,
349 MUIV_List_Jump_Up = -4,
352 #define MUIV_List_NextSelected_Start (-1)
353 #define MUIV_List_NextSelected_End (-1)
356 #define MUIV_NList_SelectChange_Flag_Multi (1 << 0)
359 extern const struct __MUIBuiltinClass _MUI_List_desc; /* PRIV */
364 /****************************************************************************/
365 /*** Name *******************************************************************/
366 #define MUIC_Scrmodelist "Scrmodelist.mui"
368 /*** Identifier base (for Zune extensions) **********************************/
369 #define MUIB_Scrmodelist (MUIB_ZUNE | 0x00001700)
371 #endif /* _MUI_CLASSES_LIST_H */