Fixed compatibility of output.
[AROS.git] / compiler / include / workbench / workbench.h
blob32f68424032e9b50d79d25b3d1d518e90db2dc97
1 #ifndef WORKBENCH_WORKBENCH_H
2 #define WORKBENCH_WORKBENCH_H
4 /*
5 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #ifndef EXEC_LISTS_H
10 # include <exec/lists.h>
11 #endif
13 #ifndef EXEC_NODES_H
14 # include <exec/nodes.h>
15 #endif
17 #ifndef EXEC_TASKS_H
18 # include <exec/tasks.h>
19 #endif
21 #ifndef EXEC_TYPES_H
22 # include <exec/types.h>
23 #endif
25 #ifndef DOS_BPTR_H
26 # include <dos/bptr.h>
27 #endif
29 #ifndef INTUITION_INTUITION_H
30 # include <intuition/intuition.h>
31 #endif
33 /*** Workbench library name *************************************************/
34 #define WORKBENCH_NAME "workbench.library"
36 /*** Structures and associated definitions **********************************/
37 struct OldDrawerData
39 struct NewWindow dd_NewWindow;
40 LONG dd_CurrentX;
41 LONG dd_CurrentY;
44 #define OLDDRAWERDATAFILESIZE (sizeof(struct OldDrawerData))
46 struct DrawerData
48 struct NewWindow dd_NewWindow;
49 LONG dd_CurrentX;
50 LONG dd_CurrentY;
51 ULONG dd_Flags;
52 UWORD dd_ViewModes;
55 #define DRAWERDATAFILESIZE (sizeof(struct DrawerData))
57 /* Definitions for dd_ViewModes */
58 #define DDVM_BYDEFAULT 0 /* Default (inherit parent's view mode) */
59 #define DDVM_BYICON 1 /* View as icons */
60 #define DDVM_BYNAME 2 /* View as text, sorted by name */
61 #define DDVM_BYDATE 3 /* View as text, sorted by date */
62 #define DDVM_BYSIZE 4 /* View as text, sorted by size */
63 #define DDVM_BYTYPE 5 /* View as text, sorted by type */
65 /* Definitions for dd_Flags */
66 #define DDFLAGS_SHOWDEFAULT 0 /* Default (show only icons) */
67 #define DDFLAGS_SHOWICONS 1 /* Show only icons */
68 #define DDFLAGS_SHOWALL 2 /* Show all files */
70 struct DiskObject
72 UWORD do_Magic;
73 UWORD do_Version;
74 struct Gadget do_Gadget;
75 UBYTE do_Type; /* see below */
76 STRPTR do_DefaultTool;
77 STRPTR *do_ToolTypes;
78 LONG do_CurrentX;
79 LONG do_CurrentY;
80 struct DrawerData *do_DrawerData;
81 STRPTR do_ToolWindow;
82 LONG do_StackSize;
85 #define WBDISK (1)
86 #define WBDRAWER (2)
87 #define WBTOOL (3)
88 #define WBPROJECT (4)
89 #define WBGARBAGE (5)
90 #define WBDEVICE (6)
91 #define WBKICK (7)
92 #define WBAPPICON (8)
94 #define WB_DISKVERSION (1)
95 #define WB_DISKREVISION (1)
96 #define WB_DISKREVISIONMASK (0xFF)
98 #define WB_DISKMAGIC (0xE310)
100 struct FreeList
102 WORD fl_NumFree;
103 struct List fl_MemList;
106 /* Icons */
107 #define GFLG_GADGBACKFILL 0x0001
108 #define NO_ICON_POSITION 0x80000000
110 struct AppMessage
112 struct Message am_Message;
113 UWORD am_Type; /* see below */
114 IPTR am_UserData;
115 IPTR am_ID;
116 LONG am_NumArgs;
117 struct WBArg * am_ArgList;
118 UWORD am_Version; /* see below */
119 UWORD am_Class;
120 WORD am_MouseX;
121 WORD am_MouseY;
122 ULONG am_Seconds;
123 ULONG am_Micros;
124 ULONG am_Reserved[8];
127 /* Definition for am_Version */
128 #define AM_VERSION 1
130 /* Definitions for am_Type */
131 #define AMTYPE_APPWINDOW 7
132 #define AMTYPE_APPICON 8
133 #define AMTYPE_APPMENUITEM 9
134 #define AMTYPE_APPWINDOWZONE 10
136 /* Definitions for am_Class */
137 #define AMCLASSICON_Open 0
138 #define AMCLASSICON_Copy 1
139 #define AMCLASSICON_Rename 2
140 #define AMCLASSICON_Information 3
141 #define AMCLASSICON_Snapshot 4
142 #define AMCLASSICON_UnSnapshot 5
143 #define AMCLASSICON_LeaveOut 6
144 #define AMCLASSICON_PutAway 7
145 #define AMCLASSICON_Delete 8
146 #define AMCLASSICON_FormatDisk 9
147 #define AMCLASSICON_EmptyTrash 10
148 #define AMCLASSICON_Selected 11
149 #define AMCLASSICON_Unselected 12
151 struct AppIconRenderMsg
153 struct RastPort *arm_RastPort;
154 struct DiskObject *arm_Icon;
155 STRPTR arm_Label;
156 struct TagItem *arm_Tags;
157 WORD arm_Left;
158 WORD arm_Top;
159 WORD arm_Width;
160 WORD arm_Height;
161 ULONG arm_State;
164 struct AppWindowDropZoneMsg
166 struct RastPort *adzm_RastPort;
167 struct IBox adzm_DropZoneBox;
168 IPTR adzm_ID;
169 IPTR adzm_UserData;
170 LONG adzm_Action; /* see below */
173 /* Definitions for adzm_Action */
174 #define ADZMACTION_Enter (0)
175 #define ADZMACTION_Leave (1)
177 struct IconSelectMsg
179 ULONG ism_Length;
180 BPTR ism_Drawer;
181 STRPTR ism_Name;
182 UWORD ism_Type;
183 BOOL ism_Selected;
184 struct TagItem *ism_Tags;
185 struct Window *ism_DrawerWindow;
186 struct Window *ism_ParentWindow;
187 WORD ism_Left;
188 WORD ism_Top;
189 WORD ism_Width;
190 WORD ism_Height;
193 /* Hook return values */
194 #define ISMACTION_Unselect (0)
195 #define ISMACTION_Select (1)
196 #define ISMACTION_Ignore (2)
197 #define ISMACTION_Stop (3)
199 /****************************************************************************/
201 struct CopyBeginMsg
203 ULONG cbm_Length;
204 LONG cbm_Action;
205 BPTR cbm_SourceDrawer;
206 BPTR cbm_DestinationDrawer;
209 struct CopyDataMsg
211 ULONG cdm_Length;
212 LONG cdm_Action;
213 BPTR cdm_SourceLock;
214 STRPTR cdm_SourceName;
215 BPTR cdm_DestinationLock;
216 STRPTR cdm_DestinationName;
217 LONG cdm_DestinationX;
218 LONG cdm_DestinationY;
221 struct CopyEndMsg
223 ULONG cem_Length;
224 LONG cem_Action;
227 #define CPACTION_Begin (0)
228 #define CPACTION_Copy (1)
229 #define CPACTION_End (2)
231 /****************************************************************************/
233 struct DeleteBeginMsg
235 ULONG dbm_Length;
236 LONG dbm_Action;
239 struct DeleteDataMsg
241 ULONG ddm_Length;
242 LONG ddm_Action;
243 BPTR ddm_Lock;
244 STRPTR ddm_Name;
247 struct DeleteEndMsg
249 ULONG dem_Length;
250 LONG dem_Action;
253 #define DLACTION_BeginDiscard (0)
254 #define DLACTION_BeginEmptyTrash (1)
255 #define DLACTION_DeleteContents (3)
256 #define DLACTION_DeleteObject (4)
257 #define DLACTION_End (5)
259 /****************************************************************************/
261 struct SetupCleanupHookMsg
263 ULONG schm_Length;
264 LONG schm_State;
267 #define SCHMSTATE_TryCleanup (0)
268 #define SCHMSTATE_Cleanup (1)
269 #define SCHMSTATE_Setup (2)
271 /****************************************************************************/
273 struct TextInputMsg
275 ULONG tim_Length;
276 LONG tim_Action;
277 STRPTR tim_Prompt;
280 #define TIACTION_Rename (0)
281 #define TIACTION_RelabelVolume (1)
282 #define TIACTION_NewDrawer (2)
283 #define TIACTION_Execute (3)
285 /*** Private structures *****************************************************/
286 struct AppWindow;
287 struct AppWindowDropZone;
288 struct AppIcon;
289 struct AppMenuItem;
291 /*** Start of workbench.library tags ****************************************/
292 #define WBA_BASE (TAG_USER+0xA000)
294 /*** Tags for use with AddAppIconA() ****************************************/
295 /* The different menu items the AppIcon responds to (BOOL) */
296 #define WBAPPICONA_SupportsOpen (WBA_BASE+1)
297 #define WBAPPICONA_SupportsCopy (WBA_BASE+2)
298 #define WBAPPICONA_SupportsRename (WBA_BASE+3)
299 #define WBAPPICONA_SupportsInformation (WBA_BASE+4)
300 #define WBAPPICONA_SupportsSnapshot (WBA_BASE+5)
301 #define WBAPPICONA_SupportsUnSnapshot (WBA_BASE+6)
302 #define WBAPPICONA_SupportsLeaveOut (WBA_BASE+7)
303 #define WBAPPICONA_SupportsPutAway (WBA_BASE+8)
304 #define WBAPPICONA_SupportsDelete (WBA_BASE+9)
305 #define WBAPPICONA_SupportsFormatDisk (WBA_BASE+10)
306 #define WBAPPICONA_SupportsEmptyTrash (WBA_BASE+11)
308 /* Propagate the AppIcons position back to original DiskObject (BOOL) */
309 #define WBAPPICONA_PropagatePosition (WBA_BASE+12)
311 /* Call this hook when rendering this AppIcon (struct Hook *) */
312 #define WBAPPICONA_RenderHook (WBA_BASE+13)
314 /* Notify the AppIcon when it's select state changes (BOOL) */
315 #define WBAPPICONA_NotifySelectState (WBA_BASE+14)
317 /*** Tags for use with AddAppMenuItemA() ************************************/
318 #define WBAPPMENUA_CommandKeyString (WBA_BASE+15)
319 #define WBAPPMENUA_GetKey (WBA_BASE+65)
320 #define WBAPPMENUA_UseKey (WBA_BASE+66)
321 #define WBAPPMENUA_GetTitleKey (WBA_BASE+77)
323 /*** Tags for use with OpenWorkbenchObjectA() *******************************/
324 #define WBOPENA_ArgLock (WBA_BASE+16)
325 #define WBOPENA_ArgName (WBA_BASE+17)
326 #define WBOPENA_Show (WBA_BASE+75)
327 #define WBOPENA_ViewBy (WBA_BASE+76)
329 /*** Tags for use with WorkbenchControlA() **********************************/
330 #define WBCTRLA_IsOpen (WBA_BASE+18)
331 #define WBCTRLA_DuplicateSearchPath (WBA_BASE+19)
332 #define WBCTRLA_FreeSearchPath (WBA_BASE+20)
333 #define WBCTRLA_GetDefaultStackSize (WBA_BASE+21)
334 #define WBCTRLA_SetDefaultStackSize (WBA_BASE+22)
335 #define WBCTRLA_RedrawAppIcon (WBA_BASE+23)
336 #define WBCTRLA_GetProgramList (WBA_BASE+24)
337 #define WBCTRLA_FreeProgramList (WBA_BASE+25)
338 #define WBCTRLA_GetSelectedIconList (WBA_BASE+36)
339 #define WBCTRLA_FreeSelectedIconList (WBA_BASE+37)
340 #define WBCTRLA_GetOpenDrawerList (WBA_BASE+38)
341 #define WBCTRLA_FreeOpenDrawerList (WBA_BASE+39)
342 #define WBCTRLA_GetHiddenDeviceList (WBA_BASE+42)
343 #define WBCTRLA_FreeHiddenDeviceList (WBA_BASE+43)
344 #define WBCTRLA_AddHiddenDeviceName (WBA_BASE+44)
345 #define WBCTRLA_RemoveHiddenDeviceName (WBA_BASE+45)
346 #define WBCTRLA_GetTypeRestartTime (WBA_BASE+47)
347 #define WBCTRLA_SetTypeRestartTime (WBA_BASE+48)
348 #define WBCTRLA_GetCopyHook (WBA_BASE+69)
349 #define WBCTRLA_SetCopyHook (WBA_BASE+70)
350 #define WBCTRLA_GetDeleteHook (WBA_BASE+71)
351 #define WBCTRLA_SetDeleteHook (WBA_BASE+72)
352 #define WBCTRLA_GetTextInputHook (WBA_BASE+73)
353 #define WBCTRLA_SetTextInputHook (WBA_BASE+74)
354 #define WBCTRLA_AddSetupCleanupHook (WBA_BASE+78)
355 #define WBCTRLA_RemSetupCleanupHook (WBA_BASE+79)
357 /*** Tags for use with AddAppWindowDropZoneA() ******************************/
358 #define WBDZA_Left (WBA_BASE+26)
359 #define WBDZA_RelRight (WBA_BASE+27)
360 #define WBDZA_Top (WBA_BASE+28)
361 #define WBDZA_RelBottom (WBA_BASE+29)
362 #define WBDZA_Width (WBA_BASE+30)
363 #define WBDZA_RelWidth (WBA_BASE+31)
364 #define WBDZA_Height (WBA_BASE+32)
365 #define WBDZA_RelHeight (WBA_BASE+33)
366 #define WBDZA_Box (WBA_BASE+34)
367 #define WBDZA_Hook (WBA_BASE+35)
369 /*** Reserved tags **********************************************************/
370 #define WBA_Reserved1 (WBA_BASE+40)
371 #define WBA_Reserved2 (WBA_BASE+41)
372 #define WBA_Reserved3 (WBA_BASE+46)
373 #define WBA_Reserved4 (WBA_BASE+49)
374 #define WBA_Reserved5 (WBA_BASE+50)
375 #define WBA_Reserved6 (WBA_BASE+51)
376 #define WBA_Reserved7 (WBA_BASE+52)
377 #define WBA_Reserved8 (WBA_BASE+53)
378 #define WBA_Reserved9 (WBA_BASE+54)
379 #define WBA_Reserved10 (WBA_BASE+55)
380 #define WBA_Reserved11 (WBA_BASE+56)
381 #define WBA_Reserved12 (WBA_BASE+57)
382 #define WBA_Reserved13 (WBA_BASE+58)
383 #define WBA_Reserved14 (WBA_BASE+59)
384 #define WBA_Reserved15 (WBA_BASE+60)
385 #define WBA_Reserved16 (WBA_BASE+61)
386 #define WBA_Reserved17 (WBA_BASE+62)
387 #define WBA_Reserved18 (WBA_BASE+63)
388 #define WBA_Reserved19 (WBA_BASE+64)
390 /*** Last tag ***************************************************************/
392 #define WBA_LAST_TAG (WBA_BASE+64)
394 /* Parameters for the UpdateWorkbench() function */
395 #define UPDATEWB_ObjectRemoved 0
396 #define UPDATEWB_ObjectAdded 1
398 #endif /* WORKBENCH_WORKBENCH_H */