|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "blitzlib.h"#include "blitzexec.h"#include <intuition/screens.h>#include <libraries/asl.h>#include <proto/asl.h>Macros | |
| #define | __NOLIBBASE__ |
| #define | ASL_BASE_NAME aslbase |
| #define | FRF_DRAWERSONLY_ 1 |
| #define | ASLTAG 0x80080000UL |
| #define | SVAR (BL_VARPTR | BL_STRING) |
| #define | FREEREQ(r) |
| #define | FREQ_ARGS |
Functions | |
| void | doaslfreqa (void) |
| void | doaslfreqb (void) |
| void | doaslfreqc (void) |
| void | doaslfreqd (void) |
| void | doaslfreqe (void) |
| void | doaslfreqf (void) |
| ULONG | doaslfont (ULONG flags, struct Screen **scr) |
| ASLFontRequest(flags): an ASL font requester on the used screen. | |
| ULONG | doaslscreen (ULONG flags, struct Screen **scr) |
| ASLScreenRequest(flags): an ASL screen mode requester on the used screen. | |
| static void | codeinit (void) |
| init: OpenLibrary("asl.library",0) -> aslbase (0 if not there). | |
| static void | codefinit (void) |
| finit: CloseLibrary(aslbase) if it was opened. | |
| void | asllib_freqchk (void) |
| void | freqchk2 (void) |
| static ULONG | allocst (ULONG s, ULONG len) |
| static void | freecopies (void) |
| static UWORD | copyout (const UBYTE *s, UBYTE *var) |
| static UWORD | copyresult (const UBYTE *s) |
| static ULONG | aslreq (ULONG title, ULONG path, ULONG file, struct Screen **scr, const ULONG *lens) |
| static void | dims (ULONG x, ULONG y, ULONG w, ULONG h) |
| static ULONG | freqa_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLFileRequest$(Title$,Pathname$,Filename$): an ASL file requester at 20,20 280x160 (doaslfreqa). | |
| static ULONG | freqb_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLFileRequest$(Title$,Pathname$,Filename$,Pattern$): with a pattern (FRF_DOPATTERNS), at 20,20 280x160 (doaslfreqb). | |
| static ULONG | freqc_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLFileRequest$(Title$,Pathname$,Filename$,x,y,w,h): at the given position and size (doaslfreqc). | |
| static ULONG | freqd_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLFileRequest$(Title$,Pathname$,Filename$,Pattern$,x,y,w,h): with a pattern, at the given position and size (doaslfreqd). | |
| static ULONG | freqe_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLPathRequest$(Title$,Pathname$): an ASL drawer requester (FRF_DRAWERSONLY) at 20,20 280x160 (doaslfreqe). | |
| static ULONG | freqf_c (ULONG arg0, ULONG arg1, ULONG arg2, ULONG arg3, ULONG arg4, ULONG arg5, struct Screen **scr, const ULONG *lens) |
| ASLPathRequest$(Title$,Pathname$,x,y,w,h): an ASL drawer requester at the given position and size (doaslfreqf). | |
| static void | freqchk_c (ULONG path, ULONG file) |
| static void | freqchk2_c (ULONG path) |
Variables | |
| static struct Library * | aslbase |
| static APTR | aslstruct |
| struct { | |
| struct TagItem screen | |
| struct TagItem flags | |
| struct TagItem maxheight | |
| struct TagItem end | |
| } | ftags |
| struct { | |
| char * name | |
| UWORD size | |
| UBYTE style | |
| UBYTE flags | |
| UBYTE pen1 | |
| UBYTE pen2 | |
| UBYTE drawmode | |
| UBYTE pad | |
| ULONG len | |
| char str [96] | |
| } | fstruct = { fstruct.str } |
| static struct ScreenModeRequester | smresult |
| struct { | |
| struct TagItem screen | |
| struct TagItem dotags [5] | |
| struct TagItem end | |
| } | stags |
| static const UWORD | nullstr [1] = { 0 } |
| struct { | |
| struct TagItem screen | |
| struct TagItem name | |
| struct TagItem path | |
| struct TagItem file | |
| struct TagItem x | |
| struct TagItem y | |
| struct TagItem w | |
| struct TagItem h | |
| struct TagItem flags | |
| struct TagItem pattern | |
| struct TagItem noinfo | |
| struct TagItem flags2 | |
| struct TagItem end | |
| } | Tags |
| #define __NOLIBBASE__ |
| #define ASL_BASE_NAME aslbase |
| #define ASLTAG 0x80080000UL |
| #define FREEREQ | ( | r | ) |
| #define FREQ_ARGS |
| #define FRF_DRAWERSONLY_ 1 |
|
static |
| void asllib_freqchk | ( | void | ) |
|
static |
|
static |
finit: CloseLibrary(aslbase) if it was opened.
|
static |
init: OpenLibrary("asl.library",0) -> aslbase (0 if not there).
|
static |
|
static |
|
static |
| ULONG doaslfont | ( | ULONG | flags, |
| struct Screen ** | scr ) |
ASLFontRequest(flags): an ASL font requester on the used screen.
Amiga mode only. flags enable the gadgets (1 = pen, 2 = background, 4 = style, 8 = drawmode, 16 = fixed size; ASLFO_Flags). On OK the font is copied into the static .fontinfo {name$ (pointer to a BB2 string: length.l in front), ysize.w, style.b, flags.b, pen1.b, pen2.b, drawmode.b, pad.b}. The test is on d7, the name length after a request: an empty font name returns 0 as well (not a bug: an empty name is no font OpenDiskFont could open). BUG(orig) (#65): a name of more than 95 characters overruns the static buffer. The CD binary has an extra tag ASL_TB+17 = 256 (ASLFO_MaxHeight).
| flags | d0: the enable flags |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| void doaslfreqa | ( | void | ) |
| void doaslfreqb | ( | void | ) |
| void doaslfreqc | ( | void | ) |
| void doaslfreqd | ( | void | ) |
| void doaslfreqe | ( | void | ) |
| void doaslfreqf | ( | void | ) |
| ULONG doaslscreen | ( | ULONG | flags, |
| struct Screen ** | scr ) |
ASLScreenRequest(flags): an ASL screen mode requester on the used screen.
Amiga mode only. flags enable the gadgets (1 = width, 2 = height, 4 = depth, 8 = overscan, 16 = autoscroll; ASLSM_Do*: -1/0). Fixed (#60): returns a copy of the requester's fields (static, struct ScreenModeRequester: sm_DisplayID ... sm_UserData), made before the requester is freed; the original returned the freed requester.
| flags | d0: the enable flags |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
|
static |
|
static |
ASLFileRequest$(Title$,Pathname$,Filename$): an ASL file requester at 20,20 280x160 (doaslfreqa).
The common part (aslreq): on OK the drawer and the file name are copied into the path$/file$ variables (their length longs at -4 updated); the result is drawer + "/" (unless empty or ending in ":") + file, written at a3 = the title argument's place in the string work area; Cancel: "" (0 at a3), also without asl.library (fixed #62). Fixed (#63): the title (and pattern) copies of maxslib allocst are freed after the request. Fixed (#403): FreeFileRequest only for an allocated requester. Errors (debugger, freqchk): path$ and file$ must be variables with room for 160/64 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: the file$ variable |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length |
|
static |
ASLFileRequest$(Title$,Pathname$,Filename$,Pattern$): with a pattern (FRF_DOPATTERNS), at 20,20 280x160 (doaslfreqb).
The common part (aslreq): on OK the drawer and the file name are copied into the path$/file$ variables (their length longs at -4 updated); the result is drawer + "/" (unless empty or ending in ":") + file, written at a3 = the title argument's place in the string work area; Cancel: "" (0 at a3), also without asl.library (fixed #62). Fixed (#63): the title (and pattern) copies of maxslib allocst are freed after the request. Fixed (#403): FreeFileRequest only for an allocated requester. Errors (debugger, freqchk): path$ and file$ must be variables with room for 160/64 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: the file$ variable |
| arg3 | d3: the pattern |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length, -8(a2) = the pattern's |
|
static |
ASLFileRequest$(Title$,Pathname$,Filename$,x,y,w,h): at the given position and size (doaslfreqc).
The common part (aslreq): on OK the drawer and the file name are copied into the path$/file$ variables (their length longs at -4 updated); the result is drawer + "/" (unless empty or ending in ":") + file, written at a3 = the title argument's place in the string work area; Cancel: "" (0 at a3), also without asl.library (fixed #62). Fixed (#63): the title (and pattern) copies of maxslib allocst are freed after the request. Fixed (#403): FreeFileRequest only for an allocated requester. Errors (debugger, freqchk): path$ and file$ must be variables with room for 160/64 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: the file$ variable |
| arg3 | d3: x |
| arg4 | d4: y |
| arg5 | d5: w |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length, -8(a2) = h |
| void freqchk2 | ( | void | ) |
|
static |
|
static |
|
static |
ASLFileRequest$(Title$,Pathname$,Filename$,Pattern$,x,y,w,h): with a pattern, at the given position and size (doaslfreqd).
The common part (aslreq): on OK the drawer and the file name are copied into the path$/file$ variables (their length longs at -4 updated); the result is drawer + "/" (unless empty or ending in ":") + file, written at a3 = the title argument's place in the string work area; Cancel: "" (0 at a3), also without asl.library (fixed #62). Fixed (#63): the title (and pattern) copies of maxslib allocst are freed after the request. Fixed (#403): FreeFileRequest only for an allocated requester. Errors (debugger, freqchk): path$ and file$ must be variables with room for 160/64 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: the file$ variable |
| arg3 | d3: the pattern |
| arg4 | d4: x |
| arg5 | d5: y |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length, -8(a2) = the pattern's, -12(a2) = w, -16(a2) = h |
|
static |
ASLPathRequest$(Title$,Pathname$): an ASL drawer requester (FRF_DRAWERSONLY) at 20,20 280x160 (doaslfreqe).
As ASLFileRequest$ (aslreq), without a file name variable. Fixed (#61): no initial file, fr_File goes into the result only (the original copied it to the address in d2, which is no argument here, and wrote its length to d2-4). Fixed (#64): no pattern gadget (the original kept the pattern flag of the previous ASLFileRequest$). Errors (debugger, freqchk2): path$ must be a variable with room for 160 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: no argument (not used, fixed #61) |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length |
|
static |
ASLPathRequest$(Title$,Pathname$,x,y,w,h): an ASL drawer requester at the given position and size (doaslfreqf).
As ASLPathRequest$. Fixed (#61): fr_File goes into the result only (the original copied it to the address in d2 = x and its length to x-4). Errors (debugger, freqchk2): path$ must be a variable with room for 160 characters.
| arg0 | d0: the title |
| arg1 | d1: the path$ variable |
| arg2 | d2: x |
| arg3 | d3: y |
| arg4 | d4: w |
| arg5 | d5: h |
| scr | a1: the used screen object (!libs {screenslib,$1102}): its Screen, 0 = the default public screen |
| lens | a2: the compiler's string stack, -4(a2) = the title's length |
|
static |
|
static |
| struct TagItem dotags[5] |
| UBYTE drawmode |
| struct TagItem end |
| struct TagItem file |
| struct TagItem flags |
| struct TagItem flags2 |
| struct { ... } fstruct |
| struct { ... } ftags |
| struct TagItem h |
| ULONG len |
| struct TagItem maxheight |
| struct TagItem name |
| struct TagItem noinfo |
|
static |
| UBYTE pad |
| struct TagItem path |
| struct TagItem pattern |
| UBYTE pen1 |
| UBYTE pen2 |
| struct TagItem screen |
| UWORD size |
|
static |
| struct { ... } stags |
| char str[96] |
| UBYTE style |
| struct { ... } Tags |
| struct TagItem w |
| struct TagItem x |
| struct TagItem y |