2 Copyright © 1995-2006, 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 */
60 NULL
, /* AcceptPattern */ /* def. = "#?", but must be ParsePatternNoCase'ed */
61 NULL
, /* RejectPattern */ /* def. = "~(#?)", but must be ParsePatternNoCase'ed */
63 FRF_REJECTICONS
, /* Flags2 */
64 NULL
, /* FilterFunc */
67 NULL
, /* GetSortOrder */
68 NULL
, /* GetSortDrawers */
69 ASLFRSORTBY_Name
, /* SortBy */
70 ASLFRSORTORDER_Ascend
, /* SortOrder */
71 ASLFRSORTDRAWERS_First
, /* SortDrawers */
72 FALSE
/* InitialShowVolumes */
75 /*****************************************************************************************/
77 const struct IntSMReq def_smreq
=
80 ASL_ScreenModeRequest
,
83 NULL
, /* PubScreenName */
84 NULL
, /* IntuiMsgFunc */
89 2048, /* MemPoolPuddle */
90 2048, /* MemPoolThresh */
91 MSG_MODEREQ_TITLE
, /* TitleID */
93 NULL
, /* PositiveText */
94 NULL
, /* NegativeText */
95 -1, -1, /* --> center on screen */
96 300, 300 /* Width/Height */
99 NULL
, /* CustomSMList */
100 NULL
, /* FilterFunc */
102 LORES_KEY
, /* DisplayID */
103 640, /* DisplayWidth */
104 200, /* DisplayHeight */
105 640, /* BitMapWidth */
106 200, /* BitMapHeight */
107 2, /* DisplayDepth */
108 OSCAN_TEXT
, /* OverscanType */
109 TRUE
, /* AutoScroll */
110 DIPF_IS_WB
, /* PropertyFlags */
111 DIPF_IS_WB
, /* PropertyMask */
115 16384, /* MaxWidth */
117 16384, /* MaxHeight */
118 20, /* InfoLeftEdge */
119 20, /* InfoTopEdge */
120 FALSE
/* InfoOpened */
123 /*****************************************************************************************/
125 const struct IntFontReq def_fontreq
=
131 NULL
, /* PubScreenName */
132 NULL
, /* IntuiMsgFunc */
137 2048, /* MemPoolPuddle */
138 2048, /* MemPoolThresh */
139 MSG_FONTREQ_TITLE
, /* TitleID */
140 NULL
, /* TitleText */
141 NULL
, /* PositiveText */
142 NULL
, /* NegativeText */
143 -1, -1, /* --> center on screen */
144 300, 300 /* Width/Height */
146 {"topaz", 8, FS_NORMAL
,FPF_ROMFONT
},/* Default textattr */
154 NULL
, /* FilterFunc */
156 32, /* MaxFrontPen */
160 NULL
, /* FrontPens */
165 /* coolimages may fail to open */
166 LONG CoolImagesBase_version
= -1;
168 /*****************************************************************************************/
170 VOID
InitReqInfo(struct AslBase_intern
*);
172 /*****************************************************************************************/
174 static int InitBase(LIBBASETYPEPTR LIBBASE
)
176 D(bug("Inside InitBase of asl.library\n"));
178 NEWLIST(&LIBBASE
->ReqList
);
180 InitSemaphore(&LIBBASE
->ReqListSem
);
182 InitReqInfo(LIBBASE
);
187 /*****************************************************************************************/
189 ADD2INITLIB(InitBase
, 0);
191 /*****************************************************************************************/
194 #include "filereqhooks.h"
195 #include "fontreqhooks.h"
196 #include "modereqhooks.h"
198 /*****************************************************************************************/
200 VOID
InitReqInfo(struct AslBase_intern
*AslBase
)
202 struct AslReqInfo
*reqinfo
;
204 /* Set file requester info */
206 reqinfo
= &(ASLB(AslBase
)->ReqInfo
[ASL_FileRequest
]);
207 D(bug("AslBase: %p reqinfo: %p\n", AslBase
, reqinfo
));
208 reqinfo
->IntReqSize
= sizeof (struct IntFileReq
);
209 reqinfo
->ReqSize
= sizeof (struct FileRequester
);
210 reqinfo
->DefaultReq
= (struct IntFileReq
*)&def_filereq
;
211 reqinfo
->UserDataSize
= sizeof (struct FRUserData
);
213 bzero(&(reqinfo
->ParseTagsHook
), sizeof (struct Hook
));
214 bzero(&(reqinfo
->GadgetryHook
), sizeof (struct Hook
));
215 reqinfo
->ParseTagsHook
.h_Entry
= (void *)AROS_ASMSYMNAME(FRTagHook
);
216 reqinfo
->GadgetryHook
.h_Entry
= (void *)AROS_ASMSYMNAME(FRGadgetryHook
);
218 /* Set font requester info */
220 reqinfo
= &(ASLB(AslBase
)->ReqInfo
[ASL_FontRequest
]);
221 reqinfo
->IntReqSize
= sizeof (struct IntFontReq
);
222 reqinfo
->ReqSize
= sizeof (struct FontRequester
);
223 reqinfo
->DefaultReq
= (struct IntFontReq
*)&def_fontreq
;
224 reqinfo
->UserDataSize
= sizeof (struct FOUserData
);
226 bzero(&(reqinfo
->ParseTagsHook
), sizeof (struct Hook
));
227 bzero(&(reqinfo
->GadgetryHook
), sizeof (struct Hook
));
228 reqinfo
->ParseTagsHook
.h_Entry
= (void *)AROS_ASMSYMNAME(FOTagHook
);
229 reqinfo
->GadgetryHook
.h_Entry
= (void *)AROS_ASMSYMNAME(FOGadgetryHook
);
231 /* Set screenmode requester info */
233 reqinfo
= &(ASLB(AslBase
)->ReqInfo
[ASL_ScreenModeRequest
]);
234 reqinfo
->IntReqSize
= sizeof (struct IntSMReq
);
235 reqinfo
->ReqSize
= sizeof (struct ScreenModeRequester
);
236 reqinfo
->DefaultReq
= (struct IntSMReq
*)&def_smreq
;
237 reqinfo
->UserDataSize
= sizeof(struct SMUserData
);
239 bzero(&(reqinfo
->ParseTagsHook
), sizeof (struct Hook
));
240 bzero(&(reqinfo
->GadgetryHook
), sizeof (struct Hook
));
241 reqinfo
->ParseTagsHook
.h_Entry
= (void *)AROS_ASMSYMNAME(SMTagHook
);
242 reqinfo
->GadgetryHook
.h_Entry
= (void *)AROS_ASMSYMNAME(SMGadgetryHook
);
247 /*****************************************************************************************/