|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "blitzlib.h"#include "blitzobj.h"#include <intuition/intuition.h>#include <proto/intuition.h>#include <stddef.h>Data Structures | |
| struct | gborder |
| struct | gborders |
| struct | gtext |
Macros | |
| #define | __NOLIBBASE__ |
| #define | INTUITION_BASE_NAME intbase |
| #define | BORDERSIZ 36 |
| #define | BORDERMEM (BORDERSIZ * 2) |
| #define | GADGETSIZE 44 |
| #define | GFLAGS_HI(gad) |
| #define | GFLAGS_LO(gad) |
| #define | GACT_HI(gad) |
| #define | GACT_LO(gad) |
| #define | GTYPE_HI(gad) |
| #define | GTYPE_LO(gad) |
| #define | GUSER_BL(gad) |
| #define | GUSER_GROUP(gad) |
| #define | UW(p, o) |
Functions | |
| void | dotextgadget (WORD x, WORD y, ULONG flags, UWORD id, const UBYTE *text, struct TextAttr **font, const ULONG *lens, struct Library *intbase) |
| TextGadget GadgetList#,X,Y,Flags,Id,Text$: add a text (boolean) gadget to the list. | |
| void | dostringgadget (WORD x, WORD y, ULONG flags, UWORD id, UWORD maxlen, const UWORD *args) |
| StringGadget GadgetList#,X,Y,Flags,Id,Maxlen,Width: add a string gadget to the list. | |
| void | dopropgadget (WORD x, WORD y, ULONG flags, UWORD id, UWORD w, const UWORD *args) |
| PropGadget GadgetList#,X,Y,Flags,Id,Width,Height: add a proportional gadget to the list. | |
| void | doshapegadget (WORD x, WORD y, ULONG flags, UWORD id, const struct bb_shape *shape) |
| ShapeGadget GadgetList#,X,Y,Flags,Id,Shape#: add an image gadget made from a shape. | |
| void | doshapegadget2 (WORD x, WORD y, ULONG flags, UWORD id, const struct bb_shape *alt, const struct bb_shape *shape) |
| ShapeGadget GadgetList#,X,Y,Flags,Id,Shape#,Shape#: an image gadget with an alternative image for the selected state (GADGHIMAGE). | |
| void | dosethprop (void) |
| void | dosetvprop (void) |
| void | dohproppot (void) |
| void | dohpropbody (void) |
| void | dovproppot (void) |
| void | dovpropbody (void) |
| void | doredraw (UWORD id, struct Window **win, struct Library *intbase) |
| Redraw Window#,Id: redraw a gadget of the window. | |
| void | gadgetslib_doselect (void) |
| void | gadgetslib_doselect2 (void) |
| void | dogborder (WORD x, WORD y, WORD w, WORD h, struct Window **win, struct Library *intbase) |
| GadgetBorder X,Y,Width,Height: draw a gadget style border into the used window. | |
| void | dogb2 (void) |
| void | dogb (void) |
| ULONG | dostringactivate (UWORD id, struct Window **win, struct Library *intbase) |
| ActivateString Window#,Id: activate a string gadget of the window. | |
| void | dostringreset (void) |
| void | dostringtext (void) |
| void | dostringclear (void) |
| void | dogpens2 (void) |
| void | dogpens (void) |
| void | dobpens (void) |
| void | dogjam (void) |
| void | doselectmode (void) |
| void | dosetstring (void) |
| void | dobgroup (void) |
| void | dogstatus (void) |
| void | dobuttonid (void) |
| void | gadgetslib_doenable (void) |
| void | gadgetslib_dodisable (void) |
| void | setdogstatus (void) |
| void | settextgadget (void) |
| void | gadgetslib_codeinit (void) |
| void | freegadget (void) |
| _free of a GadgetList object: free its gadgets. | |
| void | gadgetslib_sgchk (void) |
| void | gadgetslib_sgchk2 (void) |
| void | propchk (void) |
| void | redrawchk (void) |
| void | gchk (void) |
| void | gadgetslib_wchk (void) |
| void | actchk (void) |
| void | reschk (void) |
| void | settest (void) |
| void | bgroupchk (void) |
| void | stringchk (void) |
| static UBYTE * | allocst (const UBYTE *s, ULONG len) |
| static void | freest (ULONG str) |
| static UBYTE * | globalloc (ULONG size, ULONG flags) |
| static void | globfree (void *mem, ULONG size) |
| static struct Gadget * | findgadget (struct Gadget **list, UWORD id) |
| static void | codeinit_c (void) |
| static void | dobgroup_c (UWORD grp) |
| ButtonGroup Group: the button group of the following gadgets. | |
| BLITZ_ALIAS (dobgroup, dobgroup_c) | |
| static void | doselectmode_c (UWORD on) |
| SelectMode 1=Box, 0=Inverse: the highlight mode of new gadgets. | |
| BLITZ_ALIAS (doselectmode, doselectmode_c) | |
| static void | dogjam_c (UBYTE mode) |
| GadgetJam Jammode: the draw mode of the gadget texts. | |
| BLITZ_ALIAS (dogjam, dogjam_c) | |
| static void | dogpens_c (UBYTE fg, UBYTE bg) |
| GadgetPens Foreground Colour,Background Colour: the pens of the gadget texts. | |
| BLITZ_ALIAS (dogpens, dogpens_c) | |
| static void | dogpens2_c (UBYTE fg) |
| GadgetPens Foreground Colour: the front pen only. | |
| BLITZ_ALIAS (dogpens2, dogpens2_c) | |
| static void | dobpens_c (UBYTE light, UBYTE shadow) |
| BorderPens Highlight Colour,Shadow Colour: the pens of the gadget borders. | |
| BLITZ_ALIAS (dobpens, dobpens_c) | |
| static void | dogb_c (UWORD w, UWORD h) |
| Borders Width,Height: the space between a gadget's text and its border. | |
| BLITZ_ALIAS (dogb, dogb_c) | |
| static void | dogb2_c (WORD on) |
| Borders On|Off: give new gadgets borders or not. | |
| BLITZ_ALIAS (dogb2, dogb2_c) | |
| static struct gborders * | allocborder2 (WORD w, WORD h) |
| static struct gborders * | allocborder (WORD w, WORD h) |
| static struct Gadget * | allocgadget (WORD x, WORD y, UWORD id, WORD w, WORD h) |
| static struct gtext * | allocintui (const UBYTE *s, ULONG len) |
| static void | handleflags (struct Gadget *gad, ULONG flags) |
| static WORD | findmaxlen (struct gtext *it, struct Library *intbase) |
| static struct Image * | makeintuishape (const struct bb_shape *shape) |
| static void | shapegadget (WORD x, WORD y, ULONG flags, UWORD id, const struct bb_shape *shape, struct Image *alt) |
| static void | setprop (UWORD id, ULONG pot, ULONG body, struct Gadget **list, int off) |
| static void | dosethprop_c (UWORD id, ULONG pot, ULONG body, struct Gadget **list) |
| SetHProp GadgetList#,Id,Pot,Body: the horizontal pot and body of a prop gadget. | |
| BLITZ_ALIAS (dosethprop, dosethprop_c) | |
| static void | dosetvprop_c (UWORD id, ULONG pot, ULONG body, struct Gadget **list) |
| SetVProp GadgetList#,Id,Pot,Body: the vertical pot and body of a prop gadget. | |
| BLITZ_ALIAS (dosetvprop, dosetvprop_c) | |
| static ULONG | readprop (UWORD id, struct Gadget **list, int off) |
| static ULONG | dohproppot_c (UWORD id, struct Gadget **list) |
| HPropPot(GadgetList#,Id): the HorizPot of a prop gadget. | |
| BLITZ_ALIAS (dohproppot, dohproppot_c) | |
| static ULONG | dohpropbody_c (UWORD id, struct Gadget **list) |
| HPropBody(GadgetList#,Id): the HorizBody of a prop gadget. | |
| BLITZ_ALIAS (dohpropbody, dohpropbody_c) | |
| static ULONG | dovproppot_c (UWORD id, struct Gadget **list) |
| VPropPot(GadgetList#,Id): the VertPot of a prop gadget. | |
| BLITZ_ALIAS (dovproppot, dovproppot_c) | |
| static ULONG | dovpropbody_c (UWORD id, struct Gadget **list) |
| VPropBody(GadgetList#,Id): the VertBody of a prop gadget. | |
| BLITZ_ALIAS (dovpropbody, dovpropbody_c) | |
| static void | doselect_c (UWORD id, UWORD on, struct Gadget **list) |
| Toggle GadgetList#,Id,On|Off: select or deselect a gadget. | |
| BLITZ_ALIAS (gadgetslib_doselect, doselect_c) | |
| static void | doselect2_c (UWORD id, struct Gadget **list) |
| Toggle GadgetList#,Id: flip the SELECTED state of a gadget. | |
| BLITZ_ALIAS (gadgetslib_doselect2, doselect2_c) | |
| static void | doenable_c (UWORD id, struct Gadget **list) |
| Enable GadgetList#,Id: clear DISABLED of a gadget. | |
| BLITZ_ALIAS (gadgetslib_doenable, doenable_c) | |
| static void | dodisable_c (UWORD id, struct Gadget **list) |
| Disable GadgetList#,Id: set DISABLED of a gadget. | |
| BLITZ_ALIAS (gadgetslib_dodisable, dodisable_c) | |
| static void | setdogstatus_c (UWORD id, UWORD v, struct Gadget **list) |
| SetGadgetStatus GadgetList#,Id,Value: show text part Value of a cycling text gadget. | |
| BLITZ_ALIAS (setdogstatus, setdogstatus_c) | |
| static ULONG | dogstatus_c (UWORD id, struct Gadget **list) |
| GadgetStatus(GadgetList#,Id): the shown text part, or whether the gadget is selected. | |
| BLITZ_ALIAS (dogstatus, dogstatus_c) | |
| static ULONG | dobuttonid_c (UWORD grp, struct Gadget **list) |
| ButtonId(GadgetList#,ButtonGroup): the selected gadget of a button group. | |
| BLITZ_ALIAS (dobuttonid, dobuttonid_c) | |
| static void | settextgadget_c (UWORD id, const UBYTE *src, struct Gadget **list) |
| SetTextGadget GadgetList#,Id,Text$: overwrite the text of a gadget. | |
| BLITZ_ALIAS (settextgadget, settextgadget_c) | |
| static void | dosetstring_c (UWORD id, const UBYTE *s, struct Gadget **list) |
| SetString GadgetList#,Id,String$: set the contents of a string gadget. | |
| BLITZ_ALIAS (dosetstring, dosetstring_c) | |
| static void | dostringclear_c (UWORD id, struct Gadget **list) |
| ClearString GadgetList#,Id: empty a string gadget. | |
| BLITZ_ALIAS (dostringclear, dostringclear_c) | |
| static void | dostringreset_c (UWORD id, struct Gadget **list) |
| ResetString GadgetList#,Id: the cursor of a string gadget to the start. | |
| BLITZ_ALIAS (dostringreset, dostringreset_c) | |
| static ULONG | dostringtext_c (UWORD id, struct Gadget **list) |
| StringText$(GadgetList#,Id): the contents of a string gadget. | |
| BLITZ_ALIAS (dostringtext, dostringtext_c) | |
| static void | freerend (struct Gadget *gad, APTR r) |
| static struct Gadget * | gchk1 (struct Gadget **list, UWORD id) |
| static void | gchk_c (UWORD id, struct Gadget **list) |
| static void | propchk_c (UWORD id, struct Gadget **list) |
| static struct Gadget * | redrawchk1 (UWORD id, struct Window **win) |
| static void | redrawchk_c (UWORD id, struct Window **win) |
| static void | actchk_c (UWORD id, struct Window **win) |
| static struct Gadget * | reschk1 (UWORD id, struct Gadget **list) |
| static void | reschk_c (UWORD id, struct Gadget **list) |
| static void | settest_c (UWORD id, struct Gadget **list, const ULONG *lens) |
| static void | wchk_c (struct Window **win) |
| static void | sgchk2_c (const struct bb_shape *alt, const struct bb_shape *shape) |
| static void | sgchk_c (const struct bb_shape *shape) |
| static void | bgroupchk_c (WORD grp) |
| static void | stringchk_c (UWORD maxlen) |
Variables | |
| struct { | |
| UBYTE fpen | |
| UBYTE bpen | |
| UBYTE bco1 | |
| UBYTE bco2 | |
| UBYTE mode | |
| UBYTE pad | |
| WORD bxxs | |
| WORD byxs | |
| WORD fhit | |
| WORD bordersok | |
| WORD bxxs2 | |
| WORD byxs2 | |
| ULONG fontattr | |
| WORD selmode | |
| WORD defflags | |
| WORD bgroup | |
| } | g = { 1, 0, 1, 2, 0, 0, 4, 2, 8, -1, 4, 2, 0, 0, 0, 0 } |
| #define __NOLIBBASE__ |
| #define BORDERMEM (BORDERSIZ * 2) |
| #define BORDERSIZ 36 |
| #define GACT_HI | ( | gad | ) |
| #define GACT_LO | ( | gad | ) |
| #define GADGETSIZE 44 |
| #define GFLAGS_HI | ( | gad | ) |
| #define GFLAGS_LO | ( | gad | ) |
| #define GTYPE_HI | ( | gad | ) |
| #define GTYPE_LO | ( | gad | ) |
| #define GUSER_BL | ( | gad | ) |
| #define GUSER_GROUP | ( | gad | ) |
| #define INTUITION_BASE_NAME intbase |
| #define UW | ( | p, | |
| o ) |
| void actchk | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void bgroupchk | ( | void | ) |
|
static |
| BLITZ_ALIAS | ( | dobgroup | , |
| dobgroup_c | ) |
| BLITZ_ALIAS | ( | dobuttonid | , |
| dobuttonid_c | ) |
| BLITZ_ALIAS | ( | dogpens2 | , |
| dogpens2_c | ) |
| BLITZ_ALIAS | ( | dogstatus | , |
| dogstatus_c | ) |
| BLITZ_ALIAS | ( | dohpropbody | , |
| dohpropbody_c | ) |
| BLITZ_ALIAS | ( | dohproppot | , |
| dohproppot_c | ) |
| BLITZ_ALIAS | ( | doselectmode | , |
| doselectmode_c | ) |
| BLITZ_ALIAS | ( | dosethprop | , |
| dosethprop_c | ) |
| BLITZ_ALIAS | ( | dosetstring | , |
| dosetstring_c | ) |
| BLITZ_ALIAS | ( | dosetvprop | , |
| dosetvprop_c | ) |
| BLITZ_ALIAS | ( | dostringclear | , |
| dostringclear_c | ) |
| BLITZ_ALIAS | ( | dostringreset | , |
| dostringreset_c | ) |
| BLITZ_ALIAS | ( | dostringtext | , |
| dostringtext_c | ) |
| BLITZ_ALIAS | ( | dovpropbody | , |
| dovpropbody_c | ) |
| BLITZ_ALIAS | ( | dovproppot | , |
| dovproppot_c | ) |
| BLITZ_ALIAS | ( | gadgetslib_dodisable | , |
| dodisable_c | ) |
| BLITZ_ALIAS | ( | gadgetslib_doenable | , |
| doenable_c | ) |
| BLITZ_ALIAS | ( | gadgetslib_doselect | , |
| doselect_c | ) |
| BLITZ_ALIAS | ( | gadgetslib_doselect2 | , |
| doselect2_c | ) |
| BLITZ_ALIAS | ( | setdogstatus | , |
| setdogstatus_c | ) |
| BLITZ_ALIAS | ( | settextgadget | , |
| settextgadget_c | ) |
|
static |
| void dobgroup | ( | void | ) |
|
static |
ButtonGroup Group: the button group of the following gadgets.
Gadgets made with flag bit 9 get it in the low word of UserData (ButtonId). Errors (debugger, bgroupchk): "Button Group MUST be greater than zero".
| grp | d0: the group |
| void dobpens | ( | void | ) |
|
static |
BorderPens Highlight Colour,Shadow Colour: the pens of the gadget borders.
| light | d0: the pen of the left/top border |
| shadow | d1: the pen of the right/bottom border |
| void dobuttonid | ( | void | ) |
|
static |
ButtonId(GadgetList#,ButtonGroup): the selected gadget of a button group.
The first gadget of the list with the group in UserData and SELECTED set. Not a bug (word function): the upper word of d0 is that of the gadget pointer.
| grp | d1: the button group |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
|
static |
Disable GadgetList#,Id: set DISABLED of a gadget.
Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
|
static |
Enable GadgetList#,Id: clear DISABLED of a gadget.
Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dogb | ( | void | ) |
| void dogb2 | ( | void | ) |
|
static |
Borders On|Off: give new gadgets borders or not.
Off saves the border excess and sets it to 0, On restores it; nothing happens if the state does not change.
| on | d0: 0 = off, anything else = on |
|
static |
| void dogborder | ( | WORD | x, |
| WORD | y, | ||
| WORD | w, | ||
| WORD | h, | ||
| struct Window ** | win, | ||
| struct Library * | intbase ) |
GadgetBorder X,Y,Width,Height: draw a gadget style border into the used window.
The border goes around the box with the saved border excess (also with Borders off); its memory is freed again. Amiga mode only. Errors (debugger, wchk): "Uninitialized Window".
| void dogjam | ( | void | ) |
|
static |
GadgetJam Jammode: the draw mode of the gadget texts.
| mode | d0: the IntuiText DrawMode of new text gadgets |
| void dogpens | ( | void | ) |
| void dogpens2 | ( | void | ) |
|
static |
GadgetPens Foreground Colour: the front pen only.
| fg | d0: the FrontPen of new text gadgets |
|
static |
GadgetPens Foreground Colour,Background Colour: the pens of the gadget texts.
| fg | d0: the FrontPen of new text gadgets |
| bg | d1: the BackPen |
| void dogstatus | ( | void | ) |
|
static |
GadgetStatus(GadgetList#,Id): the shown text part, or whether the gadget is selected.
For a text gadget that is no toggle gadget: the number of the shown part (1 = first). For toggle gadgets and gadgets without text: -1 if SELECTED, else 0 (SNE/EXT.w: not a bug, the upper word of d0 is that of the GadgetText pointer). Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dohpropbody | ( | void | ) |
|
static |
HPropBody(GadgetList#,Id): the HorizBody of a prop gadget.
Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dohproppot | ( | void | ) |
|
static |
HPropPot(GadgetList#,Id): the HorizPot of a prop gadget.
Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dopropgadget | ( | WORD | x, |
| WORD | y, | ||
| ULONG | flags, | ||
| UWORD | id, | ||
| UWORD | w, | ||
| const UWORD * | args ) |
PropGadget GadgetList#,X,Y,Flags,Id,Width,Height: add a proportional gadget to the list.
a3 = the list. A PropInfo with AUTOKNOB and PROPNEWLOOK, pots and bodies $8000, and an empty knob Image. Flags as TextGadget, plus bit 6 FREEHORIZ, 7 FREEVERT, 8 PROPBORDERLESS.
| void doredraw | ( | UWORD | id, |
| struct Window ** | win, | ||
| struct Library * | intbase ) |
Redraw Window#,Id: redraw a gadget of the window.
RefreshGList(gadget, window, 0, 1). Amiga mode only. Errors (debugger, redrawchk): "Uninitialized Window", "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the window's gadget list.
| id | d1: the gadget id |
| win | a1: the window (!libs windowslib,$1180) |
| intbase | a6: intuition.library |
|
static |
Toggle GadgetList#,Id: flip the SELECTED state of a gadget.
Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
|
static |
Toggle GadgetList#,Id,On|Off: select or deselect a gadget.
Sets or clears SELECTED; the gadget is not redrawn. Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| void doselectmode | ( | void | ) |
|
static |
SelectMode 1=Box, 0=Inverse: the highlight mode of new gadgets.
Stores 1 for any non-zero value, 0 otherwise (g.selmode), and the same as the highlight bits of the Flags of new gadgets (g.defflags: 1 = GADGHBOX, 0 = GADGHCOMP). Fixed (#952): the original stored only selmode, which nothing reads - the command had no effect.
| on | d0: the mode |
| void dosethprop | ( | void | ) |
|
static |
SetHProp GadgetList#,Id,Pot,Body: the horizontal pot and body of a prop gadget.
Quick values, 1.0 ($10000) or more becomes $FFFF. The gadget is not redrawn. Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| pot | d2: the pot (Quick) |
| body | d3: the body (Quick) |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dosetstring | ( | void | ) |
|
static |
SetString GadgetList#,Id,String$: set the contents of a string gadget.
Copies the string (with its 0) into the buffer; the positions stay and the gadget is not redrawn. Errors (debugger, settest): as ResetString, and "String to long for Gadget" if the string is not shorter than MaxChars.
| id | d1: the gadget id |
| s | d2: String$ |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dosetvprop | ( | void | ) |
|
static |
SetVProp GadgetList#,Id,Pot,Body: the vertical pot and body of a prop gadget.
As SetHProp. Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| pot | d2: the pot (Quick) |
| body | d3: the body (Quick) |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void doshapegadget | ( | WORD | x, |
| WORD | y, | ||
| ULONG | flags, | ||
| UWORD | id, | ||
| const struct bb_shape * | shape ) |
ShapeGadget GadgetList#,X,Y,Flags,Id,Shape#: add an image gadget made from a shape.
a3 = the list. The position is moved by the shape's handle, the Image (makeintuishape) uses the shape's data. Flags as TextGadget. Fixed (#167): a shape of depth 0 (PlanePick $FF) is refused at its creation by the error check of InitShape (#243). Errors (debugger, sgchk): "Uninitialized Shape".
| void doshapegadget2 | ( | WORD | x, |
| WORD | y, | ||
| ULONG | flags, | ||
| UWORD | id, | ||
| const struct bb_shape * | alt, | ||
| const struct bb_shape * | shape ) |
ShapeGadget GadgetList#,X,Y,Flags,Id,Shape#,Shape#: an image gadget with an alternative image for the selected state (GADGHIMAGE).
As ShapeGadget. Errors (debugger, sgchk2): "Uninitialized Shape" for either shape.
| ULONG dostringactivate | ( | UWORD | id, |
| struct Window ** | win, | ||
| struct Library * | intbase ) |
ActivateString Window#,Id: activate a string gadget of the window.
ActivateGadget(gadget, window, 0). Amiga mode only. Errors (debugger, actchk): "Uninitialized Window", "Can't Find Gadget", "Not a String Gadget". By design (#166) as Redraw.
| id | d1: the gadget id |
| win | a1: the window (!libs windowslib,$1180) |
| intbase | a6: intuition.library |
| void dostringclear | ( | void | ) |
|
static |
ClearString GadgetList#,Id: empty a string gadget.
BufferPos and DispPos 0, an empty buffer. Errors (debugger, reschk): "Can't Find Gadget", "Not a String Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dostringgadget | ( | WORD | x, |
| WORD | y, | ||
| ULONG | flags, | ||
| UWORD | id, | ||
| UWORD | maxlen, | ||
| const UWORD * | args ) |
StringGadget GadgetList#,X,Y,Flags,Id,Maxlen,Width: add a string gadget to the list.
a3 = the list. The gadget is the font height high, its border (if Borders are on) goes around it; the StringInfo gets a buffer of Maxlen bytes (cleared). Flags as TextGadget. Fixed (#164): with Borders off (no border) the original wrote the border offsets to the addresses 0, 2, 36 and 38. Fixed (#165): Maxlen 0 clears 65536 bytes behind the 0 byte buffer, as in the original; runtime error checking catches it (stringchk, which the original does not have). Errors (debugger, stringchk): "Maxlen MUST be greater than zero".
| void dostringreset | ( | void | ) |
|
static |
ResetString GadgetList#,Id: the cursor of a string gadget to the start.
BufferPos and DispPos 0, the contents stay. Errors (debugger, reschk): "Can't Find Gadget", "Not a String Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dostringtext | ( | void | ) |
|
static |
StringText$(GadgetList#,Id): the contents of a string gadget.
Copies the buffer to a3 (a3 is left on the terminating 0). Errors (debugger, reschk): "Can't Find Gadget", "Not a String Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dotextgadget | ( | WORD | x, |
| WORD | y, | ||
| ULONG | flags, | ||
| UWORD | id, | ||
| const UBYTE * | text, | ||
| struct TextAttr ** | font, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
TextGadget GadgetList#,X,Y,Flags,Id,Text$: add a text (boolean) gadget to the list.
a3 = the list. The IntuiText (struct gtext) gets a copy of the text, the gadget pens, the jam mode and the current font; a text with "|" cycles through its parts (SetGadgetStatus/GadgetStatus), the gadget is as wide as the widest part plus the border excess, with a border if Borders are on. Flags: bit 0 toggle, 1-4 relative right/bottom/width/ height, 5 box select, 9 button group, 12-15 right/left/top/bottom border, 16 GZZ gadget. TextGadget with an empty text has IText 0 (not a bug).
| void dovpropbody | ( | void | ) |
|
static |
VPropBody(GadgetList#,Id): the VertBody of a prop gadget.
Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
| void dovproppot | ( | void | ) |
|
static |
VPropPot(GadgetList#,Id): the VertPot of a prop gadget.
Errors (debugger, propchk): "Can't Find Gadget" (also if it is no prop gadget). By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
|
static |
|
static |
| void freegadget | ( | void | ) |
_free of a GadgetList object: free its gadgets.
a3 = the list; the list is cleared, every "bL" gadget is freed with its IntuiText and text, its render and select Border or Image and its SpecialInfo (StringInfo and buffer, PropInfo). Fixed (#163): the original never freed the SpecialInfo.
|
static |
|
static |
| void gadgetslib_codeinit | ( | void | ) |
| void gadgetslib_dodisable | ( | void | ) |
| void gadgetslib_doenable | ( | void | ) |
| void gadgetslib_doselect | ( | void | ) |
| void gadgetslib_doselect2 | ( | void | ) |
| void gadgetslib_sgchk | ( | void | ) |
| void gadgetslib_sgchk2 | ( | void | ) |
| void gadgetslib_wchk | ( | void | ) |
| void gchk | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void propchk | ( | void | ) |
|
static |
|
static |
| void redrawchk | ( | void | ) |
|
static |
|
static |
| void reschk | ( | void | ) |
|
static |
|
static |
| void setdogstatus | ( | void | ) |
|
static |
SetGadgetStatus GadgetList#,Id,Value: show text part Value of a cycling text gadget.
Value 1 = the first part; ignored for toggle gadgets, gadgets without text and Value 0. The gadget is not redrawn. Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
|
static |
| void settest | ( | void | ) |
|
static |
| void settextgadget | ( | void | ) |
|
static |
SetTextGadget GadgetList#,Id,Text$: overwrite the text of a gadget.
In place: the new text is padded with spaces and never longer than the old one; nothing for a gadget without text. The gadget is not redrawn. Errors (debugger, gchk): "Can't Find Gadget". By design (#166): without the debugger the search does not stop at the end of the list.
| id | d1: the gadget id |
| src | d2: Text$ |
| list | a1: the gadget list (!libs gadgetslib,$1180) |
|
static |
|
static |
| void stringchk | ( | void | ) |
|
static |
|
static |
| UBYTE bco1 |
| UBYTE bco2 |
| WORD bgroup |
| WORD bordersok |
| UBYTE bpen |
| WORD bxxs |
| WORD bxxs2 |
| WORD byxs |
| WORD byxs2 |
| WORD defflags |
| WORD fhit |
| ULONG fontattr |
| UBYTE fpen |
| struct { ... } g |
| UBYTE mode |
| UBYTE pad |
| WORD selmode |