3 #include <exec/types.h>
4 #include <exec/libraries.h>
5 #include <graphics/displayinfo.h>
6 #include <libraries/asl.h>
8 #include <clib/exec_protos.h>
9 #include <clib/asl_protos.h>
11 #include <proto/exec.h>
12 #include <proto/asl.h>
17 int CXBRK(void) { return(0); } /* Disable Lattice CTRL/C handling */
18 void chkabort(void) { return; } /* really */
26 struct Library
*AslBase
= NULL
;
28 struct TextAttr mytextattr
=
30 "arial.font", 13, 0, 0
33 struct TagItem fotags1
[] =
35 {ASLFO_TextAttr
, (IPTR
)&mytextattr
},
36 {ASLFO_TitleText
, (IPTR
)"ASL Font requester" },
37 {ASLFO_DoDrawMode
, TRUE
},
38 {ASLFO_DoStyle
, TRUE
},
42 static void showrequester(char *msg
, struct TagItem
*tags
)
44 struct FontRequester
*freq
;
46 printf("\n%s:\n",msg
? msg
: "");
48 if ((freq
= (struct FontRequester
*)AllocAslRequest(ASL_FontRequest
, tags
)))
50 if (AslRequest(freq
, NULL
))
52 printf("\n-------------------------------------------------------\n\n");
53 printf("FontName = %s\n", freq
->fo_TAttr
.tta_Name
);
54 printf("FontSize = %d\n", freq
->fo_TAttr
.tta_YSize
);
55 printf("FontStyle = %d\n", freq
->fo_TAttr
.tta_Style
);
56 printf("FontFlags = %d\n", freq
->fo_TAttr
.tta_Flags
);
57 printf("DrawMode = %d\n", freq
->fo_DrawMode
);
59 } else printf("\nRequester was aborted\n");
62 else printf("Could not alloc FontRequester\n");
65 int main(int argc
, char **argv
)
67 if ((AslBase
= OpenLibrary("asl.library", 37L)))
69 showrequester("Default requester with no tags", NULL
);
70 showrequester(NULL
, fotags1
);
72 CloseLibrary(AslBase
);
74 puts("Could not open asl.library!\n");