graphics.library: In INVERSVID mode, don't clobber the GC's pens
[AROS.git] / compiler / include / libraries / amigaguide.h
blob9374f3b07e1e852ec8acee29e9aab22feef745fc
1 #ifndef LIBRARIES_AMIGAGUIDE_H
2 #define LIBRARIES_AMIGAGUIDE_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc:
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
16 #ifndef EXEC_LISTS_H
17 # include <exec/lists.h>
18 #endif
20 #ifndef EXEC_NODES_H
21 # include <exec/nodes.h>
22 #endif
24 #ifndef EXEC_SEMAPHORES_H
25 # include <exec/semaphores.h>
26 #endif
28 #ifndef INTUITION_INTUITION_H
29 # include <intuition/intuition.h>
30 #endif
32 #ifndef INTUITION_SCREENS_H
33 # include <intuition/screens.h>
34 #endif
36 #ifndef INTUITION_CLASSUSR_H
37 # include <intuition/classusr.h>
38 #endif
40 #ifndef DOS_DOS_H
41 # include <dos/dos.h>
42 #endif
44 #ifndef UTILITY_TAGITEM_H
45 # include <utility/tagitem.h>
46 #endif
48 #ifndef APSH_TOOL_ID
49 #define APSH_TOOL_ID 11000L
50 #define StartupMsgID (APSH_TOOL_ID+1L)
51 #define LoginToolID (APSH_TOOL_ID+2L)
52 #define LogoutToolID (APSH_TOOL_ID+3L)
53 #define ShutdownMsgID (APSH_TOOL_ID+4L)
54 #define ActivateToolID (APSH_TOOL_ID+5L)
55 #define DeactivateToolID (APSH_TOOL_ID+6L)
56 #define ActiveToolID (APSH_TOOL_ID+7L)
57 #define InactiveToolID (APSH_TOOL_ID+8L)
58 #define ToolStatusID (APSH_TOOL_ID+9L)
59 #define ToolCmdID (APSH_TOOL_ID+10L)
60 #define ToolCmdReplyID (APSH_TOOL_ID+11L)
61 #define ShutdownToolID (APSH_TOOL_ID+12L)
62 #endif
64 /* Attributes accepted by GetAmigaGuideAttr() */
65 #define AGA_Dummy (TAG_USER)
66 #define AGA_Path (AGA_Dummy+1)
67 #define AGA_XRefList (AGA_Dummy+2)
68 #define AGA_Activate (AGA_Dummy+3)
69 #define AGA_Context (AGA_Dummy+4)
70 #define AGA_HelpGroup (AGA_Dummy+5) /* (ULONG) Unique identifier */
71 #define AGA_Reserved1 (AGA_Dummy+6)
72 #define AGA_Reserved2 (AGA_Dummy+7)
73 #define AGA_Reserved3 (AGA_Dummy+8)
74 #define AGA_ARexxPort (AGA_Dummy+9) /* (struct MsgPort *) Pointer to the ARexx message port */
75 #define AGA_ARexxPortName (AGA_Dummy+10) /* (STRPTR) Used to specify the ARexx port name (not copied) */
76 #define AGA_Secure (AGA_Dummy+11)
78 typedef void * AMIGAGUIDECONTEXT;
80 struct AmigaGuideMsg
82 struct Message agm_Msg; /* Embedded Exec message structure */
83 ULONG agm_Type; /* Type of message */
84 APTR agm_Data; /* Pointer to message data */
85 ULONG agm_DSize; /* Size of message data */
86 ULONG agm_DType; /* Type of message data */
87 ULONG agm_Pri_Ret; /* Primary return value */
88 ULONG agm_Sec_Ret; /* Secondary return value */
89 APTR agm_System1;
90 APTR agm_System2;
93 /* Allocation description structure */
94 struct NewAmigaGuide
96 BPTR nag_Lock; /* Lock on the document directory */
97 STRPTR nag_Name; /* Name of document file */
98 struct Screen *nag_Screen; /* Screen to place windows within */
99 STRPTR nag_PubScreen; /* Public screen name to open on */
100 STRPTR nag_HostPort; /* Application's ARexx port name */
101 STRPTR nag_ClientPort;/* Name to assign to the clients ARexx port */
102 STRPTR nag_BaseName; /* Base name of the application */
103 ULONG nag_Flags; /* Flags */
104 STRPTR *nag_Context; /* NULL terminated context table */
105 STRPTR nag_Node; /* Node to align on first (defaults to Main) */
106 LONG nag_Line; /* Line to align on */
107 struct TagItem *nag_Extens; /* Tag array extension */
108 VOID *nag_Client; /* Private! MUST be NULL */
111 /* public Client flags */
112 #define HTF_LOAD_INDEX (1L<<0) /* Force load the index at init time */
113 #define HTF_LOAD_ALL (1L<<1) /* Force load the entire database at init */
114 #define HTF_CACHE_NODE (1L<<2) /* Cache each node as visited */
115 #define HTF_CACHE_DB (1L<<3) /* Keep the buffers around until expunge */
116 #define HTF_UNIQUE (1L<<15)/* Unique ARexx port name */
117 #define HTF_NOACTIVATE (1L<<16)/* Don't activate window */
119 #define HTFC_SYSGADS 0x80000000
121 /* Callback function ID's */
122 #define HTH_OPEN 0
123 #define HTH_CLOSE 1
125 #define HTERR_NOT_ENOUGH_MEMORY 100L
126 #define HTERR_CANT_OPEN_DATABASE 101L
127 #define HTERR_CANT_FIND_NODE 102L
128 #define HTERR_CANT_OPEN_NODE 103L
129 #define HTERR_CANT_OPEN_WINDOW 104L
130 #define HTERR_INVALID_COMMAND 105L
131 #define HTERR_CANT_COMPLETE 106L
132 #define HTERR_PORT_CLOSED 107L
133 #define HTERR_CANT_CREATE_PORT 108L
134 #define HTERR_KEYWORD_NOT_FOUND 113L
136 typedef struct AmigaGuideHost * AMIGAGUIDEHOST;
138 /* Cross reference node */
139 struct XRef
141 struct Node xr_Node; /* Embedded node */
142 UWORD xr_Pad; /* Padding */
143 struct DocFile *xr_DF; /* Document defined in */
144 STRPTR xr_File; /* Name of document file */
145 STRPTR xr_Name; /* Name of item */
146 LONG xr_Line; /* Line defined at */
149 #define XRSIZE (sizeof (struct XRef))
151 /* Types of cross reference nodes */
152 #define XR_GENERIC 0
153 #define XR_FUNCTION 1
154 #define XR_COMMAND 2
155 #define XR_INCLUDE 3
156 #define XR_MACRO 4
157 #define XR_STRUCT 5
158 #define XR_FIELD 6
159 #define XR_TYPEDEF 7
160 #define XR_DEFINE 8
162 /* Callback handle */
163 struct AmigaGuideHost
165 struct Hook agh_Dispatcher;/* Dispatcher */
166 ULONG agh_Reserved; /* Must be 0 */
167 ULONG agh_Flags;
168 ULONG agh_UseCnt; /* Number of open nodes */
169 APTR agh_SystemData;/* Reserved for system use */
170 APTR agh_UserData; /* Anything you want... */
173 /* Methods */
174 #define HM_FINDNODE 1
175 #define HM_OPENNODE 2
176 #define HM_CLOSENODE 3
177 #define HM_EXPUNGE 10 /* Expunge DataBase */
179 /* HM_FINDNODE */
180 struct opFindHost
182 ULONG MethodID;
183 struct TagItem * ofh_Attrs; /* R: Additional attributes */
184 STRPTR ofh_Node; /* R: Name of node */
185 STRPTR ofh_TOC; /* W: Table of Contents */
186 STRPTR ofh_Title; /* W: Title to give to the node */
187 STRPTR ofh_Next; /* W: Next node to browse to */
188 STRPTR ofh_Prev; /* W: Previous node to browse to */
191 /* HM_OPENNODE, HM_CLOSENODE */
192 struct opNodeIO
194 ULONG MethodID;
195 struct TagItem * onm_Attrs; /* R: Additional attributes */
196 STRPTR onm_Node; /* R: Node name and arguments */
197 STRPTR onm_FileName; /* W: File name buffer */
198 STRPTR onm_DocBuffer; /* W: Node buffer */
199 ULONG onm_BuffLen; /* W: Size of buffer */
200 ULONG onm_Flags; /* RW: Control flags */
203 /* onm_Flags */
204 #define HTNF_KEEP (1L<<0) /* Don't flush this node until database is closed */
205 #define HTNF_RESERVED1 (1L<<1) /* Reserved for system use */
206 #define HTNF_RESERVED2 (1L<<2) /* Reserved for system use */
207 #define HTNF_ASCII (1L<<3) /* Node is straight ASCII */
208 #define HTNF_RESERVED3 (1L<<4) /* Reserved for system use */
209 #define HTNF_CLEAN (1L<<5) /* Remove the node from the database */
210 #define HTNF_DONE (1L<<6) /* Done with node */
212 /* onm_Attrs */
213 #define HTNA_Dummy (TAG_USER)
214 #define HTNA_Screen (HTNA_Dummy+1) /* (struct Screen *) Screen that window resides in */
215 #define HTNA_Pens (HTNA_Dummy+2) /* Pen array (from DrawInfo) */
216 #define HTNA_Rectangle (HTNA_Dummy+3) /* Window box */
218 #define HTNA_HelpGroup (HTNA_Dummy+5) /* (ULONG) unique identifier */
220 /* HM_EXPUNGE */
221 struct opExpungeNode
223 ULONG MethodID;
224 struct TagItem * oen_Attrs; /* R: Additional attributes */
227 #endif /* LIBRARIES_AMIGAGUIDE_H */