2 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
5 ASL initialization code.
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
30 #include <aros/debug.h>
32 /*****************************************************************************************/
34 /* Requester type specific default data */
35 const struct IntFileReq def_filereq
=
41 NULL
, /* PubScreenName */
42 NULL
, /* IntuiMsgFunc */
47 2048, /* MemPoolPuddle */
48 2048, /* MemPoolThresh */
49 MSG_FILEREQ_TITLE
, /* TitleID */
51 NULL
, /* PositiveText */
52 NULL
, /* NegativeText */
53 -1, -1, /* --> center on screen */
54 300, 300, /* Width/Height */
61 NULL
, /* AcceptPattern */ /* def. = "#?", but must be ParsePatternNoCase'ed */
62 NULL
, /* RejectPattern */ /* def. = "~(#?)", but must be ParsePatternNoCase'ed */
65 NULL
, /* FilterFunc */
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
,
84 NULL
, /* PubScreenName */
85 NULL
, /* IntuiMsgFunc */
90 2048, /* MemPoolPuddle */
91 2048, /* MemPoolThresh */
92 MSG_MODEREQ_TITLE
, /* TitleID */
94 NULL
, /* PositiveText */
95 NULL
, /* NegativeText */
96 -1, -1, /* --> center on screen */
97 300, 300, /* Width/Height */
101 NULL
, /* CustomSMList */
102 NULL
, /* FilterFunc */
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 */
117 16384, /* MaxWidth */
119 16384, /* MaxHeight */
120 20, /* InfoLeftEdge */
121 20, /* InfoTopEdge */
122 FALSE
/* InfoOpened */
125 /*****************************************************************************************/
127 const struct IntFontReq def_fontreq
=
133 NULL
, /* PubScreenName */
134 NULL
, /* IntuiMsgFunc */
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 */
149 {"topaz", 8, FS_NORMAL
,FPF_ROMFONT
},/* Default textattr */
157 NULL
, /* FilterFunc */
159 32, /* MaxFrontPen */
163 NULL
, /* FrontPens */
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
);
190 /*****************************************************************************************/
192 ADD2INITLIB(InitBase
, 0);
194 /*****************************************************************************************/
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 /*****************************************************************************************/