add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / workbench / libs / asl / asl_init.c
blob0a7239b91bd7906a06421378207860a31cd52331
1 /*
2 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
3 $Id$
5 ASL initialization code.
6 */
9 #include <stddef.h>
10 #include <exec/libraries.h>
11 #include <exec/lists.h>
12 #include <exec/resident.h>
13 #include <aros/libcall.h>
14 #include <aros/asmcall.h>
15 #include <aros/symbolsets.h>
16 #include <intuition/screens.h>
17 #include <graphics/modeid.h>
19 #include <proto/dos.h>
20 #include <proto/exec.h>
21 #include <proto/intuition.h>
23 #include "asl_intern.h"
24 #include LC_LIBDEFS_FILE
26 #define CATCOMP_NUMBERS
27 #include "strings.h"
29 #define DEBUG 0
30 #include <aros/debug.h>
32 /*****************************************************************************************/
34 /* Requester type specific default data */
35 const struct IntFileReq def_filereq =
38 ASL_FileRequest,
39 NULL, /* Window */
40 NULL, /* Screen */
41 NULL, /* PubScreenName */
42 NULL, /* IntuiMsgFunc */
43 NULL, /* TextAttr */
44 NULL, /* Locale */
45 NULL, /* Catalog */
46 NULL, /* MemPool */
47 2048, /* MemPoolPuddle */
48 2048, /* MemPoolThresh */
49 MSG_FILEREQ_TITLE, /* TitleID */
50 NULL, /* TitleText */
51 NULL, /* PositiveText */
52 NULL, /* NegativeText */
53 -1, -1, /* --> center on screen */
54 300, 300, /* Width/Height */
55 IF_POPTOFRONT
58 "", /* File */
59 "", /* Drawer */
60 "#?", /* Pattern */
61 NULL, /* AcceptPattern */ /* def. = "#?", but must be ParsePatternNoCase'ed */
62 NULL, /* RejectPattern */ /* def. = "~(#?)", but must be ParsePatternNoCase'ed */
63 0, /* Flags1 */
64 0, /* Flags2 */
65 NULL, /* FilterFunc */
66 NULL, /* HookFunc */
67 NULL, /* GetSortBy */
68 NULL, /* GetSortOrder */
69 NULL, /* GetSortDrawers */
70 ASLFRSORTBY_Name, /* SortBy */
71 ASLFRSORTORDER_Ascend, /* SortOrder */
72 ASLFRSORTDRAWERS_First, /* SortDrawers */
73 FALSE /* InitialShowVolumes */
76 /*****************************************************************************************/
78 const struct IntSMReq def_smreq =
81 ASL_ScreenModeRequest,
82 NULL, /* Window */
83 NULL, /* Screen */
84 NULL, /* PubScreenName */
85 NULL, /* IntuiMsgFunc */
86 NULL, /* TextAttr */
87 NULL, /* Locale */
88 NULL, /* Catalog */
89 NULL, /* MemPool */
90 2048, /* MemPoolPuddle */
91 2048, /* MemPoolThresh */
92 MSG_MODEREQ_TITLE, /* TitleID */
93 NULL, /* TitleText */
94 NULL, /* PositiveText */
95 NULL, /* NegativeText */
96 -1, -1, /* --> center on screen */
97 300, 300, /* Width/Height */
98 IF_POPTOFRONT
101 NULL, /* CustomSMList */
102 NULL, /* FilterFunc */
103 0, /* Flags */
104 LORES_KEY, /* DisplayID */
105 640, /* DisplayWidth */
106 200, /* DisplayHeight */
107 640, /* BitMapWidth */
108 200, /* BitMapHeight */
109 2, /* DisplayDepth */
110 OSCAN_TEXT, /* OverscanType */
111 TRUE, /* AutoScroll */
112 DIPF_IS_WB, /* PropertyFlags */
113 DIPF_IS_WB, /* PropertyMask */
114 1, /* MinDepth */
115 24, /* MaxDepth */
116 16, /* MinWidth */
117 16384, /* MaxWidth */
118 16, /* MinHeight */
119 16384, /* MaxHeight */
120 20, /* InfoLeftEdge */
121 20, /* InfoTopEdge */
122 FALSE /* InfoOpened */
125 /*****************************************************************************************/
127 const struct IntFontReq def_fontreq =
130 ASL_FontRequest,
131 NULL, /* Window */
132 NULL, /* Screen */
133 NULL, /* PubScreenName */
134 NULL, /* IntuiMsgFunc */
135 NULL, /* TextAttr */
136 NULL, /* Locale */
137 NULL, /* Catalog */
138 NULL, /* MemPool */
139 2048, /* MemPoolPuddle */
140 2048, /* MemPoolThresh */
141 MSG_FONTREQ_TITLE, /* TitleID */
142 NULL, /* TitleText */
143 NULL, /* PositiveText */
144 NULL, /* NegativeText */
145 -1, -1, /* --> center on screen */
146 300, 300, /* Width/Height */
147 IF_POPTOFRONT
149 {"topaz", 8, FS_NORMAL,FPF_ROMFONT},/* Default textattr */
150 1, /* FrontPen */
151 0, /* BackPen */
152 JAM1, /* DrawMode */
153 0, /* Flags */
155 5, /* Minheight */
156 24, /* MaxHeight */
157 NULL, /* FilterFunc */
158 NULL, /* HookFunc */
159 32, /* MaxFrontPen */
160 32, /* MaxBackPen */
162 NULL, /* ModeList */
163 NULL, /* FrontPens */
164 NULL, /* BackPens */
168 /* coolimages may fail to open */
169 LONG CoolImagesBase_version = -1;
171 /*****************************************************************************************/
173 VOID InitReqInfo(struct AslBase_intern *);
175 /*****************************************************************************************/
177 static int InitBase(LIBBASETYPEPTR LIBBASE)
179 D(bug("Inside InitBase of asl.library\n"));
181 NEWLIST(&LIBBASE->ReqList);
183 InitSemaphore(&LIBBASE->ReqListSem);
185 InitReqInfo(LIBBASE);
187 return TRUE;
190 /*****************************************************************************************/
192 ADD2INITLIB(InitBase, 0);
194 /*****************************************************************************************/
196 #include <string.h>
197 #include "filereqhooks.h"
198 #include "fontreqhooks.h"
199 #include "modereqhooks.h"
201 /*****************************************************************************************/
203 VOID InitReqInfo(struct AslBase_intern *AslBase)
205 struct AslReqInfo *reqinfo;
207 /* Set file requester info */
209 reqinfo = &(ASLB(AslBase)->ReqInfo[ASL_FileRequest]);
210 D(bug("AslBase: %p reqinfo: %p\n", AslBase, reqinfo));
211 reqinfo->IntReqSize = sizeof (struct IntFileReq);
212 reqinfo->ReqSize = sizeof (struct FileRequester);
213 reqinfo->DefaultReq = (struct IntFileReq *)&def_filereq;
214 reqinfo->UserDataSize = sizeof (struct FRUserData);
216 bzero(&(reqinfo->ParseTagsHook), sizeof (struct Hook));
217 bzero(&(reqinfo->GadgetryHook), sizeof (struct Hook));
218 reqinfo->ParseTagsHook.h_Entry = (void *)AROS_ASMSYMNAME(FRTagHook);
219 reqinfo->GadgetryHook.h_Entry = (void *)AROS_ASMSYMNAME(FRGadgetryHook);
221 /* Set font requester info */
223 reqinfo = &(ASLB(AslBase)->ReqInfo[ASL_FontRequest]);
224 reqinfo->IntReqSize = sizeof (struct IntFontReq);
225 reqinfo->ReqSize = sizeof (struct FontRequester);
226 reqinfo->DefaultReq = (struct IntFontReq *)&def_fontreq;
227 reqinfo->UserDataSize = sizeof (struct FOUserData);
229 bzero(&(reqinfo->ParseTagsHook), sizeof (struct Hook));
230 bzero(&(reqinfo->GadgetryHook), sizeof (struct Hook));
231 reqinfo->ParseTagsHook.h_Entry = (void *)AROS_ASMSYMNAME(FOTagHook);
232 reqinfo->GadgetryHook.h_Entry = (void *)AROS_ASMSYMNAME(FOGadgetryHook);
234 /* Set screenmode requester info */
236 reqinfo = &(ASLB(AslBase)->ReqInfo[ASL_ScreenModeRequest]);
237 reqinfo->IntReqSize = sizeof (struct IntSMReq);
238 reqinfo->ReqSize = sizeof (struct ScreenModeRequester);
239 reqinfo->DefaultReq = (struct IntSMReq *)&def_smreq;
240 reqinfo->UserDataSize = sizeof(struct SMUserData);
242 bzero(&(reqinfo->ParseTagsHook), sizeof (struct Hook));
243 bzero(&(reqinfo->GadgetryHook), sizeof (struct Hook));
244 reqinfo->ParseTagsHook.h_Entry = (void *)AROS_ASMSYMNAME(SMTagHook);
245 reqinfo->GadgetryHook.h_Entry = (void *)AROS_ASMSYMNAME(SMGadgetryHook);
248 /*****************************************************************************************/