Updates to includes for scsi & usbhardware.
[cake.git] / rom / workbench / workbench_intern.h
blobe4d74a582124b47d3746bb731c96f2cb3f02d39b
1 #ifndef __WORKBENCH_INTERN_H__
2 #define __WORKBENCH_INTERN_H__
4 /*
5 Copyright 1995-2006, The AROS Development Team. All rights reserved.
6 $Id$
8 Internal header file for workbench.library.
9 */
11 #include <exec/types.h>
12 #include <exec/nodes.h>
13 #include <exec/lists.h>
14 #include <exec/semaphores.h>
15 #include <exec/memory.h>
16 #include <exec/libraries.h>
17 #include <exec/execbase.h>
18 #include <dos/dos.h>
19 #include <dos/dostags.h>
20 #include <utility/utility.h>
21 #include <intuition/intuition.h>
23 #include <workbench/icon.h>
24 #include <workbench/workbench.h>
25 #include <workbench/startup.h>
26 #include <workbench/handler.h>
28 #include <proto/intuition.h>
29 #include <proto/exec.h>
30 #include <proto/dos.h>
31 #include <proto/icon.h>
34 This is the WorkbenchBase structure. It is defined here because it is
35 completely private. Applications should treat it as a struct Library, and
36 use the workbench.library functions to get information.
39 struct WorkbenchBase
41 struct Library LibNode;
43 struct MsgPort wb_HandlerPort; /* The handler's message port */
44 struct MsgPort *wb_WorkbenchPort; /* The workbench application's message port */
45 struct SignalSemaphore wb_WorkbenchPortSemaphore; /* Arbitrates initializetion access to the port above */
47 struct List wb_AppWindows;
48 struct List wb_AppIcons;
49 struct List wb_AppMenuItems;
51 BPTR wb_SearchPath;
52 struct List wb_HiddenDevices; /* List of devices that Workbench will not show */
53 ULONG wb_DefaultStackSize;
54 ULONG wb_TypeRestartTime;
56 struct SignalSemaphore wb_InitializationSemaphore; /* Arbitrates library initialization */
57 struct SignalSemaphore wb_BaseSemaphore; /* Arbitrates library base access */
59 BOOL wb_Initialized; /* Has the library been intialized in libOpen? */
62 #define LB(lb) ((struct WorkbenchBase *) (lb))
64 #define LockWorkbench() ObtainSemaphore(&(WorkbenchBase->wb_BaseSemaphore))
65 #define LockWorkbenchShared() ObtainSemaphoreShared(&(WorkbenchBase->wb_BaseSemaphore))
66 #define UnlockWorkbench() ReleaseSemaphore(&(WorkbenchBase->wb_BaseSemaphore))
69 * Defintion of internal structures.
72 struct AppIcon
74 struct Node ai_Node;
76 ULONG ai_ID;
77 ULONG ai_UserData;
79 ULONG ai_Flags;
80 STRPTR ai_Text;
81 struct DiskObject *ai_DiskObject;
83 struct Hook *ai_RenderHook;
84 struct MsgPort *ai_MsgPort;
87 /* Valid values for ai_Flags. These correspond to the tag items
88 * in <workbench/workbench.h>. */
90 #define WBAPPICONF_SupportsOpen (1<<1)
91 #define WBAPPICONF_SupportsCopy (1<<2)
92 #define WBAPPICONF_SupportsRename (1<<3)
93 #define WBAPPICONF_SupportsInformation (1<<4)
94 #define WBAPPICONF_SupportsSnapshot (1<<5)
95 #define WBAPPICONF_SupportsUnSnapshot (1<<6)
96 #define WBAPPICONF_SupportsLeaveOut (1<<7)
97 #define WBAPPICONF_SupportsPutAway (1<<8)
98 #define WBAPPICONF_SupportsDelete (1<<9)
99 #define WBAPPICONF_SupportsFormatDisk (1<<10)
100 #define WBAPPICONF_SupportsEmptyTrash (1<<11)
101 #define WBAPPICONF_PropagatePosition (1<<12)
102 #define WBAPPICONF_NotifySelectState (1<<13)
104 struct AppWindow
106 struct Node aw_Node;
108 ULONG aw_ID;
109 ULONG aw_UserData;
111 struct Window *aw_Window;
112 struct List aw_DropZones; // List of AppWindowDropZones for this AppWindow.
114 struct MsgPort *aw_MsgPort;
117 #define AWDZFlag_fix 0 /* IBox value is actual coordinate */
118 #define AWDZFlag_relLeft 1
119 #define AWDZFlag_relRight 2
120 #define AWDZFlag_relTop 3
121 #define AWDZFlag_relBottom 4
122 #define AWDZFlag_relWidth 5
123 #define AWDZFlag_relHeight 6
126 struct AppWindowDropZone
128 struct Node awdz_Node;
130 ULONG awdz_ID;
131 ULONG awdz_UserData;
133 struct IBox awdz_Box;
135 /* These four tells how to compute the drop zone size and position */
136 UWORD awdz_leftSpecifier;
137 UWORD awdz_topSpecifier;
138 UWORD awdz_widthSpecifier;
139 UWORD awdz_heightSpecifier;
140 struct Hook *awdz_Hook;
143 struct AppMenuItem
145 struct Node ami_Node;
147 ULONG ami_ID;
148 ULONG ami_UserData;
150 STRPTR ami_Text;
151 STRPTR ami_CommandKey;
153 struct MsgPort *ami_MsgPort;
156 /* Internal WBHM structure, used to hold data which the user doesn't
157 have to know about. */
158 struct IntWBHandlerMessage
160 struct WBHandlerMessage iwbhm_wbhm;
161 union
163 struct
165 struct IntuiMessage *imsg;
166 } Hide;
167 } iwbhm_Data;
169 #endif /* __WORKBENCH_INTERN_H__ */