|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
Data Structures | |
| struct | frstruct |
Macros | |
| #define | LVO_FileRequester (-0x54) |
| #define | LVO_PurgeFiles (-0x72) |
| #define | LVO_ColorRequester (-0xc0) |
| #define | BUFSIZE (320 + 320 + 150 + 150) |
| #define | FRQ_SIZEOF 356 |
Functions | |
| void | _requestfile (void) |
| void | _requestfiletitle (void) |
| void | _requestfiletitleflags (void) |
| void | _file (void) |
| void | _reqoutput (void) |
| void | _reqflags (void) |
| void | _colourreq (void) |
| void | rireqlib_libinit (void) |
| void | rireqlib_libfinit (void) |
| static ULONG | libinit_c (ULONG incoming) |
| init: open req.library (any version) and allocate the buffers. | |
| static void | libfinit_c (void) |
| finit: close req.library and free the buffers (if it was open). | |
| static void | reqflags_c (ULONG flags) |
| ReqFlags flags: the flags of the file requester (FrStruct's flags). | |
| static ULONG | file_c (void) |
| ReqFileLoc: the address of the path buffer. | |
| static ULONG | requestfile_c (void) |
| ReqFileRequest: the req.library file requester, the path as the result. | |
| static ULONG | requestfiletitle_c (STRPTR title, const ULONG *lens) |
| ReqFileRequest(title$): the file requester with a title. | |
| static ULONG | requestfiletitleflags_c (STRPTR title, ULONG flags, const ULONG *lens) |
| ReqFileRequest(title$,flags): the file requester with a title and flags. | |
| static ULONG | colourreq_c (ULONG colour) |
| ReqColour(colour): the req.library colour requester on the ReqOutput window. | |
| static void | reqoutput_c (APTR *win) |
| ReqOutput window#: the window of both requesters. | |
Variables | |
| static struct frstruct | FrStruct |
| static UBYTE * | frq_Title |
| static UBYTE * | frq_Dir |
| static UBYTE * | frq_File |
| static UBYTE * | frq_PathName |
| static APTR | routput |
| struct { | |
| ULONG defcolour | |
| APTR winptr | |
| ULONG rfu [5] | |
| } | ecr |
| static struct Library * | reqbase |
| static const char | reqname [] = "req.library" |
| #define BUFSIZE (320 + 320 + 150 + 150) |
| #define FRQ_SIZEOF 356 |
| #define LVO_ColorRequester (-0xc0) |
| #define LVO_FileRequester (-0x54) |
| #define LVO_PurgeFiles (-0x72) |
| void _colourreq | ( | void | ) |
| void _file | ( | void | ) |
| void _reqflags | ( | void | ) |
| void _reqoutput | ( | void | ) |
| void _requestfile | ( | void | ) |
| void _requestfiletitle | ( | void | ) |
| void _requestfiletitleflags | ( | void | ) |
|
static |
ReqColour(colour): the req.library colour requester on the ReqOutput window.
Fixed (#786): the argument is the default colour (DefColour); the original ignored it. Fixed (#1091): DefColour is a long at 0 and the window at 4, as req.library reads them; the original's word at 0 and window at 2 gave the requester another colour and a mangled window (so #786 alone had no effect with the real library). Fixed (#788): without req.library it returns $FFFF, what ColorRequester returns on cancel; the original called through a6 = 0.
| colour | d0: the colour the requester starts on |
|
static |
ReqFileLoc: the address of the path buffer.
The requester writes the chosen path there, which ReqFileRequest returns; a program may write a default path there before the call. 0 without the buffers (#788).
|
static |
finit: close req.library and free the buffers (if it was open).
PurgeFiles(FrStruct) first frees what req.library keeps in the structure from one FileRequester call to the next (the cached directory, its buffers); fixed (#1092): the original only closed the library, so that memory stayed allocated. FrStruct's buffer fields are cleared again (#785).
|
static |
init: open req.library (any version) and allocate the buffers.
One block of 940 bytes (MEMF_PUBLIC|MEMF_CLEAR): title (320), directory (150), file (150) and path (320); their addresses go to frq_Title ... frq_PathName and into FrStruct's title, directory, file and path fields (fixed, #785: the original never set the fields; its first version, ReqLib.bb, had them). No output window: FrStruct's window and the colour requester's are cleared (fixed, #1090: the original cleared only the colour requester's, so a second run from the editor gave the file requester the first run's closed window until its own ReqOutput). If the AllocMem fails, the library is closed again (_oops2).
| incoming | d0: returned unchanged if the library is already open |
|
static |
ReqFlags flags: the flags of the file requester (FrStruct's flags).
The default is $94: caching, info gadget and cache purge (fixed, #787).
| flags | d0: the req.library file requester flags |
|
static |
ReqOutput window#: the window of both requesters.
| win | a0: the window object (windowslib, ia0|pd0), its first long the Window |
|
static |
ReqFileRequest: the req.library file requester, the path as the result.
FileRequester(FrStruct); the path buffer is copied to a3, a3 ends on the terminating 0 (fixed, #784: the original left it behind the 0). FrStruct holds the buffers (fixed, #785: the original's had none, so the path was what the program wrote with ReqFileLoc, not the requester's). Fixed (#788): without req.library it returns "" as on cancel; the original called through a6 = 0.
|
static |
ReqFileRequest(title$): the file requester with a title.
The title string is given up (a3 back by its length + 1), then as requestfile_c. The title is for this call only: afterwards the title field points to the library's (empty) title buffer again (fixed, #789: the original kept the pointer to the given-up string for later calls without a title). On cancel a3 stays at the start of the title string.
| title | d0: the title |
| lens | a2: the argument stack, -4(a2) the length of title$ |
|
static |
ReqFileRequest(title$,flags): the file requester with a title and flags.
The flags are set for later calls too, like ReqFlags, as RIReqLib.guide documents it ("If this is omitted then the last flag setting is used"; not a defect, #789).
| title | d0: the title |
| flags | d1: the requester flags |
| lens | a2: the argument stack, -4(a2) the length of title$ |
| void rireqlib_libfinit | ( | void | ) |
| void rireqlib_libinit | ( | void | ) |
| ULONG defcolour |
| struct { ... } ecr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| ULONG rfu[5] |
|
static |
| APTR winptr |