1 #ifndef LIBRARIES_AMIGAGUIDE_H
    2 #define LIBRARIES_AMIGAGUIDE_H
    3 
    4 /*
    5 	amigaguide.library include (V45)
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #ifndef EXEC_LISTS_H
   15 # include <exec/lists.h>
   16 #endif
   17 
   18 #ifndef EXEC_NODES_H
   19 # include <exec/nodes.h>
   20 #endif
   21 
   22 #ifndef EXEC_SEMAPHORES_H
   23 # include <exec/semaphores.h>
   24 #endif
   25 
   26 #ifndef INTUITION_INTUITION_H
   27 # include <intuition/intuition.h>
   28 #endif
   29 
   30 #ifndef INTUITION_SCREENS_H
   31 # include <intuition/screens.h>
   32 #endif
   33 
   34 #ifndef INTUITION_CLASSUSR_H
   35 # include <intuition/classusr.h>
   36 #endif
   37 
   38 #ifndef DOS_DOS_H
   39 # include <dos/dos.h>
   40 #endif
   41 
   42 #ifndef UTILITY_TAGITEM_H
   43 # include <utility/tagitem.h>
   44 #endif
   45 
   46 #pragma pack(2)
   47 
   48 
   49 #ifndef APSH_TOOL_ID
   50 # define APSH_TOOL_ID      11000
   51 # define StartupMsgID      (APSH_TOOL_ID + 1)
   52 # define LoginToolID       (APSH_TOOL_ID + 2)
   53 # define LogoutToolID      (APSH_TOOL_ID + 3)
   54 # define ShutdownMsgID     (APSH_TOOL_ID + 4)
   55 # define ActivateToolID    (APSH_TOOL_ID + 5)
   56 # define DeactivateToolID  (APSH_TOOL_ID + 6)
   57 # define ActiveToolID      (APSH_TOOL_ID + 7)
   58 # define InactiveToolID    (APSH_TOOL_ID + 8)
   59 # define ToolStatusID      (APSH_TOOL_ID + 9)
   60 # define ToolCmdID         (APSH_TOOL_ID + 10)
   61 # define ToolCmdReplyID    (APSH_TOOL_ID + 11)
   62 # define ShutdownToolID    (APSH_TOOL_ID + 12)
   63 #endif
   64 
   65 
   66 #define AGA_Dummy           (TAG_USER)
   67 #define AGA_Path            (AGA_Dummy + 1)
   68 #define AGA_XRefList        (AGA_Dummy + 2)
   69 #define AGA_Activate        (AGA_Dummy + 3)
   70 #define AGA_Context         (AGA_Dummy + 4)
   71 #define AGA_HelpGroup       (AGA_Dummy + 5)
   72 #define AGA_Reserved1       (AGA_Dummy + 6)
   73 #define AGA_Reserved2       (AGA_Dummy + 7)
   74 #define AGA_Reserved3       (AGA_Dummy + 8)
   75 #define AGA_ARexxPort       (AGA_Dummy + 9)
   76 #define AGA_ARexxPortName   (AGA_Dummy + 10)
   77 
   78 /*** V41 ***/
   79 
   80 #define AGA_Secure          (AGA_Dummy + 11)
   81 
   82 
   83 typedef void *AMIGAGUIDECONTEXT;
   84 
   85 struct AmigaGuideMsg
   86 {
   87 	struct Message agm_Msg;
   88 	ULONG          agm_Type;
   89 	APTR           agm_Data;
   90 	ULONG          agm_DSize;
   91 	ULONG          agm_DType;
   92 	ULONG          agm_Pri_Ret;
   93 	ULONG          agm_Sec_Ret;
   94 	APTR           agm_System1;
   95 	APTR           agm_System2;
   96 };
   97 
   98 struct NewAmigaGuide
   99 {
  100 	BPTR            nag_Lock;
  101 	STRPTR          nag_Name;
  102 	struct Screen  *nag_Screen;
  103 	STRPTR          nag_PubScreen;
  104 	STRPTR          nag_HostPort;
  105 	STRPTR          nag_ClientPort;
  106 	STRPTR          nag_BaseName;
  107 	ULONG           nag_Flags;
  108 	STRPTR         *nag_Context;
  109 	STRPTR          nag_Node;
  110 	LONG            nag_Line;
  111 	struct TagItem *nag_Extens;
  112 	APTR            nag_Client;
  113 };
  114 
  115 
  116 #define HTF_LOAD_INDEX  (1<<0)
  117 #define HTF_LOAD_ALL    (1<<1)
  118 #define HTF_CACHE_NODE  (1<<2)
  119 #define HTF_CACHE_DB    (1<<3)
  120 #define HTF_UNIQUE      (1<<15)
  121 #define HTF_NOACTIVATE  (1<<16)
  122 
  123 #define HTFC_SYSGADS  0x80000000
  124 
  125 
  126 #define HTH_OPEN   0
  127 #define HTH_CLOSE  1
  128 
  129 
  130 #define HTERR_NOT_ENOUGH_MEMORY   100
  131 #define HTERR_CANT_OPEN_DATABASE  101
  132 #define HTERR_CANT_FIND_NODE      102
  133 #define HTERR_CANT_OPEN_NODE      103
  134 #define HTERR_CANT_OPEN_WINDOW    104
  135 #define HTERR_INVALID_COMMAND     105
  136 #define HTERR_CANT_COMPLETE       106
  137 #define HTERR_PORT_CLOSED         107
  138 #define HTERR_CANT_CREATE_PORT    108
  139 #define HTERR_KEYWORD_NOT_FOUND   113
  140 
  141 
  142 struct XRef
  143 {
  144 	struct Node     xr_Node;
  145 	UWORD           xr_Pad;
  146 	struct DocFile *xr_DF;
  147 	STRPTR          xr_File;
  148 	STRPTR          xr_Name;
  149 	LONG            xr_Line;
  150 
  151 	/*** V44 ***/
  152 
  153 	ULONG           xr_Reserved[2];
  154 };
  155 
  156 #define XRSIZE  (sizeof(struct XRef))
  157 
  158 
  159 #define XR_GENERIC   0
  160 #define XR_FUNCTION  1
  161 #define XR_COMMAND   2
  162 #define XR_INCLUDE   3
  163 #define XR_MACRO     4
  164 #define XR_STRUCT    5
  165 #define XR_FIELD     6
  166 #define XR_TYPEDEF   7
  167 #define XR_DEFINE    8
  168 
  169 
  170 struct AmigaGuideHost
  171 {
  172 	struct Hook agh_Dispatcher;
  173 	ULONG       agh_Reserved;
  174 	ULONG       agh_Flags;
  175 	ULONG       agh_UseCnt;
  176 	APTR        agh_SystemData;
  177 	APTR        agh_UserData;
  178 };
  179 
  180 typedef struct AmigaGuideHost *AMIGAGUIDEHOST;
  181 
  182 
  183 #define HM_FINDNODE   1
  184 #define HM_OPENNODE   2
  185 #define HM_CLOSENODE  3
  186 #define HM_EXPUNGE    10
  187 
  188 
  189 struct opFindHost
  190 {
  191 	ULONG           MethodID;
  192 	struct TagItem *ofh_Attrs;
  193 	STRPTR          ofh_Node;
  194 	STRPTR          ofh_TOC;
  195 	STRPTR          ofh_Title;
  196 	STRPTR          ofh_Next;
  197 	STRPTR          ofh_Prev;
  198 };
  199 
  200 struct opNodeIO
  201 {
  202 	ULONG           MethodID;
  203 	struct TagItem *onm_Attrs;
  204 	STRPTR          onm_Node;
  205 	STRPTR          onm_FileName;
  206 	STRPTR          onm_DocBuffer;
  207 	ULONG           onm_BuffLen;
  208 	ULONG           onm_Flags;
  209 };
  210 
  211 
  212 #define HTNF_KEEP       (1<<0)
  213 #define HTNF_RESERVED1  (1<<1)
  214 #define HTNF_RESERVED2  (1<<2)
  215 #define HTNF_ASCII      (1<<3)
  216 #define HTNF_RESERVED3  (1<<4)
  217 #define HTNF_CLEAN      (1<<5)
  218 #define HTNF_DONE       (1<<6)
  219 
  220 
  221 #define HTNA_Dummy      (TAG_USER)
  222 #define HTNA_Screen     (HTNA_Dummy + 1)
  223 #define HTNA_Pens       (HTNA_Dummy + 2)
  224 #define HTNA_Rectangle  (HTNA_Dummy + 3)
  225 #define HTNA_HelpGroup  (HTNA_Dummy + 5)
  226 
  227 
  228 struct opExpungeNode
  229 {
  230 	ULONG           MethodID;
  231 	struct TagItem *oen_Attrs;
  232 };
  233 
  234 
  235 #pragma pack()
  236 
  237 #endif /* LIBRARIES_AMIGAGUIDE_H */