|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "blitzlib.h"#include "blitzobj.h"#include "blitzexec.h"#include <intuition/intuition.h>#include <intuition/screens.h>#include <graphics/rastport.h>#include <graphics/text.h>#include <graphics/gfx.h>#include <stddef.h>#include <dos/dosextens.h>#include <proto/intuition.h>#include <proto/graphics.h>#include <proto/layers.h>Data Structures | |
| struct | bwin |
| struct | wuserdata |
| struct | evnode |
| struct | gaduserdata |
| struct | gadtext |
| struct | ed |
Macros | |
| #define | __NOLIBBASE__ |
| #define | INTUITION_BASE_NAME intbase |
| #define | GRAPHICS_BASE_NAME gfxbase |
| #define | LAYERS_BASE_NAME layersbase |
| #define | WUD(w) |
| #define | W42 (BL_PUSH | BL_WORD) |
| #define | SIMPLE_FN(type, code, name) |
| #define | GFX_STMT(code, chk, name, help, ...) |
| #define | USED_FN(code, name) |
| #define | LONGAT(field) |
| #define | THISPROC ((struct Process *)SysBase->ThisTask) |
| #define | WORD_FN(entry, cfunc) |
| #define | V_EVCODE 8 |
| #define | V_EVQUALIFIER 10 |
| #define | V_EVENTGNUM 12 |
| #define | V_MENUNUM 18 |
| #define | V_ITEMNUM 20 |
| #define | V_SUBNUM 22 |
| #define | V_EVMOUSEX 98 |
| #define | V_EVMOUSEY 100 |
| #define | GUD(g) |
| #define | MAXWAIT 50 |
Functions | |
| void | dogadgethit (void) |
| GadgetHit - the gadget id of the last gadget event (-1 at init). | |
| void | doeventwindow (void) |
| void | dowindowidcmp (void) |
| void | domenuhit (void) |
| MenuHit - the menu number of the last menu event, -1 for none. | |
| void | doitemhit (void) |
| ItemHit - the item number of the last menu event, -1 for none. | |
| void | dosubhit (void) |
| SubHit - the subitem number of the last menu event, -1 for none. | |
| void | dowlocate (void) |
| void | doinwindow (void) |
| void | dooutwindow (void) |
| void | doqual (void) |
| void | dorawkey (void) |
| void | docursor (void) |
| void | doeditat (void) |
| void | doeditfrom (void) |
| void | doeditfrom2 (void) |
| void | doeditexit (void) |
| void | dowmousex (void) |
| void | dowmousey (void) |
| void | dosetpens (void) |
| void | dosetpens2 (void) |
| void | dosetjam (void) |
| void | dowindowx (void) |
| void | dowindowy (void) |
| void | dowcursx (void) |
| void | dowcursy (void) |
| void | dowindowwidth (void) |
| void | dowindowheight (void) |
| void | dogzzwidth (void) |
| void | dogzzheight (void) |
| void | dowtopoff (void) |
| void | dowleftoff (void) |
| void | doslimits (void) |
| void | doslimits2 (void) |
| void | doemousex (void) |
| EMouseX - the mouse x position of the last event. | |
| void | doemousey (void) |
| EMouseY - the mouse y position of the last event. | |
| void | doaddidcmp (void) |
| void | dosubidcmp (void) |
| void | doflushevents (void) |
| void | docatchdoserrs (void) |
| void | dowrport (void) |
| RastPort(Window#) - the RastPort of a window (inline). | |
| void | dosetevfilter (void) |
| void | doeventcode (void) |
| EventCode - the IDCMP code of the last event. | |
| void | doeventqualifier (void) |
| EventQualifier - the qualifier of the last event. | |
| void | dousewindow (void) |
| void | idcmpchk (void) |
| void | wfontchk (void) |
| void | windowslib_wchk (void) |
| void | wlinechk (void) |
| void | wpointerchk (void) |
| void | wmovechk (void) |
| void | wsizechk (void) |
| void | wblitchk (void) |
| void | wbtowchk (void) |
| void | wtagschk (void) |
| void | doactivate (struct bwin *w, struct Library *intbase) |
| Activate Window# - activate a window (ActivateWindow). | |
| ULONG | doevent (void) |
| Event - the next event, without waiting. | |
| ULONG | dowaitevent (void) |
| WaitEvent - wait for the next event (statement or function). | |
| ULONG | buttons (void) |
| MButtons - the next mouse button event of the input window. | |
| void | dowplot (WORD x, WORD y, UWORD c, struct bwin *w, struct Library *gfxbase) |
| WPlot X,Y,Colour - a point in the used window. | |
| void | dowbox (ULONG x0, ULONG y0, ULONG x1, ULONG y1, UWORD c, struct bwin *w, struct Library *gfxbase) |
| WBox X1,Y1,X2,Y2,Colour - a filled box in the used window. | |
| void | dowcls (struct bwin *w, struct Library *gfxbase) |
| WCls - clear the used window with colour 0 (see dowcls2, #314). | |
| void | dowcls2 (UWORD c, struct bwin *w, struct Library *gfxbase) |
| WCls Colour - clear the used window with a colour. | |
| void | doinnercls (struct bwin *w, struct Library *gfxbase) |
| InnerCls - clear the inside of the used window's borders with colour 0. | |
| void | doinnercls2 (UWORD c, struct bwin *w, struct Library *gfxbase) |
| InnerCls Colour - clear the inside of the used window's borders. | |
| void | dowellipse (WORD x, WORD y, ULONG rx, ULONG ry, UWORD c, struct bwin *w, struct Library *gfxbase) |
| WEllipse X,Y,X Radius,Y Radius,Colour - an ellipse in the used window (DrawEllipse). | |
| void | dowcircle (WORD x, WORD y, ULONG r, UWORD c, struct bwin *w, struct Library *gfxbase) |
| WCircle X,Y,Radius,Colour - a circle in the used window (an ellipse with both radii r). | |
| void | dowscroll (ULONG x0, ULONG y0, ULONG x1, ULONG y1, WORD dx, WORD dy, struct bwin *w, struct Library *gfxbase) |
| WScroll X1,Y1,X2,Y2,Delta X,Delta Y - scroll an area of the used window (ScrollRaster). | |
| void | dowprintscroll (struct bwin *w, struct Library *gfxbase) |
| WPrintScroll - scroll the used window if the text cursor is below its inner height. | |
| void | dowline (UWORD c, UWORD n, UBYTE *args, struct bwin *w, struct Library *gfxbase) |
| WLine X1,Y1,X2,Y2[,Xn,Yn...],Colour - lines through the points in the used window (Move + PolyDraw). | |
| void | doflushevents2 (ULONG class) |
| FlushEvents IDCMP_Flag - drop all events of one class. | |
| void | dowtitle (const UBYTE *wt, const UBYTE *st, const ULONG *lens, struct bwin *w, struct Library *intbase) |
| WTitle windowtitle$,screentitle$ - the titles of the used window and its screen (SetWindowTitles). | |
| void | dowmove (ULONG x, ULONG y, struct bwin *w, struct Library *intbase) |
| WMove X,Y - move the used window (MoveWindow by the difference). | |
| void | dowsize (ULONG x, ULONG y, struct bwin *w, struct Library *intbase) |
| WSize Width,Height - resize the used window (SizeWindow by the difference). | |
| void | domenuson (UBYTE *objs, UWORD max, struct Library *intbase) |
| MenusOn - the menus of all windows work again. | |
| void | domenusoff (UBYTE *objs, UWORD max, struct Library *intbase) |
| MenusOff - switch the menus of all windows off. | |
| void | domenusok (UWORD on, UBYTE *objs, UWORD max, struct Library *intbase) |
| Menus On|Off - MenusOn or MenusOff. | |
| void | dowpointer (const struct bb_shape *shape, ULONG xoff_reg, ULONG yoff_reg, struct Library *intbase) |
| WPointer Shape# - a shape as the mouse pointer of the used window. | |
| void | dowfont (const struct bb_intuifont *font, struct bwin *w, struct Library *gfxbase) |
| WindowFont IntuiFont# - the font of the used window (SetFont). | |
| void | dowfont2 (ULONG style, const struct bb_intuifont *font, struct bwin *w, struct Library *gfxbase) |
| WindowFont IntuiFont#,SoftStyle - font and soft style of the used window (SetFont, SetSoftStyle with all style bits enabled). | |
| void | dobtow1 (struct bwin *w, struct BitMap *bm, struct Library *gfxbase) |
| BitMaptoWindow Bitmap#,Window# - copy a whole bitmap into a window at 0,0 (BltBitMapRastPort, minterm $C0). | |
| void | dobtow2 (ULONG sx_reg, ULONG sy_reg, ULONG sx, ULONG sy, ULONG dx, ULONG dy, const UWORD *args, struct bwin *w, struct BitMap *bm, struct Library *gfxbase) |
| BitMaptoWindow Bitmap#,Window#,srcx,srcy,destx,desty,wid,height - copy an area of a bitmap into a window. | |
| void | dowblit (ULONG xpos, ULONG ypos, ULONG y_reg, struct bwin *w, const struct bb_shape *shape, struct Library *gfxbase) |
| WBlit Shape#,x,y - draw a shape into the used window. | |
| void | _showsuper (WORD x, WORD y, struct bwin *w, struct Library *layersbase) |
| PositionSuperBitMap x,y - the view of a super bitmap window. | |
| void | _windowtobitmap (struct bwin *w, struct Library *gfxbase) |
| GetSuperBitMap - copy the window's contents into its super bitmap (SyncSBitMap). | |
| void | _bitmaptowindow (struct bwin *w, struct Library *gfxbase) |
| PutSuperBitMap - copy the super bitmap into the window (CopySBitMap). | |
| void | freewindow (struct Library *intbase) |
| CloseWindow Window# (and _free) - close a window. | |
| void | dowindow (UWORD objoff, ULONG flags, const UBYTE *title, UBYTE dpen, UBYTE bpen, ULONG *glist, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen,GadgetList# - open a window with a gadget list. | |
| void | dowindow2 (UWORD objoff, ULONG flags, const UBYTE *title, UBYTE dpen, UBYTE bpen, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen - open a window without gadgets. | |
| void | dowindow3 (UWORD objoff, ULONG flags, const UBYTE *title, ULONG *glist, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen,GadgetList#,BitMap# - open a window with a gadget list and a super bitmap. | |
| void | dowindowtags1 (UWORD objoff, ULONG flags, const UBYTE *title, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| WindowTags Window#,Flags,Title$ - open a window with OpenWindowTagList. | |
| void | dowindowtags2 (UWORD objoff, ULONG flags, const UBYTE *title, UWORD n, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| WindowTags Window#,Flags,Title$,Tag,Data[,Tag,Data...] - open a window with tag pairs. | |
| void | dowindowtags3 (UWORD objoff, ULONG flags, const UBYTE *title, const ULONG *tl, struct Screen **scr, WORD usedoff, const ULONG *lens, struct Library *intbase) |
| WindowTags Window#,Flags,Title$,&TagList - open a window with a tag list of the program. | |
| static ULONG | codeinit (struct Library *gfx, struct Library *intb) |
| init - the shared message port and the defaults. | |
| static void | codefinit (void) |
| finit - free the port's signal, restore the old pr_WindowPtr. | |
| SIMPLE_FN (BL_LONG, BLITZ_AMIGAONLY(doevent), "Event") | |
| SIMPLE_FN (BL_WORD, dogadgethit, "GadgetHit") | |
| SIMPLE_FN (BL_WORD, doeventwindow, "EventWindow") | |
| SIMPLE_FN (BL_WORD, domenuhit, "MenuHit") | |
| SIMPLE_FN (BL_WORD, doitemhit, "ItemHit") | |
| SIMPLE_FN (BL_WORD, dosubhit, "SubHit") | |
| GFX_STMT (dowplot, windowslib_wchk, "WPlot", "X,Y,Colour", BL_WORD, BL_WORD, BL_WORD) | |
| GFX_STMT (dowbox, windowslib_wchk, "WBox", "X1,Y1,X2,Y2,Colour", BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD) | |
| GFX_STMT (dowcircle, windowslib_wchk, "WCircle", "X,Y,Radius,Colour", BL_WORD, BL_WORD, BL_WORD, BL_WORD) | |
| GFX_STMT (dowellipse, windowslib_wchk, "WEllipse", "X,Y,X Radius,Y Radius,Colour", BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD) | |
| SIMPLE_FN (BL_LONG, doqual, "Qualifier") | |
| SIMPLE_FN (BL_WORD, dorawkey, "RawKey") | |
| SIMPLE_FN (BL_WORD, doeditat, "Editat") | |
| SIMPLE_FN (BL_WORD, doeditexit, "EditExit") | |
| GFX_STMT (dowscroll, windowslib_wchk, "WScroll", "X1,Y1,X2,Y2,Delta X,Delta Y", BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD) | |
| USED_FN (dowmousex, "WMouseX") | |
| USED_FN (dowmousey, "WMouseY") | |
| USED_FN (dowindowx, "WindowX") | |
| USED_FN (dowindowy, "WindowY") | |
| SIMPLE_FN (BL_WORD, BLITZ_AMIGAONLY(buttons), "MButtons") | |
| USED_FN (dowcursx, "WCursX") | |
| USED_FN (dowcursy, "WCursY") | |
| USED_FN (dowindowwidth, "WindowWidth") | |
| USED_FN (dowindowheight, "WindowHeight") | |
| USED_FN (dogzzwidth, "InnerWidth") | |
| USED_FN (dogzzheight, "InnerHeight") | |
| USED_FN (dowtopoff, "WTopOff") | |
| USED_FN (dowleftoff, "WLeftOff") | |
| SIMPLE_FN (BL_WORD, doemousex, "EMouseX") | |
| SIMPLE_FN (BL_WORD, doemousey, "EMouseY") | |
| SIMPLE_FN (BL_WORD, BLITZ_AMIGAONLY(doeventcode), "EventCode") | |
| SIMPLE_FN (BL_WORD, BLITZ_AMIGAONLY(doeventqualifier), "EventQualifier") | |
| static APTR | globalloc (ULONG size, ULONG flags) |
| static void | globfree (APTR mem, ULONG size) |
| static UBYTE * | allocst (const UBYTE *s, ULONG len) |
| static void | freest (UBYTE *s) |
| static UWORD | rawkey (UWORD code, UWORD qual) |
| static void | dosetevfilter_c (ULONG pre, ULONG post) |
| SetEventFilter preprocess,postprocess - routines around every message. | |
| BLITZ_ALIAS (dosetevfilter, dosetevfilter_c) | |
| static void | docatchdoserrs_c (struct bwin *w) |
| CatchDosErrs - DOS requesters appear on the used window. | |
| BLITZ_ALIAS (docatchdoserrs, docatchdoserrs_c) | |
| static void | doaddidcmp_c (ULONG f) |
| AddIDCMP IDCMP_Flags - add flags to the IDCMP of the next windows. | |
| BLITZ_ALIAS (doaddidcmp, doaddidcmp_c) | |
| static ULONG | dosubidcmp_c (ULONG f) |
| SubIDCMP IDCMP_Flags - remove flags from the IDCMP of the next windows. | |
| BLITZ_ALIAS (dosubidcmp, dosubidcmp_c) | |
| static void | dowindowidcmp_c (ULONG f) |
| DefaultIDCMP IDCMP_Flags - the IDCMP of the windows opened next. | |
| BLITZ_ALIAS (dowindowidcmp, dowindowidcmp_c) | |
| static void | doslimits_c (WORD a, WORD b, WORD c, WORD d) |
| SizeLimits Min Width,Min Height,Max Width,Max Height - the size limits of the windows opened next. | |
| BLITZ_ALIAS (doslimits, doslimits_c) | |
| static void | doslimits2_c (WORD on) |
| SizeLimits Flag (the one argument form) - whether the next windows get the SizeLimits. | |
| BLITZ_ALIAS (doslimits2, doslimits2_c) | |
| static ULONG | dowtopoff_c (struct bwin *w) |
| WTopOff - the height of the used window's top border. | |
| BLITZ_ALIAS (dowtopoff, dowtopoff_c) | |
| static ULONG | dowleftoff_c (struct bwin *w) |
| WLeftOff - the width of the used window's left border. | |
| BLITZ_ALIAS (dowleftoff, dowleftoff_c) | |
| static UWORD | dowindowwidth_c (struct bwin *w) |
| WindowWidth - the width of the used window. | |
| WORD_FN (dowindowwidth, dowindowwidth_c) | |
| static UWORD | dowindowheight_c (struct bwin *w) |
| WindowHeight - the height of the used window. | |
| WORD_FN (dowindowheight, dowindowheight_c) | |
| static UWORD | dogzzwidth_c (struct bwin *w) |
| InnerWidth - the inner width of the used window (GZZWidth). | |
| WORD_FN (dogzzwidth, dogzzwidth_c) | |
| static UWORD | dogzzheight_c (struct bwin *w) |
| InnerHeight - the inner height of the used window (GZZHeight). | |
| WORD_FN (dogzzheight, dogzzheight_c) | |
| static void | dosetpens2_c (UWORD f, UWORD b) |
| WColour Foreground Colour,Background Colour - the text pens of the window output. | |
| BLITZ_ALIAS (dosetpens2, dosetpens2_c) | |
| static void | dosetpens_c (UWORD f) |
| WColour Foreground Colour - the foreground pen of the window output. | |
| BLITZ_ALIAS (dosetpens, dosetpens_c) | |
| static void | dosetjam_c (UWORD j) |
| WJam Jammode - the drawing mode of the window output and drawing. | |
| BLITZ_ALIAS (dosetjam, dosetjam_c) | |
| static UWORD | dowindowx_c (struct bwin *w) |
| WindowX - the x position of the used window. | |
| WORD_FN (dowindowx, dowindowx_c) | |
| static UWORD | dowmousex_c (struct bwin *w) |
| WMouseX - the mouse x position in the used window. | |
| WORD_FN (dowmousex, dowmousex_c) | |
| static UWORD | dowindowy_c (struct bwin *w) |
| WindowY - the y position of the used window. | |
| WORD_FN (dowindowy, dowindowy_c) | |
| static UWORD | dowmousey_c (struct bwin *w) |
| WMouseY - the mouse y position in the used window. | |
| WORD_FN (dowmousey, dowmousey_c) | |
| static UWORD | doeditat_c (void) |
| Editat - where the last Edit$ in a window ended (cursor position). | |
| static UWORD | doeditexit_c (void) |
| EditExit - the character that ended the last Edit$ in a window ($FFFF: another event in EditFrom mode). | |
| static UWORD | dorawkey_c (void) |
| RawKey - the raw key code of the last key read from a window. | |
| static ULONG | doqual_c (void) |
| Qualifier - the qualifier of the last key read from a window. Fixed (#313): a long function, d0 is set as a long; the original set only its low word. | |
| WORD_FN (doeditat, doeditat_c) | |
| WORD_FN (doeditexit, doeditexit_c) | |
| WORD_FN (dorawkey, dorawkey_c) | |
| BLITZ_ALIAS (doqual, doqual_c) | |
| static void | doeditfrom_c (void) |
| EditFrom - the next Edit$ in a window starts at position 0 and ends only with Return. | |
| BLITZ_ALIAS (doeditfrom, doeditfrom_c) | |
| static void | doeditfrom2_c (UWORD at) |
| EditFrom Characterpos - the next Edit$ in a window starts at that position and also ends on any other event (EditExit $FFFF). | |
| BLITZ_ALIAS (doeditfrom2, doeditfrom2_c) | |
| static void | docursor_c (WORD u) |
| Cursor Thickness - the cursor of Edit$ in a window. | |
| BLITZ_ALIAS (docursor, docursor_c) | |
| static ULONG | doeventwindow_c (void) |
| EventWindow - the window number of the last event. | |
| BLITZ_ALIAS (doeventwindow, doeventwindow_c) | |
| static UWORD | dowcursx_c (struct bwin *w) |
| WCursX - the text cursor x of the used window. | |
| WORD_FN (dowcursx, dowcursx_c) | |
| static UWORD | dowcursy_c (struct bwin *w) |
| WCursY - the text cursor y of the used window. | |
| WORD_FN (dowcursy, dowcursy_c) | |
| static void | dowlocate_c (WORD x, WORD y, struct bwin *w) |
| WLocate Cursor x,Cursor y - place the text cursor of the used window. | |
| BLITZ_ALIAS (dowlocate, dowlocate_c) | |
| static struct RastPort * | setpcursor (struct bwin *pw) |
| static void | printtext (struct bwin *pw, struct RastPort *rp, const UBYTE *s, UWORD n) |
| static struct bwin * | outwin (void) |
| static ULONG | windowprint (ULONG c) |
| static void | windowprint2 (const UBYTE *s, ULONG n) |
| static void | windowprint3 (const UBYTE *s) |
| static ULONG | windowprint_c (ULONG c) |
| static void | windowprint2_c (const UBYTE *s, ULONG n) |
| static void | windowprint3_c (const UBYTE *s) |
| static ULONG | callfilter (ULONG code, ULONG msg) |
| static int | readevent (void) |
| static void | updateevents (void) |
| static void | unlinkmess (struct evnode **prev, struct evnode *e) |
| static void | unlinkwin (struct Window *win) |
| static void | unlinkall (void) |
| static void | doflushevents_c (void) |
| FlushEvents - drop all events. | |
| BLITZ_ALIAS (doflushevents, doflushevents_c) | |
| static void | redrawgad (struct Gadget *g, struct evnode *e) |
| static void | refgada3 (struct Gadget *g, struct evnode *e) |
| static void | notbuttongad (struct Gadget *g, struct evnode *e) |
| static void | gadgetevent (struct evnode *e) |
| static struct MenuItem * | findmenuitem (struct Menu *m, UWORD code) |
| static WORD | menupart (UWORD v, UWORD all) |
| static ULONG | doevent2 (void) |
| static ULONG | windowinp (void) |
| static ULONG | windowinp_c (void) |
| static WORD | calcwidth (struct TextFont *f, UBYTE c) |
| static void | zcursor (struct ed *ed) |
| static void | update (struct ed *ed) |
| static UWORD | calclen (struct ed *ed) |
| static void | blankfrom (UBYTE *buf, WORD from) |
| static ULONG | inputstr (UBYTE *buf, UWORD max) |
| static ULONG | inputstr_c (UBYTE *buf, UWORD max) |
| void | inputstr_h (void) |
| void | windowprint2_h (void) |
| void | windowprint3_h (void) |
| void | handlers (void) |
| void | windowinp_h (void) |
| void | windowprint_h (void) |
| static void | doinwindow_c (void) |
| WindowInput Window# - Inkey$/Edit$ etc. read from a window. | |
| BLITZ_ALIAS (doinwindow, doinwindow_c) | |
| static void | dooutwindow_c (void) |
| WindowOutput Window# - Print/NPrint write to a window. | |
| BLITZ_ALIAS (dooutwindow, dooutwindow_c) | |
| static void | dousewindow2 (void) |
| static void | dousewindow_c (void) |
| _use (Use Window) - WindowOutput and WindowInput of a window. | |
| static struct RastPort * | setpen2 (struct bwin *w, UWORD pen, struct Library *gfxbase) |
| static struct RastPort * | scrollpen (struct bwin *w, struct Library *gfxbase) |
| static void | dowbox2 (struct bwin *w, UWORD c, WORD x0, WORD y0, ULONG x1, ULONG y1, struct Library *gfxbase) |
| static void | waitwin (volatile WORD *a, volatile WORD *b, ULONG x, ULONG y, WORD ox, WORD oy) |
| static void | newidcmp (UBYTE *objs, UWORD max, UWORD verify, UWORD rmbtrap, struct Library *intbase) |
| static void | windowopened (struct bwin *w, struct Window *win, UWORD num, struct Library *intbase) |
| static void | openwindow (struct bwin *w, UWORD objoff, ULONG flags, const UBYTE *title, UBYTE dpen, UBYTE bpen, ULONG *glist, struct Screen **scr, WORD usedoff, const ULONG *lens, struct BitMap *sbm, struct Library *intbase) |
| static void | opentags (struct bwin *w, UWORD objoff, ULONG flags, const UBYTE *title, ULONG len, struct Screen **scr, WORD usedoff, struct Library *intbase) |
| static void | wchk_c (const ULONG *w) |
| static void | wfontchk_c (const ULONG *w, const struct bb_intuifont *font) |
| static void | wlinechk_c (UWORD n, const ULONG *w) |
| static void | wpointerchk_c (const struct bb_shape *shape) |
| static void | wmovechk_c (UWORD x, UWORD y, struct Window **w) |
| static void | wsizechk_c (UWORD x, UWORD y, struct Window **w) |
| static void | idcmpchk_c (ULONG f) |
| static void | wblitchk_c (const ULONG *w, const struct bb_shape *shape) |
| static void | wbtowchk_c (const ULONG *w, const UBYTE *bm) |
| static void | wtagschk_c (UWORD n) |
Variables | |
| static ULONG | prefilter |
| static ULONG | postfilter |
| struct { | |
| ULONG zero | |
| ULONG idcmp | |
| UWORD evcode | |
| UWORD evqualifier | |
| WORD eventgnum | |
| struct Window * eventwin | |
| WORD menunum | |
| WORD itemnum | |
| WORD subnum | |
| UWORD charbuf | |
| struct Library * gfxbase | |
| struct bwin * prwindow | |
| UWORD outkey | |
| struct Window * outwindow | |
| UWORD outq | |
| UWORD outr | |
| UWORD kqualifier | |
| UWORD lrawkey | |
| UWORD msgon | |
| ULONG oldexcode | |
| ULONG oldexbits | |
| struct evnode * firstmess | |
| struct evnode ** nextmess | |
| struct bwin * inwindow | |
| WORD underline | |
| UWORD efrom | |
| UWORD eat | |
| WORD emode | |
| UWORD eexit | |
| UWORD fpen | |
| UWORD bpen | |
| UWORD tjam | |
| UWORD outmouse | |
| struct Window * outmwin | |
| ULONG linw | |
| UWORD lflgs | |
| WORD evmousex | |
| WORD evmousey | |
| } | V |
| static struct MsgPort | myport |
| struct { | |
| WORD minw | |
| WORD minh | |
| WORD maxw | |
| WORD maxh | |
| } | sizelimits = { 128, 64, 0, 0 } |
| static WORD | sizelimitsok = -1 |
| static APTR | oldwptr |
| static struct Library * | intbase_g |
| static UWORD | kludgegnum |
| static struct Gadget * | kludgegad |
| static struct Gadget * | swallowgad |
| static UWORD | maxchars |
| static ULONG | origxy |
| static struct NewWindow | anewwindow |
| struct { | |
| struct TagItem flags title screen newlook | |
| struct TagItem user [16] | |
| } | tags |
| static struct BitMap | mybmap |
| static const char | mess1 [] = "Couldn't Open Window" |
| static const char | mess6 [] = "Invalid Input Window" |
| static const char | mess7 [] = "Invalid Output Window" |
| #define __NOLIBBASE__ |
| #define GRAPHICS_BASE_NAME gfxbase |
| #define GUD | ( | g | ) |
| #define INTUITION_BASE_NAME intbase |
| #define LAYERS_BASE_NAME layersbase |
| #define LONGAT | ( | field | ) |
| #define MAXWAIT 50 |
| #define THISPROC ((struct Process *)SysBase->ThisTask) |
| #define V_EVCODE 8 |
| #define V_EVENTGNUM 12 |
| #define V_EVMOUSEX 98 |
| #define V_EVMOUSEY 100 |
| #define V_EVQUALIFIER 10 |
| #define V_ITEMNUM 20 |
| #define V_MENUNUM 18 |
| #define V_SUBNUM 22 |
| #define WORD_FN | ( | entry, | |
| cfunc ) |
| #define WUD | ( | w | ) |
| void _bitmaptowindow | ( | struct bwin * | w, |
| struct Library * | gfxbase ) |
| void _showsuper | ( | WORD | x, |
| WORD | y, | ||
| struct bwin * | w, | ||
| struct Library * | layersbase ) |
| void _windowtobitmap | ( | struct bwin * | w, |
| struct Library * | gfxbase ) |
|
static |
|
static |
| BLITZ_ALIAS | ( | doaddidcmp | , |
| doaddidcmp_c | ) |
| BLITZ_ALIAS | ( | docatchdoserrs | , |
| docatchdoserrs_c | ) |
| BLITZ_ALIAS | ( | docursor | , |
| docursor_c | ) |
| BLITZ_ALIAS | ( | doeditfrom | , |
| doeditfrom_c | ) |
| BLITZ_ALIAS | ( | doeditfrom2 | , |
| doeditfrom2_c | ) |
| BLITZ_ALIAS | ( | doeventwindow | , |
| doeventwindow_c | ) |
| BLITZ_ALIAS | ( | doflushevents | , |
| doflushevents_c | ) |
| BLITZ_ALIAS | ( | doinwindow | , |
| doinwindow_c | ) |
| BLITZ_ALIAS | ( | dooutwindow | , |
| dooutwindow_c | ) |
| BLITZ_ALIAS | ( | dosetevfilter | , |
| dosetevfilter_c | ) |
| BLITZ_ALIAS | ( | dosetjam | , |
| dosetjam_c | ) |
| BLITZ_ALIAS | ( | dosetpens | , |
| dosetpens_c | ) |
| BLITZ_ALIAS | ( | dosetpens2 | , |
| dosetpens2_c | ) |
| BLITZ_ALIAS | ( | doslimits | , |
| doslimits_c | ) |
| BLITZ_ALIAS | ( | doslimits2 | , |
| doslimits2_c | ) |
| BLITZ_ALIAS | ( | dosubidcmp | , |
| dosubidcmp_c | ) |
| BLITZ_ALIAS | ( | dowindowidcmp | , |
| dowindowidcmp_c | ) |
| BLITZ_ALIAS | ( | dowleftoff | , |
| dowleftoff_c | ) |
| BLITZ_ALIAS | ( | dowlocate | , |
| dowlocate_c | ) |
| BLITZ_ALIAS | ( | dowtopoff | , |
| dowtopoff_c | ) |
| ULONG buttons | ( | void | ) |
MButtons - the next mouse button event of the input window.
EventWindow etc. are above. Takes the outstanding button of Event or the next MOUSEBUTTONS event of the input window; those of other windows are dropped. Amiga mode only.
Errors: no input window -> "Invalid Input Window" (err6, DIFF: raised from the normal code).
|
static |
|
static |
|
static |
|
static |
finit - free the port's signal, restore the old pr_WindowPtr.
|
static |
init - the shared message port and the defaults.
One message port for all windows (signal of the program's task), the empty event list, the default IDCMP, pens, cursor and size limits; keeps the old pr_WindowPtr for finit.
| gfx | a0: the graphics base |
| intb | a1: the intuition base |
| void doactivate | ( | struct bwin * | w, |
| struct Library * | intbase ) |
Activate Window# - activate a window (ActivateWindow).
Amiga mode only. Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the window object |
| intbase | a6: the intuition base |
| void doaddidcmp | ( | void | ) |
|
static |
AddIDCMP IDCMP_Flags - add flags to the IDCMP of the next windows.
| f | d0: the IDCMP flags |
| void dobtow1 | ( | struct bwin * | w, |
| struct BitMap * | bm, | ||
| struct Library * | gfxbase ) |
| void dobtow2 | ( | ULONG | sx_reg, |
| ULONG | sy_reg, | ||
| ULONG | sx, | ||
| ULONG | sy, | ||
| ULONG | dx, | ||
| ULONG | dy, | ||
| const UWORD * | args, | ||
| struct bwin * | w, | ||
| struct BitMap * | bm, | ||
| struct Library * | gfxbase ) |
BitMaptoWindow Bitmap#,Window#,srcx,srcy,destx,desty,wid,height - copy an area of a bitmap into a window.
The coordinates come in d2-d5, width and height from the argument stack; MOVE.w: the upper words of the registers stay (each value keeps the upper word of the register it is moved into). Errors as the short form.
| void docatchdoserrs | ( | void | ) |
|
static |
CatchDosErrs - DOS requesters appear on the used window.
Sets pr_WindowPtr of the program's process; finit restores the old one.
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void docursor | ( | void | ) |
|
static |
Cursor Thickness - the cursor of Edit$ in a window.
| u | d0: < 0 a block, >= 0 an underline of that thickness |
| void doeditat | ( | void | ) |
|
static |
Editat - where the last Edit$ in a window ended (cursor position).
| void doeditexit | ( | void | ) |
|
static |
EditExit - the character that ended the last Edit$ in a window ($FFFF: another event in EditFrom mode).
| void doeditfrom | ( | void | ) |
| void doeditfrom2 | ( | void | ) |
|
static |
EditFrom Characterpos - the next Edit$ in a window starts at that position and also ends on any other event (EditExit $FFFF).
| at | d0: the cursor position in the text |
|
static |
EditFrom - the next Edit$ in a window starts at position 0 and ends only with Return.
| void doemousex | ( | void | ) |
EMouseX - the mouse x position of the last event.
| void doemousey | ( | void | ) |
EMouseY - the mouse y position of the last event.
| ULONG doevent | ( | void | ) |
Event - the next event, without waiting.
Takes the first event node (doevent2): sets the data of EventWindow, EventCode, EventQualifier, EMouseX/Y, GadgetHit (gadget up/down, gadgetslib's button groups and cycle texts), MenuHit/ItemHit/SubHit, the outstanding key (Inkey$) and mouse button (MButtons). Amiga mode only.
A gadget down of a string gadget gives an artificial "gadget up" ($40) on the next Event unless that is the real one; Fixed (#311): the real gadget up that comes after an artificial one is taken without a report (0; the original reported it a second time). MENUPICK appends one more MENUPICK node for the item's NextSelect, with the qualifier and iaddress of the picked event (Fixed (#312): the original left them unset).
|
static |
| void doeventcode | ( | void | ) |
EventCode - the IDCMP code of the last event.
| void doeventqualifier | ( | void | ) |
EventQualifier - the qualifier of the last event.
| void doeventwindow | ( | void | ) |
|
static |
EventWindow - the window number of the last event.
MOVE.w into d0 after MOVE.l eventwin,d0: upper word = upper word of the pointer. Keeps a1, which wzlib holds across it (WZGadHelp, WZMenuHelp, WZGadName, WZMenuName): the C function uses only d0 and a0 (checked in the disassembly; KEEPS a1 in libs/tests/systest_cmdlibs.c).
| void doflushevents | ( | void | ) |
| void doflushevents2 | ( | ULONG | class | ) |
FlushEvents IDCMP_Flag - drop all events of one class.
Long compare of the class. RAWKEY ($400) also drops the outstanding key, MOUSEBUTTONS (8) the outstanding mouse button.
| class | d0: the IDCMP class |
|
static |
FlushEvents - drop all events.
Takes the outstanding messages of the port into the list and frees the whole list; no outstanding key or mouse button any more.
| void dogadgethit | ( | void | ) |
GadgetHit - the gadget id of the last gadget event (-1 at init).
| void dogzzheight | ( | void | ) |
|
static |
InnerHeight - the inner height of the used window (GZZHeight).
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dogzzwidth | ( | void | ) |
|
static |
InnerWidth - the inner width of the used window (GZZWidth).
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void doinnercls | ( | struct bwin * | w, |
| struct Library * | gfxbase ) |
| void doinnercls2 | ( | UWORD | c, |
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
| void doinwindow | ( | void | ) |
|
static |
WindowInput Window# - Inkey$/Edit$ etc. read from a window.
Hands windowinp_h (inputoutputlib's input handler, -4 = the line editor) to inputoutputlib (setin).
a3: the window object (blitz_string)
| void doitemhit | ( | void | ) |
ItemHit - the item number of the last menu event, -1 for none.
| void domenuhit | ( | void | ) |
MenuHit - the menu number of the last menu event, -1 for none.
| void domenusoff | ( | UBYTE * | objs, |
| UWORD | max, | ||
| struct Library * | intbase ) |
MenusOff - switch the menus of all windows off.
Sets RMBTRAP and MENUVERIFY of every window (newidcmp; the event reader answers MENUVERIFY with MENUCANCEL). Amiga mode only.
Fixed (#310): the original reached only half of the windows (16 byte steps).
| objs | a2: the window objects (base) |
| max | d2: the maximum of window objects |
| intbase | a6: the intuition base |
| void domenusok | ( | UWORD | on, |
| UBYTE * | objs, | ||
| UWORD | max, | ||
| struct Library * | intbase ) |
Menus On|Off - MenusOn or MenusOff.
Fixed (#310): the original reached only half of the windows (16 byte steps).
| on | d0: <>0 = on (a word) |
| objs | a2: the window objects (base) |
| max | d2: the maximum of window objects |
| intbase | a6: the intuition base |
| void domenuson | ( | UBYTE * | objs, |
| UWORD | max, | ||
| struct Library * | intbase ) |
MenusOn - the menus of all windows work again.
Clears RMBTRAP and MENUVERIFY of every window (newidcmp). Amiga mode only.
Fixed (#310): the original stepped through the window objects with 16 bytes and only maximum slots: half of the windows were not reached.
| objs | a2: the window objects (base) |
| max | d2: the maximum of window objects |
| intbase | a6: the intuition base |
| void dooutwindow | ( | void | ) |
|
static |
WindowOutput Window# - Print/NPrint write to a window.
Hands windowprint_h (-8 = 0-terminated string, -4 = string with length, 0 = one character) to inputoutputlib (setout).
a3: the window object (blitz_string)
| void doqual | ( | void | ) |
|
static |
Qualifier - the qualifier of the last key read from a window. Fixed (#313): a long function, d0 is set as a long; the original set only its low word.
| void dorawkey | ( | void | ) |
|
static |
RawKey - the raw key code of the last key read from a window.
| void dosetevfilter | ( | void | ) |
|
static |
SetEventFilter preprocess,postprocess - routines around every message.
The pre routine runs before a message is taken into the event list (d0 = message, 0 back = drop it), the post routine after it (d0 = message or 0); see callfilter. 0 = none.
| pre | d0: the preprocess routine |
| post | d1: the postprocess routine |
| void dosetjam | ( | void | ) |
|
static |
WJam Jammode - the drawing mode of the window output and drawing.
| j | d0: the draw mode (SetDrMd) |
| void dosetpens | ( | void | ) |
| void dosetpens2 | ( | void | ) |
|
static |
WColour Foreground Colour,Background Colour - the text pens of the window output.
| f | d0: the foreground pen |
| b | d1: the background pen |
|
static |
WColour Foreground Colour - the foreground pen of the window output.
| f | d0: the foreground pen |
| void doslimits | ( | void | ) |
| void doslimits2 | ( | void | ) |
|
static |
SizeLimits Flag (the one argument form) - whether the next windows get the SizeLimits.
0: Window opens with all limits 0.
| on | d0: <>0 = use the limits (a word) |
|
static |
| void dosubhit | ( | void | ) |
SubHit - the subitem number of the last menu event, -1 for none.
| void dosubidcmp | ( | void | ) |
|
static |
SubIDCMP IDCMP_Flags - remove flags from the IDCMP of the next windows.
NOT.l d0 - d0 comes back inverted.
| f | d0: the IDCMP flags |
| void dousewindow | ( | void | ) |
|
static |
|
static |
_use (Use Window) - WindowOutput and WindowInput of a window.
a3: the window object (blitz_string)
| ULONG dowaitevent | ( | void | ) |
WaitEvent - wait for the next event (statement or function).
As Event, but waits on the port until an event with a class <> 0 comes. Amiga mode only.
| void dowblit | ( | ULONG | xpos, |
| ULONG | ypos, | ||
| ULONG | y_reg, | ||
| struct bwin * | w, | ||
| const struct bb_shape * | shape, | ||
| struct Library * | gfxbase ) |
WBlit Shape#,x,y - draw a shape into the used window.
The shape's planes as a BitMap (mybmap), with the cookie as mask if there is one (BltMaskBitMapRastPort minterm $E0, else BltBitMapRastPort $C0); the position is minus the shape's handle.
Errors (debugger only, wblitchk): "Uninitialized Window", "Ininitialised Shape".
| void dowbox | ( | ULONG | x0, |
| ULONG | y0, | ||
| ULONG | x1, | ||
| ULONG | y1, | ||
| UWORD | c, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
|
static |
| void dowcircle | ( | WORD | x, |
| WORD | y, | ||
| ULONG | r, | ||
| UWORD | c, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
| void dowcls | ( | struct bwin * | w, |
| struct Library * | gfxbase ) |
| void dowcls2 | ( | UWORD | c, |
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
| void dowcursx | ( | void | ) |
|
static |
WCursX - the text cursor x of the used window.
The cursor minus the origin of the window (the left border, 0 for GIMMEZEROZERO). Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dowcursy | ( | void | ) |
|
static |
WCursY - the text cursor y of the used window.
The cursor minus the origin of the window (the top border, 0 for GIMMEZEROZERO). Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dowellipse | ( | WORD | x, |
| WORD | y, | ||
| ULONG | rx, | ||
| ULONG | ry, | ||
| UWORD | c, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
| void dowfont | ( | const struct bb_intuifont * | font, |
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
WindowFont IntuiFont# - the font of the used window (SetFont).
Amiga mode only. Errors (debugger only, wfontchk): "Uninitialized Window", an IntuiFont without font -> "Uninitialized IntuiFont".
| void dowfont2 | ( | ULONG | style, |
| const struct bb_intuifont * | font, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
WindowFont IntuiFont#,SoftStyle - font and soft style of the used window (SetFont, SetSoftStyle with all style bits enabled).
Amiga mode only. Errors as WindowFont IntuiFont#.
| void dowindow | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| UBYTE | dpen, | ||
| UBYTE | bpen, | ||
| ULONG * | glist, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen,GadgetList# - open a window with a gadget list.
Closes the window object first, then opens the window on the used screen with the static NewWindow (SizeLimits if on, flag $80 = super bitmap, REPORTMOUSE if the IDCMP has MOUSEMOVE), gives it the shared port and the DefaultIDCMP, and makes it the used, input and output window. X, Y, Width and Height come from the argument stack. a3 = the window object (blitz_string). Amiga mode only.
Errors: OpenWindow fails -> "Couldn't Open Window" (err1).
The title is copied (allocst) and freed when the window is closed (fixed, intended deviation, #318: the original never frees it). Fixed (#319): flag $80 gets no bitmap in this form; the original used the bitmap of the last Window with BitMap#.
| objoff | d0: the object offset (window number << 5) |
| flags | d1: the window flags |
| title | d2: the title |
| dpen | d3: the detail pen |
| bpen | d4: the block pen |
| glist | a0: the gadget list object |
| scr | a1: the used screen object |
| usedoff | d6: the offset of the used window in the globals |
| lens | a2: the argument stack (position, size, title length) |
| intbase | a6: the intuition base |
| void dowindow2 | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| UBYTE | dpen, | ||
| UBYTE | bpen, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen - open a window without gadgets.
As the form with GadgetList#, with the empty gadget list (V.zero). Fixed (#319): flag $80 gets no bitmap in this form; the original used the bitmap of the last Window with BitMap#.
| objoff | d0: the object offset (window number << 5) |
| flags | d1: the window flags |
| title | d2: the title |
| dpen | d3: the detail pen |
| bpen | d4: the block pen |
| scr | a1: the used screen object |
| usedoff | d6: the offset of the used window in the globals |
| lens | a2: the argument stack (position, size, title length) |
| intbase | a6: the intuition base |
| void dowindow3 | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| ULONG * | glist, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
Window Window#,X,Y,Width,Height,Flags,Title$,Dpen,Bpen,GadgetList#,BitMap# - open a window with a gadget list and a super bitmap.
As the form with GadgetList#; the pens come from the stack (-10/-12(a2)), a4 = the bitmap object, the super bitmap of flag $80 of this window only (fixed #319: the original kept it in bmapbase for the later windows too).
| objoff | d0: the object offset (window number << 5) |
| flags | d1: the window flags |
| title | d2: the title |
| glist | a0: the gadget list object |
| scr | a1: the used screen object |
| usedoff | d6: the offset of the used window in the globals |
| lens | a2: the argument stack (position, size, pens, title length) |
| intbase | a6: the intuition base |
| void dowindowheight | ( | void | ) |
|
static |
WindowHeight - the height of the used window.
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dowindowidcmp | ( | void | ) |
|
static |
DefaultIDCMP IDCMP_Flags - the IDCMP of the windows opened next.
Errors (debugger only, idcmpchk): 0 -> "IDCMP must not be 0".
| f | d0: the IDCMP flags |
| void dowindowtags1 | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
WindowTags Window#,Flags,Title$ - open a window with OpenWindowTagList.
Closes the window object first; the tags are WA_Flags, WA_Title (a copy of the title), WA_CustomScreen (the used screen), WA_NewLookMenus, then the user tags. The window gets the shared port and the DefaultIDCMP and becomes the used, input and output window. a3 = the window object (blitz_string). Amiga mode only.
Errors: OpenWindowTagList fails -> "Couldn't Open Window" (err1).
Fixed (#316): the user tags are ended with TAG_DONE; the original wrote none and took over the user tags of the last WindowTags. The title copy is freed when the window is closed (fixed, #318: the original never frees it).
| objoff | d0: the object offset (window number << 5) |
| flags | d1: the window flags |
| title | d2: the title |
| scr | a1: the used screen object |
| usedoff | d6: the offset of the used window in the globals |
| lens | a2: the argument stack, -4 = the title length |
| intbase | a6: the intuition base |
| void dowindowtags2 | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| UWORD | n, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
WindowTags Window#,Flags,Title$,Tag,Data[,Tag,Data...] - open a window with tag pairs.
As WindowTags Window#,Flags,Title$; the pairs come from the argument stack, then TAG_DONE (its data not set).
No limit for the 16 user tags in the command (the pairs come from the argument stack in reverse order and cannot be linked with TAG_MORE as in the &TagList form, #317). Errors (debugger only, wtagschk): more than 15 pairs -> "Too Many Tags" (Fixed (#961): the original has no check and writes behind the user tags).
| objoff | d0: the object offset (window number << 5) |
| flags | d1: the window flags |
| title | d2: the title |
| n | d7: the number of tag pairs |
| scr | a1: the used screen object |
| usedoff | d6: the offset of the used window in the globals |
| lens | a2: the argument stack: the title length, then the pairs |
| intbase | a6: the intuition base |
| void dowindowtags3 | ( | UWORD | objoff, |
| ULONG | flags, | ||
| const UBYTE * | title, | ||
| const ULONG * | tl, | ||
| struct Screen ** | scr, | ||
| WORD | usedoff, | ||
| const ULONG * | lens, | ||
| struct Library * | intbase ) |
WindowTags Window#,Flags,Title$,&TagList - open a window with a tag list of the program.
As WindowTags Window#,Flags,Title$; the list is copied up to and including TAG_DONE behind the fixed tags, at most 16 entries: a longer list gets TAG_MORE to its 16th pair as the 16th entry.
Fixed (intended deviation, #317): the original copies without a limit into the 32 longs of usertags.
| void dowindowwidth | ( | void | ) |
|
static |
WindowWidth - the width of the used window.
Word functions (WORD_FN): MOVE.w into d0 in the original. Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dowindowx | ( | void | ) |
|
static |
WindowX - the x position of the used window.
| w | a1: the used window object |
| void dowindowy | ( | void | ) |
|
static |
WindowY - the y position of the used window.
| w | a1: the used window object |
| void dowleftoff | ( | void | ) |
|
static |
WLeftOff - the width of the used window's left border.
MOVEQ #0,d0:MOVE.b border,d0.
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
| void dowline | ( | UWORD | c, |
| UWORD | n, | ||
| UBYTE * | args, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
WLine X1,Y1,X2,Y2[,Xn,Yn...],Colour - lines through the points in the used window (Move + PolyDraw).
The point pairs are on the argument stack and are swapped in place to x,y. Errors (debugger only, wlinechk): fewer than 2 points -> "Not Enough Coordinates", "Uninitialized Window".
| void dowlocate | ( | void | ) |
|
static |
| void dowmousex | ( | void | ) |
|
static |
WMouseX - the mouse x position in the used window.
| w | a1: the used window object |
| void dowmousey | ( | void | ) |
|
static |
WMouseY - the mouse y position in the used window.
| w | a1: the used window object |
| void dowmove | ( | ULONG | x, |
| ULONG | y, | ||
| struct bwin * | w, | ||
| struct Library * | intbase ) |
WMove X,Y - move the used window (MoveWindow by the difference).
Errors (debugger only, wmovechk): "Uninitialized Window"; a negative position or the window outside its screen -> "Can't move Window".
Waits until Intuition has moved the window: until it has the new position or another one than before (Intuition limits the move), at most MAXWAIT frames. Fixed (#320): the original waits only for the new position, without an end if Intuition limits it.
| void dowplot | ( | WORD | x, |
| WORD | y, | ||
| UWORD | c, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
| void dowpointer | ( | const struct bb_shape * | shape, |
| ULONG | xoff_reg, | ||
| ULONG | yoff_reg, | ||
| struct Library * | intbase ) |
WPointer Shape# - a shape as the mouse pointer of the used window.
A sprite pointer from the first two planes of the shape (one word wide), in chip memory (memlib globalloc, kept in the window object; an old one is cleared and freed first); SetPointer with the shape's handle as offset. a3 = the used window object (blitz_string). Amiga mode only.
Errors (debugger only, wpointerchk): "Uninitialized Shape", "Uninitialized Window".
| shape | a2: the shape object |
| xoff_reg | d2: the caller's d2 (its upper word goes to SetPointer) |
| yoff_reg | d3: the caller's d3 (its upper word goes to SetPointer) |
| intbase | a6: the intuition base |
| void dowprintscroll | ( | struct bwin * | w, |
| struct Library * | gfxbase ) |
WPrintScroll - scroll the used window if the text cursor is below its inner height.
Scrolls the inner area up so that the cursor line fits, and moves the cursor up by the same amount. Not Amiga mode only. Errors (debugger only, wchk): "Uninitialized Window".
Fixed (#315): sets the B pen and the draw mode only (scrollpen); the original set the A pen to 0 as well.
| void dowrport | ( | void | ) |
RastPort(Window#) - the RastPort of a window (inline).
MOVE.l (a1),a1:MOVE.l 50(a1),d0 (Window->RPort).
Errors (debugger only, wchk): "Uninitialized Window".
| void dowscroll | ( | ULONG | x0, |
| ULONG | y0, | ||
| ULONG | x1, | ||
| ULONG | y1, | ||
| WORD | dx, | ||
| WORD | dy, | ||
| struct bwin * | w, | ||
| struct Library * | gfxbase ) |
WScroll X1,Y1,X2,Y2,Delta X,Delta Y - scroll an area of the used window (ScrollRaster).
Fixed (#315): sets the B pen and the draw mode only (scrollpen); the original set the A pen to 0 as well.
| void dowsize | ( | ULONG | x, |
| ULONG | y, | ||
| struct bwin * | w, | ||
| struct Library * | intbase ) |
WSize Width,Height - resize the used window (SizeWindow by the difference).
Errors (debugger only, wsizechk): "Uninitialized Window"; a size <= 0, the window outside its screen or (fixed, #320: not in the original) a window with a sizing gadget sized beyond its size limits -> "Can't Size Window".
Waits until Intuition has sized the window: until it has the new size or another one than before (Intuition limits the size), at most MAXWAIT frames. Fixed (#320): the original waits only for the new size, without an end if Intuition limits it.
| void dowtitle | ( | const UBYTE * | wt, |
| const UBYTE * | st, | ||
| const ULONG * | lens, | ||
| struct bwin * | w, | ||
| struct Library * | intbase ) |
WTitle windowtitle$,screentitle$ - the titles of the used window and its screen (SetWindowTitles).
Errors (debugger only, wchk): "Uninitialized Window".
Copies of both strings (allocst), kept in the object; the old copies are freed after SetWindowTitles. Fixed (intended deviation, #318): the original never frees them.
| void dowtopoff | ( | void | ) |
|
static |
WTopOff - the height of the used window's top border.
MOVEQ #0,d0:MOVE.b border,d0.
Errors (debugger only, wchk): "Uninitialized Window".
| w | a1: the used window object |
|
static |
|
static |
| void freewindow | ( | struct Library * | intbase | ) |
CloseWindow Window# (and _free) - close a window.
Under Forbid: replies the messages of this window at the port, clears pr_WindowPtr if it is this window, ClearMenuStrip, UserPort = 0 (the port is shared), CloseWindow; then frees the events of this window and the title copies of the object (fixed, #318: the original keeps them). a3 = the window object (blitz_string); nothing happens if it is not open.
Fixed (intended deviation, #322): the original replies all messages of the port and frees the whole event list (unlinkall): the events of the other windows were lost.
| intbase | a6: the intuition base |
|
static |
| GFX_STMT | ( | dowbox | , |
| windowslib_wchk | , | ||
| "WBox" | , | ||
| " | X1, | ||
| Y1 | , | ||
| X2 | , | ||
| Y2 | , | ||
| Colour" | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | ) |
| GFX_STMT | ( | dowcircle | , |
| windowslib_wchk | , | ||
| "WCircle" | , | ||
| " | X, | ||
| Y | , | ||
| Radius | , | ||
| Colour" | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | ) |
| GFX_STMT | ( | dowellipse | , |
| windowslib_wchk | , | ||
| "WEllipse" | , | ||
| " | X, | ||
| Y | , | ||
| X | Radius, | ||
| Y | Radius, | ||
| Colour" | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | ) |
| GFX_STMT | ( | dowplot | , |
| windowslib_wchk | , | ||
| "WPlot" | , | ||
| " | X, | ||
| Y | , | ||
| Colour" | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | ) |
| GFX_STMT | ( | dowscroll | , |
| windowslib_wchk | , | ||
| "WScroll" | , | ||
| " | X1, | ||
| Y1 | , | ||
| X2 | , | ||
| Y2 | , | ||
| Delta | X, | ||
| Delta Y" | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | , | ||
| BL_WORD | ) |
|
static |
|
static |
| void handlers | ( | void | ) |
| void idcmpchk | ( | void | ) |
|
static |
|
static |
|
static |
| void inputstr_h | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| SIMPLE_FN | ( | BL_LONG | , |
| BLITZ_AMIGAONLY(doevent) | , | ||
| "Event" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| BLITZ_AMIGAONLY(buttons) | , | ||
| "MButtons" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| BLITZ_AMIGAONLY(doeventcode) | , | ||
| "EventCode" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| BLITZ_AMIGAONLY(doeventqualifier) | , | ||
| "EventQualifier" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| doeditexit | , | ||
| "EditExit" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| doeventwindow | , | ||
| "EventWindow" | ) |
| SIMPLE_FN | ( | BL_WORD | , |
| dogadgethit | , | ||
| "GadgetHit" | ) |
|
static |
|
static |
|
static |
|
static |
| USED_FN | ( | dogzzheight | , |
| "InnerHeight" | ) |
| USED_FN | ( | dogzzwidth | , |
| "InnerWidth" | ) |
| USED_FN | ( | dowcursx | , |
| "WCursX" | ) |
| USED_FN | ( | dowcursy | , |
| "WCursY" | ) |
| USED_FN | ( | dowindowheight | , |
| "WindowHeight" | ) |
| USED_FN | ( | dowindowwidth | , |
| "WindowWidth" | ) |
| USED_FN | ( | dowindowx | , |
| "WindowX" | ) |
| USED_FN | ( | dowindowy | , |
| "WindowY" | ) |
| USED_FN | ( | dowleftoff | , |
| "WLeftOff" | ) |
| USED_FN | ( | dowmousex | , |
| "WMouseX" | ) |
| USED_FN | ( | dowmousey | , |
| "WMouseY" | ) |
| USED_FN | ( | dowtopoff | , |
| "WTopOff" | ) |
|
static |
| void wblitchk | ( | void | ) |
|
static |
| void wbtowchk | ( | void | ) |
|
static |
|
static |
| void wfontchk | ( | void | ) |
|
static |
|
static |
|
static |
| void windowinp_h | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
| void windowprint2_h | ( | void | ) |
|
static |
|
static |
| void windowprint3_h | ( | void | ) |
|
static |
| void windowprint_h | ( | void | ) |
| void windowslib_wchk | ( | void | ) |
| void wlinechk | ( | void | ) |
|
static |
| void wmovechk | ( | void | ) |
|
static |
| WORD_FN | ( | doeditat | , |
| doeditat_c | ) |
| WORD_FN | ( | doeditexit | , |
| doeditexit_c | ) |
| WORD_FN | ( | dogzzheight | , |
| dogzzheight_c | ) |
| WORD_FN | ( | dogzzwidth | , |
| dogzzwidth_c | ) |
| WORD_FN | ( | dorawkey | , |
| dorawkey_c | ) |
| WORD_FN | ( | dowcursx | , |
| dowcursx_c | ) |
| WORD_FN | ( | dowcursy | , |
| dowcursy_c | ) |
| WORD_FN | ( | dowindowheight | , |
| dowindowheight_c | ) |
| WORD_FN | ( | dowindowwidth | , |
| dowindowwidth_c | ) |
| WORD_FN | ( | dowindowx | , |
| dowindowx_c | ) |
| WORD_FN | ( | dowindowy | , |
| dowindowy_c | ) |
| WORD_FN | ( | dowmousex | , |
| dowmousex_c | ) |
| WORD_FN | ( | dowmousey | , |
| dowmousey_c | ) |
| void wpointerchk | ( | void | ) |
|
static |
| void wsizechk | ( | void | ) |
|
static |
| void wtagschk | ( | void | ) |
|
static |
|
static |
|
static |
| UWORD bpen |
| UWORD charbuf |
| UWORD eat |
| UWORD eexit |
| UWORD efrom |
| WORD emode |
| UWORD evcode |
| WORD eventgnum |
| struct Window* eventwin |
| WORD evmousex |
| WORD evmousey |
| UWORD evqualifier |
| struct evnode* firstmess |
| UWORD fpen |
| struct Library* gfxbase |
| ULONG idcmp |
|
static |
| struct bwin* inwindow |
| WORD itemnum |
|
static |
|
static |
| UWORD kqualifier |
| UWORD lflgs |
| ULONG linw |
| UWORD lrawkey |
|
static |
| WORD maxh |
| WORD maxw |
| WORD menunum |
|
static |
|
static |
|
static |
| WORD minh |
| WORD minw |
| UWORD msgon |
|
static |
|
static |
| struct evnode** nextmess |
| ULONG oldexbits |
| ULONG oldexcode |
|
static |
|
static |
| UWORD outkey |
| UWORD outmouse |
| struct Window* outmwin |
| UWORD outq |
| UWORD outr |
| struct Window* outwindow |
|
static |
|
static |
| struct bwin* prwindow |
| struct { ... } sizelimits |
|
static |
| WORD subnum |
|
static |
| struct { ... } tags |
| UWORD tjam |
| void underline |
| struct TagItem user[16] |
| struct { ... } V |
| ULONG zero |