BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
gtlib.c File Reference
#include "blitzlib.h"
#include "blitzobj.h"
#include "blitzexec.h"
#include <intuition/intuition.h>
#include <intuition/screens.h>
#include <libraries/gadtools.h>
#include <proto/gadtools.h>
#include <proto/intuition.h>

Data Structures

struct  gtcontext
struct  gtblock
struct  shapeimg

Macros

#define __NOLIBBASE__
#define GADTOOLS_BASE_NAME   gtbase
#define INTUITION_BASE_NAME   intbase
#define TAG   0x80080000UL
#define T_DISABLED   0x8003000eUL /* GA_Disabled */
#define T_IMMEDIATE   0x80030015UL /* GA_Immediate */
#define T_RELVERIFY   0x80030016UL /* GA_RelVerify */
#define T_FREEDOM   0x80031001UL /* PGA_Freedom */
#define T_UNDERSC   (TAG + 64) /* GT_Underscore */
#define A   (char *) /* +1: Amiga mode only */
#define STD   BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_WORD, BL_STRING, BL_LONG
#define STDLIBS   BLITZ_LIBS(LIB_mygadtoolslib, BL_IA3|BL_PD0, LIB_intuifontlib, BL_LA0, LIB_screenslib, BL_UA1)
#define WPUSH   (BL_WORD | BL_PUSH)
#define HI(w)
#define LO(w)
#define UW(p, o)
#define L(p, o)
#define MORE   { TAG_END, (ULONG)usertags }
#define UNDERSC   { T_UNDERSC, '_' }
#define LOWORD(ti)
#define GTB_RELEASED   ((struct Gadget *)1)
#define CREATE(kind, flags, tl)
#define STDARGS
#define HANDLESTD(a)
#define SHAPEARGS
#define E(entry, cfunc)

Functions

void _gtbutton (void)
void _gtcheckbox (void)
void _gtcycle (void)
void _gtcycle2 (void)
void _gtinteger (void)
void _gtlistview (void)
void _gtlistview1 (void)
void _gtlistview2 (void)
void _gtmx (void)
void _gtmx2 (void)
void _gtnumber (void)
void _gtpalette (void)
void _gtpalette2 (void)
void _gtscroller (void)
void _gtscroller2 (void)
void _gtslider (void)
void _gtslider2 (void)
void _gtstring (void)
void _gtstring2 (void)
void _gttext (void)
void _attachgtlist (void)
void gtlib_gttags (void)
void _gtptr (void)
void _gtbevel (void)
void _gtchnglist1 (void)
void _gtchnglist2 (void)
void _gtsetattrs (void)
void _gtsetstring (void)
void _gtsetint (void)
void _gtgetstring (void)
void _gtgetint (void)
void _gtshape (void)
void _gtshape2 (void)
void _gtgetattrs (void)
void gtlib_doenable (void)
void gtlib_dodisable (void)
void gtlib_doselect (void)
void gtlib_doselect2 (void)
void _gtgetstatus (void)
void _gtarrowsize (void)
void _detachgtlist (void)
void _gtcludge (void)
void _gtsethighlight (void)
void _gtfreegadget (void)
void _freecontext (void)
 Free GTList#: the object's free routine (_free).
static void _codeinit (void)
static void _codefinit (void)
void gtlib_sgchk (void)
void gtlib_sgchk2 (void)
void attachchk (void)
void detachchk (void)
void freegadchk (void)
static ULONG allocst (ULONG str, ULONG len)
static struct gtblock * gtalloc (ULONG size)
static void gtrelease (struct gtcontext *c, struct Gadget *gad)
static void gtfreeblocks (struct gtcontext *c, struct Gadget *gad)
static ULONG bit (ULONG flags, int n)
static ULONG prehandler_c (struct IntuiMessage *m)
void _prehandler (void)
static ULONG posthandler_c (struct IntuiMessage *m)
void _posthandler (void)
static void getcontext (struct gtcontext *c)
static const ULONG * handlestd (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args, int shape)
static struct Gadget * create (ULONG kind, ULONG flags, struct TagItem *tags, int more)
static void gtbutton_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTButton GTList#,id,x,y,w,h,Text$,flags: add a BUTTON_KIND gadget.
static void gtcheckbox_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTCheckBox GTList#,id,x,y,w,h,Text$,flags: add a CHECKBOX_KIND gadget.
static ULONG getoptions (const ULONG **sp, struct gtblock **blk)
static void cycle (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtcycle_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTCycle GTList#,id,x,y,w,h,Text$,flags,Options$: add a CYCLE_KIND gadget.
static void gtcycle2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTCycle GTList#,id,x,y,w,h,Text$,flags,Options$,active: GTCycle with the active entry (GTCY_Active, the word at a2-22).
static void mx (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtmx_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTMX GTList#,id,x,y,w,h,Text$,flags,Options$: add an MX_KIND gadget.
static void gtmx2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTMX GTList#,id,x,y,w,h,Text$,flags,Options$,active: GTMX with the active entry (GTMX_Active, the word at a2-22).
static void gttext_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTText GTList#,id,x,y,w,h,Text$,flags,Display$: add a TEXT_KIND gadget.
static void gtinteger_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTInteger GTList#,id,x,y,w,h,Text$,flags,default: add an INTEGER_KIND gadget.
static void listview (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtlistview_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTListView GTList#,id,x,y,w,h,Text$,flags,list(): add a LISTVIEW_KIND gadget.
static void gtlistview1_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTListView GTList#,id,x,y,w,h,Text$,flags,list(),selected: GTListView with GTLV_Selected = GTLV_Top = selected (the word at a2-18).
static void gtlistview2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTListView GTList#,id,x,y,w,h,Text$,flags,list(),selected,top: GTListView with GTLV_Selected (the word at a2-18) and GTLV_Top (a2-22).
static void gtnumber_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTNumber GTList#,id,x,y,w,h,Text$,flags,value: add a NUMBER_KIND gadget.
static void palette (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtpalette_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTPalette GTList#,id,x,y,w,h,Text$,flags,depth: add a PALETTE_KIND gadget.
static void gtpalette2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTPalette GTList#,id,x,y,w,h,Text$,flags,depth,Color: GTPalette with a colour (the word at a2-18).
static void scroller (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtscroller_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTScroller GTList#,id,x,y,w,h,Text$,flags,Visible,Total: add a SCROLLER_KIND gadget.
static void gtscroller2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTScroller GTList#,id,x,y,w,h,Text$,flags,Visible,Total,Top: GTScroller with GTSC_Top (the word at a2-18).
static void slider (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtslider_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTSlider GTList#,id,x,y,w,h,Text$,flags,Min,Max: add a SLIDER_KIND gadget.
static void gtslider2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTSlider GTList#,id,x,y,w,h,Text$,flags,Min,Max,Level: GTSlider with GTSL_Level (the word at a2-18).
static void string (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
static void gtstring_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTString GTList#,id,x,y,w,h,Text$,flags,MaxChars: add a STRING_KIND gadget.
static void gtstring2_c (UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args)
 GTString GTList#,id,x,y,w,h,Text$,flags,MaxChars,default$: GTString with GTST_String = default$ (the long at a2-22).
static void doshape (UWORD id, WORD x, WORD y, ULONG flags, struct TextAttr **font, struct Screen **scr)
static void shape1 (const struct bb_shape *shape)
static void gtshape_c (UWORD id, WORD x, WORD y, ULONG flags, struct TextAttr **font, struct Screen **scr, const struct bb_shape *shape)
 GTShape GTList#,id,x,y,flags,Shape#: add a BUTTON_KIND gadget that shows a shape.
static void gtshape2_c (UWORD id, WORD x, WORD y, ULONG flags, struct TextAttr **font, struct Screen **scr, const struct bb_shape *shape2, const struct bb_shape *shape)
 GTShape GTList#,id,x,y,flags,Shape#,Shape#: GTShape with a second shape as the selected image (Image 2, GFLG_GADGHIMAGE).
static void addglist (struct Library *ib, struct Window *w, struct Gadget *g)
static void attachgtlist_c (struct gtcontext *c, struct Window **win, struct Library *intbase)
 AttachGTList GTList#,Window#: add the GTList's gadgets to a window.
static void detachgtlist_c (struct gtcontext *c, struct Library *intbase)
 DetachGTList GTList#: remove the GTList's gadgets from its window.
static struct Gadget * find (struct Gadget *gad, UWORD id)
static struct Gadget * lastof (struct Gadget *gad, UWORD id)
static ULONG gtfreegadget_c (UWORD id, struct gtcontext *c)
 GTFreeGadget GTList#,id: unlink the run of gadgets with the id and free them.
static void gtbevel_c (LONG x, LONG y, LONG w, LONG h, ULONG flags, struct gtcontext *c)
 GTBevelBox GTList#,x,y,w,h,flags: draw a bevel box into the GTList's window.
static ULONG gtptr_c (UWORD id, struct gtcontext *c)
 GTGadPtr(GTList#,id): the address of the gadget with the id.
static ULONG setattrs (struct gtcontext *c, UWORD id, struct TagItem *tags, int last)
static void gtchnglist1_c (UWORD id, struct gtcontext *c, const ULONG *args)
 GTChangeList GTList#,id,List(): give a listview new labels.
static void gtchnglist2_c (UWORD id, struct gtcontext *c)
 GTChangeList GTList#,id: detach the listview's labels (GTLV_Labels = -1), as GTChangeList with a list.
static void gtsethighlight_c (UWORD id, ULONG v, struct gtcontext *c)
 GTSetHighlight GTList#,id,value: select a listview entry and make it visible.
static const ULONG * gttags (UWORD pairs, const ULONG *sp)
static void gttags_c (UWORD pairs, const ULONG *args)
 GTTags Tag,Value[,Tag,Value...]: extra tags for the next gadget.
static ULONG gtsetattrs_c (UWORD id, UWORD pairs, struct gtcontext *c, const ULONG *args)
 GTSetAttrs GTList#,id[,Tag,Value...]: set tags of a gadget (also a function).
static void setone (struct gtcontext *c, UWORD id, ULONG v, ULONG tstr, ULONG tother)
static void gtsetstring_c (UWORD id, ULONG str, struct gtcontext *c)
 GTSetString GTList#,id,string$: set the text of a string or text gadget.
static void gtsetint_c (UWORD id, ULONG v, struct gtcontext *c)
 GTSetInteger GTList#,id,value: set the value of an integer or number gadget.
static ULONG gtgetstring_c (UWORD id, struct gtcontext *c)
 GTGetString(GTList#,id): the contents of a string gadget.
static ULONG gtgetint_c (UWORD id, struct gtcontext *c)
 GTGetInteger(GTList#,id): the value of an integer gadget.
static ULONG gtgetattrs_c (UWORD id, ULONG tag, struct gtcontext *c)
 GTGetAttrs(GTList#,id,Tag): read one attribute of a gadget.
static ULONG gtgetstatus_c (UWORD id, struct gtcontext *c)
 GTStatus(GTList#,Id): whether a gadget is selected.
static void gtarrowsize_c (ULONG size)
 GTArrowSize size: the arrow size of later GTScrollers with arrows (flag bit 11, GTSC_Arrows; initially 16).
static void gtcludge_c (UWORD on)
 GTGimmeCludge On/Off: on = later gadgets are placed without the screen's border sizes and font height (cludge = 0).
static struct Gadget * findgadget (struct Gadget *list, UWORD id)
static void doenable_c (UWORD id, struct Gadget *list)
 GTEnable GTList#,Id: clear GFLG_DISABLED of a gadget.
static void dodisable_c (UWORD id, struct Gadget *list)
 GTDisable GTList#,Id: set GFLG_DISABLED of a gadget, as GTEnable.
static void doselect_c (UWORD id, UWORD on, struct Gadget *list)
 GTToggle GTList#,Id,On|Off: set or clear GFLG_SELECTED of a gadget, as GTEnable.
static void doselect2_c (UWORD id, struct Gadget *list)
 GTToggle GTList#,Id: invert GFLG_SELECTED of a gadget, as GTEnable.
 E (_gtbutton, gtbutton_c)
 E (_gtcheckbox, gtcheckbox_c)
 E (_gtcycle, gtcycle_c)
 E (_gtcycle2, gtcycle2_c)
 E (_gtinteger, gtinteger_c)
 E (_gtlistview, gtlistview_c)
 E (_gtlistview1, gtlistview1_c)
 E (_gtlistview2, gtlistview2_c)
 E (_gtmx, gtmx_c)
 E (_gtmx2, gtmx2_c)
 E (_gtnumber, gtnumber_c)
 E (_gtpalette, gtpalette_c)
 E (_gtpalette2, gtpalette2_c)
 E (_gtscroller, gtscroller_c)
 E (_gtscroller2, gtscroller2_c)
 E (_gtslider, gtslider_c)
 E (_gtslider2, gtslider2_c)
 E (_gtstring, gtstring_c)
 E (_gtstring2, gtstring2_c)
 E (_gttext, gttext_c)
 E (_attachgtlist, attachgtlist_c)
 E (_detachgtlist, detachgtlist_c)
 E (_gtfreegadget, gtfreegadget_c)
 E (_gtbevel, gtbevel_c)
 E (_gtchnglist1, gtchnglist1_c)
 E (_gtchnglist2, gtchnglist2_c)
 E (_gtsethighlight, gtsethighlight_c)
 E (_gtsetattrs, gtsetattrs_c)
 E (_gtsetstring, gtsetstring_c)
 E (_gtsetint, gtsetint_c)
 E (_gtgetattrs, gtgetattrs_c)
 E (_gtshape, gtshape_c)
 E (_gtshape2, gtshape2_c)
 BLITZ_ALIAS (gtlib_gttags, gttags_c)
 BLITZ_ALIAS (_gtptr, gtptr_c)
 BLITZ_ALIAS (_gtgetstring, gtgetstring_c)
 BLITZ_ALIAS (_gtgetint, gtgetint_c)
 BLITZ_ALIAS (_gtgetstatus, gtgetstatus_c)
 BLITZ_ALIAS (_gtarrowsize, gtarrowsize_c)
 BLITZ_ALIAS (_gtcludge, gtcludge_c)
 BLITZ_ALIAS (gtlib_doenable, doenable_c)
 BLITZ_ALIAS (gtlib_dodisable, dodisable_c)
 BLITZ_ALIAS (gtlib_doselect, doselect_c)
 BLITZ_ALIAS (gtlib_doselect2, doselect2_c)
static void sgchk2_c (const struct bb_shape *shape2, const struct bb_shape *shape)
static void sgchk_c (const struct bb_shape *shape)
static void attachchk_c (struct Window **win, struct gtcontext *c)
static void detachchk_c (struct gtcontext *c)
static void freegadchk_c (struct gtcontext *c)

Variables

 STDLIBS
static struct Library * gtbase
static WORD cludge = -1
static ULONG arrowsize = 16
static struct TagItem usertags [16]
struct { 
   struct TagItem   tag 
   ULONG   end 
} onetag
struct { 
   struct TagItem   tag 
   ULONG   end 
} gettag = { { 0, 0 }, TAG_END }
static ULONG value
struct { 
   struct TagItem vinfo   recessed 
   ULONG   end 
} beveltags = { { GT_VisualInfo, 0 }, { GTBB_Recessed, 0 }, TAG_END }
struct { 
   struct TagItem   labels 
   ULONG   end 
} gatchtags = { { GTLV_Labels, 0 }, TAG_END }
struct { 
   struct TagItem selected makevisible   end 
} hightags = { { GTLV_Selected, 0 }, { GTLV_MakeVisible, 0 }, { TAG_END, 0 } }
static struct TagItem nulltags [2]
struct { 
   struct TagItem disabled immediate underscore   more 
} buttags = { { T_DISABLED, 0 }, { T_IMMEDIATE, 0 }, UNDERSC, MORE }
struct { 
   struct TagItem disabled checked scaled underscore   more 
} boxtags = { { T_DISABLED, 0 }, { GTCB_Checked, 0 }, { GTCB_Scaled, 0 }, UNDERSC, MORE }
struct { 
   struct TagItem disabled labels active underscore   more 
} cycletags = { { T_DISABLED, 0 }, { GTCY_Labels, 0 }, { GTCY_Active, 0 }, UNDERSC, MORE }
struct { 
   struct TagItem disabled labels scaled active underscore   more 
} mxtags
struct { 
   struct TagItem text border   more 
} texttags = { { GTTX_Text, 0 }, { GTTX_Border, (ULONG)-1 }, MORE }
struct { 
   struct TagItem disabled immediate number underscore   more 
} inttags = { { T_DISABLED, 0 }, { T_IMMEDIATE, 0 }, { GTIN_Number, 0 }, UNDERSC, MORE }
struct { 
   struct TagItem disabled labels top selected readonly underscore   more 
} listtags
struct { 
   struct TagItem number border   more 
} numbertags = { { GTNM_Number, 0 }, { GTNM_Border, (ULONG)-1 }, MORE }
struct { 
   struct TagItem disabled depth color underscore   more 
} palettetags = { { T_DISABLED, 0 }, { GTPA_Depth, 0 }, { GTPA_Color, 0 }, UNDERSC, MORE }
struct { 
   struct TagItem disabled immediate freedom visible total arrows top underscore relverify   more 
} scrollertags
struct { 
   struct TagItem disabled immediate freedom min max level underscore relverify   more 
} slidertags
struct { 
   struct TagItem disabled immediate maxchars string underscore   more 
} stringtags
struct { 
   struct TagItem disabled immediate underscore   more 
} shapetags = { { T_DISABLED, 0 }, { T_IMMEDIATE, 0 }, UNDERSC, MORE }
static UWORD gflags
static struct Image image1 = { 0, 0, 0, 0, 0, NULL, 3, 0, NULL }
static struct Image image2 = { 0, 0, 0, 0, 0, NULL, 3, 0, NULL }
static struct TextAttr * ufont
static struct Screen * uscreen
static struct NewGadget wrkgadget
static struct gtblock * gtblocks

Macro Definition Documentation

◆ __NOLIBBASE__

#define __NOLIBBASE__

◆ A

#define A   (char *) /* +1: Amiga mode only */

◆ CREATE

#define CREATE ( kind,
flags,
tl )
Value:
create(kind, flags, (struct TagItem *)&(tl), (sizeof(tl) - sizeof(struct TagItem)) / 4)
UBYTE flags[2]
Definition 2dlib.c:297
int kind
Definition basictest_read.c:22
static struct Gadget * create(ULONG kind, ULONG flags, struct TagItem *tags, int more)
Definition gtlib.c:736
static struct @170267223361116325247102061252011270007066170275 tl

◆ E

#define E ( entry,
cfunc )
Value:
__asm__(" .globl _" #entry "\n .set _" #entry ",_" #cfunc "\n")
static struct snowfield * entry(ULONG n)
Definition risnowlib.c:205

◆ GADTOOLS_BASE_NAME

#define GADTOOLS_BASE_NAME   gtbase

◆ GTB_RELEASED

#define GTB_RELEASED   ((struct Gadget *)1)

◆ HANDLESTD

#define HANDLESTD ( a)
Value:
handlestd(id, x, y, w, h, font, scr, a, 0)
ULONG x
Definition 2dlib.c:2491
WORD y
Definition 2dlib.c:285
struct TagItem w
Definition asllib.c:192
struct TagItem h
Definition asllib.c:193
static const ULONG * handlestd(UWORD id, WORD x, WORD y, WORD w, WORD h, struct TextAttr **font, struct Screen **scr, const ULONG *args, int shape)
Definition gtlib.c:696

◆ HI

#define HI ( w)
Value:
(((UBYTE *)&(w))[0])

◆ INTUITION_BASE_NAME

#define INTUITION_BASE_NAME   intbase

◆ L

#define L ( p,
o )
Value:
(*(ULONG *)((UBYTE *)(p) + (o)))

◆ LO

#define LO ( w)
Value:
(((UBYTE *)&(w))[1])

◆ LOWORD

#define LOWORD ( ti)
Value:
(((UWORD *)&(ti).ti_Data)[1])

◆ MORE

#define MORE   { TAG_END, (ULONG)usertags }

◆ SHAPEARGS

#define SHAPEARGS
Value:
UWORD id BL_REG(d1), WORD x BL_REG(d2), WORD y BL_REG(d3), \
ULONG flags BL_REG(d4), struct TextAttr **font BL_REG(a0), \
struct Screen **scr BL_REG(a1)
#define BL_REG(r)
Definition blitzlib.h:280

◆ STD

◆ STDARGS

#define STDARGS
Value:
UWORD id BL_REG(d1), WORD x BL_REG(d2), WORD y BL_REG(d3), \
WORD w BL_REG(d4), WORD h BL_REG(d5), struct TextAttr **font BL_REG(a0), \
struct Screen **scr BL_REG(a1), const ULONG *args BL_REG(a2)
APTR args
Definition rimisclib.c:397

◆ STDLIBS

#define STDLIBS   BLITZ_LIBS(LIB_mygadtoolslib, BL_IA3|BL_PD0, LIB_intuifontlib, BL_LA0, LIB_screenslib, BL_UA1)

◆ T_DISABLED

#define T_DISABLED   0x8003000eUL /* GA_Disabled */

◆ T_FREEDOM

#define T_FREEDOM   0x80031001UL /* PGA_Freedom */

◆ T_IMMEDIATE

#define T_IMMEDIATE   0x80030015UL /* GA_Immediate */

◆ T_RELVERIFY

#define T_RELVERIFY   0x80030016UL /* GA_RelVerify */

◆ T_UNDERSC

#define T_UNDERSC   (TAG + 64) /* GT_Underscore */

◆ TAG

#define TAG   0x80080000UL

◆ UNDERSC

#define UNDERSC   { T_UNDERSC, '_' }

◆ UW

#define UW ( p,
o )
Value:
(*(UWORD *)((UBYTE *)(p) + (o)))

◆ WPUSH

#define WPUSH   (BL_WORD | BL_PUSH)

Function Documentation

◆ _attachgtlist()

void _attachgtlist ( void )

◆ _codefinit()

void _codefinit ( void )
static

◆ _codeinit()

void _codeinit ( void )
static

◆ _detachgtlist()

void _detachgtlist ( void )

◆ _freecontext()

void _freecontext ( void )

Free GTList#: the object's free routine (_free).

Frees the VisualInfo and all gadgets of the GTList (a3) and clears the context and the window; nothing for a GTList without gadgets. It does not detach the gadgets from a window. Fixed (#174, #173): also the label blocks of its cycle/mx gadgets and the images of its GTShape gadgets (GadTools' render pointers put back before FreeGadgets).

◆ _gtarrowsize()

void _gtarrowsize ( void )

◆ _gtbevel()

void _gtbevel ( void )

◆ _gtbutton()

void _gtbutton ( void )

◆ _gtcheckbox()

void _gtcheckbox ( void )

◆ _gtchnglist1()

void _gtchnglist1 ( void )

◆ _gtchnglist2()

void _gtchnglist2 ( void )

◆ _gtcludge()

void _gtcludge ( void )

◆ _gtcycle()

void _gtcycle ( void )

◆ _gtcycle2()

void _gtcycle2 ( void )

◆ _gtfreegadget()

void _gtfreegadget ( void )

◆ _gtgetattrs()

void _gtgetattrs ( void )

◆ _gtgetint()

void _gtgetint ( void )

◆ _gtgetstatus()

void _gtgetstatus ( void )

◆ _gtgetstring()

void _gtgetstring ( void )

◆ _gtinteger()

void _gtinteger ( void )

◆ _gtlistview()

void _gtlistview ( void )

◆ _gtlistview1()

void _gtlistview1 ( void )

◆ _gtlistview2()

void _gtlistview2 ( void )

◆ _gtmx()

void _gtmx ( void )

◆ _gtmx2()

void _gtmx2 ( void )

◆ _gtnumber()

void _gtnumber ( void )

◆ _gtpalette()

void _gtpalette ( void )

◆ _gtpalette2()

void _gtpalette2 ( void )

◆ _gtptr()

void _gtptr ( void )

◆ _gtscroller()

void _gtscroller ( void )

◆ _gtscroller2()

void _gtscroller2 ( void )

◆ _gtsetattrs()

void _gtsetattrs ( void )

◆ _gtsethighlight()

void _gtsethighlight ( void )

◆ _gtsetint()

void _gtsetint ( void )

◆ _gtsetstring()

void _gtsetstring ( void )

◆ _gtshape()

void _gtshape ( void )

◆ _gtshape2()

void _gtshape2 ( void )

◆ _gtslider()

void _gtslider ( void )

◆ _gtslider2()

void _gtslider2 ( void )

◆ _gtstring()

void _gtstring ( void )

◆ _gtstring2()

void _gtstring2 ( void )

◆ _gttext()

void _gttext ( void )

◆ _posthandler()

void _posthandler ( void )

◆ _prehandler()

void _prehandler ( void )

◆ addglist()

void addglist ( struct Library * ib,
struct Window * w,
struct Gadget * g )
static

◆ allocst()

ULONG allocst ( ULONG str,
ULONG len )
static

◆ attachchk()

void attachchk ( void )

◆ attachchk_c()

void attachchk_c ( struct Window ** win,
struct gtcontext * c )
static

◆ attachgtlist_c()

void attachgtlist_c ( struct gtcontext * c,
struct Window ** win,
struct Library * intbase )
static

AttachGTList GTList#,Window#: add the GTList's gadgets to a window.

AddGList (position -1, all gadgets), RefreshGList and GT_RefreshWindow; the GTList remembers the window. Amiga mode only. Errors (debugger only): "GTList already attached to window!" if it is attached to this window already (attachchk).

Parameters
ca1: the GTList (!libs {mygadtoolslib,$1180})
wina0: the window object (!libs {windowslib,$1081})
intbasea6: intuition.library

◆ bit()

ULONG bit ( ULONG flags,
int n )
static

◆ BLITZ_ALIAS() [1/11]

BLITZ_ALIAS ( _gtarrowsize ,
gtarrowsize_c  )

◆ BLITZ_ALIAS() [2/11]

BLITZ_ALIAS ( _gtcludge ,
gtcludge_c  )

◆ BLITZ_ALIAS() [3/11]

BLITZ_ALIAS ( _gtgetint ,
gtgetint_c  )

◆ BLITZ_ALIAS() [4/11]

BLITZ_ALIAS ( _gtgetstatus ,
gtgetstatus_c  )

◆ BLITZ_ALIAS() [5/11]

BLITZ_ALIAS ( _gtgetstring ,
gtgetstring_c  )

◆ BLITZ_ALIAS() [6/11]

BLITZ_ALIAS ( _gtptr ,
gtptr_c  )

◆ BLITZ_ALIAS() [7/11]

BLITZ_ALIAS ( gtlib_dodisable ,
dodisable_c  )

◆ BLITZ_ALIAS() [8/11]

BLITZ_ALIAS ( gtlib_doenable ,
doenable_c  )

◆ BLITZ_ALIAS() [9/11]

BLITZ_ALIAS ( gtlib_doselect ,
doselect_c  )

◆ BLITZ_ALIAS() [10/11]

BLITZ_ALIAS ( gtlib_doselect2 ,
doselect2_c  )

◆ BLITZ_ALIAS() [11/11]

BLITZ_ALIAS ( gtlib_gttags ,
gttags_c  )

◆ create()

struct Gadget * create ( ULONG kind,
ULONG flags,
struct TagItem * tags,
int more )
static

◆ cycle()

void cycle ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ detachchk()

void detachchk ( void )

◆ detachchk_c()

void detachchk_c ( struct gtcontext * c)
static

◆ detachgtlist_c()

void detachgtlist_c ( struct gtcontext * c,
struct Library * intbase )
static

DetachGTList GTList#: remove the GTList's gadgets from its window.

RemoveGList of all gadgets; nothing if the GTList is not attached. Amiga mode only. Errors (debugger only): "GTList not attached to a window" (detachchk).

Parameters
ca1: the GTList (!libs {mygadtoolslib,$1180})
intbasea6: intuition.library

◆ dodisable_c()

void dodisable_c ( UWORD id,
struct Gadget * list )
static

GTDisable GTList#,Id: set GFLG_DISABLED of a gadget, as GTEnable.

Parameters
idd1: the gadget id
lista1: the GTList (!libs {mygadtoolslib,$1180})

◆ doenable_c()

void doenable_c ( UWORD id,
struct Gadget * list )
static

GTEnable GTList#,Id: clear GFLG_DISABLED of a gadget.

On the first gadget with the id whose GadgetType has bit 15 clear (findgadget); only the flag, no refresh; nothing if there is none.

Parameters
idd1: the gadget id
lista1: the GTList (!libs {mygadtoolslib,$1180}), its first long as the head of the gadget list

◆ doselect2_c()

void doselect2_c ( UWORD id,
struct Gadget * list )
static

GTToggle GTList#,Id: invert GFLG_SELECTED of a gadget, as GTEnable.

Parameters
idd1: the gadget id
lista1: the GTList (!libs {mygadtoolslib,$1180})

◆ doselect_c()

void doselect_c ( UWORD id,
UWORD on,
struct Gadget * list )
static

GTToggle GTList#,Id,On|Off: set or clear GFLG_SELECTED of a gadget, as GTEnable.

Parameters
idd1: the gadget id
ond2.w: <> 0 set, 0 clear
lista1: the GTList (!libs {mygadtoolslib,$1180})

◆ doshape()

void doshape ( UWORD id,
WORD x,
WORD y,
ULONG flags,
struct TextAttr ** font,
struct Screen ** scr )
static

◆ E() [1/33]

◆ E() [2/33]

◆ E() [3/33]

E ( _gtbevel ,
gtbevel_c  )

◆ E() [4/33]

E ( _gtbutton ,
gtbutton_c  )

◆ E() [5/33]

◆ E() [6/33]

◆ E() [7/33]

◆ E() [8/33]

E ( _gtcycle ,
gtcycle_c  )

◆ E() [9/33]

E ( _gtcycle2 ,
gtcycle2_c  )

◆ E() [10/33]

◆ E() [11/33]

◆ E() [12/33]

◆ E() [13/33]

◆ E() [14/33]

◆ E() [15/33]

◆ E() [16/33]

E ( _gtmx ,
gtmx_c  )

◆ E() [17/33]

E ( _gtmx2 ,
gtmx2_c  )

◆ E() [18/33]

E ( _gtnumber ,
gtnumber_c  )

◆ E() [19/33]

◆ E() [20/33]

◆ E() [21/33]

◆ E() [22/33]

◆ E() [23/33]

◆ E() [24/33]

◆ E() [25/33]

E ( _gtsetint ,
gtsetint_c  )

◆ E() [26/33]

◆ E() [27/33]

E ( _gtshape ,
gtshape_c  )

◆ E() [28/33]

E ( _gtshape2 ,
gtshape2_c  )

◆ E() [29/33]

E ( _gtslider ,
gtslider_c  )

◆ E() [30/33]

◆ E() [31/33]

E ( _gtstring ,
gtstring_c  )

◆ E() [32/33]

◆ E() [33/33]

E ( _gttext ,
gttext_c  )

◆ find()

struct Gadget * find ( struct Gadget * gad,
UWORD id )
static

◆ findgadget()

struct Gadget * findgadget ( struct Gadget * list,
UWORD id )
static

◆ freegadchk()

void freegadchk ( void )

◆ freegadchk_c()

void freegadchk_c ( struct gtcontext * c)
static

◆ getcontext()

void getcontext ( struct gtcontext * c)
static

◆ getoptions()

ULONG getoptions ( const ULONG ** sp,
struct gtblock ** blk )
static

◆ gtalloc()

struct gtblock * gtalloc ( ULONG size)
static

◆ gtarrowsize_c()

void gtarrowsize_c ( ULONG size)
static

GTArrowSize size: the arrow size of later GTScrollers with arrows (flag bit 11, GTSC_Arrows; initially 16).

Parameters
sized0: the size

◆ gtbevel_c()

void gtbevel_c ( LONG x,
LONG y,
LONG w,
LONG h,
ULONG flags,
struct gtcontext * c )
static

GTBevelBox GTList#,x,y,w,h,flags: draw a bevel box into the GTList's window.

DrawBevelBox with the GTList's VisualInfo in the RastPort of the window it is attached to (not checked). Amiga mode only. Flags <> 0 gives the tag GTBB_Recessed with value 0, flags = 0 ends the tag list there. Not a bug (#170): DrawBevelBoxA takes the tag's presence ("set to anything for a recessed-looking box"), not its value: the box is recessed (measured on Kickstart 3.1).

Parameters
x,y,w,hd1-d4: position and size
flagsd5: <> 0 "recessed"
ca0: the GTList (!libs {mygadtoolslib,$1080})

◆ gtbutton_c()

void gtbutton_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTButton GTList#,id,x,y,w,h,Text$,flags: add a BUTTON_KIND gadget.

Fills the NewGadget (handlestd: position plus the screen's border sizes and font height unless GTGimmeCludge is on, the label copied with allocst) and creates the gadget behind the last one of the GTList (the context is created on first use). Flag bits: 6 GA_Disabled, 7 GA_Immediate, 13 toggle (TOGGLESELECT); ng_Flags = flags & $3F. A GTTags list given before is appended with TAG_MORE (then cleared). Amiga mode only. Fixed (#171): the original set TOGGLESELECT with bit 13 even if CreateGadget failed (it wrote address 14). By design (#176), all creators: without a used screen the border sizes are read from address 0 (runtime error checking stops it: no currently used screen).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags (see STDARGS); the GTList in a3

◆ gtcheckbox_c()

void gtcheckbox_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTCheckBox GTList#,id,x,y,w,h,Text$,flags: add a CHECKBOX_KIND gadget.

As GTButton. Flag bits: 6 GA_Disabled, 8 GTCB_Checked, 9 GTCB_Scaled. Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags (see STDARGS); the GTList in a3

◆ gtchnglist1_c()

void gtchnglist1_c ( UWORD id,
struct gtcontext * c,
const ULONG * args )
static

GTChangeList GTList#,id,List(): give a listview new labels.

GTLV_Labels = the List header of the list array (its address - 28) on the LAST gadget of the run with the id, not a bug (#175); nothing without a context or gadget. Amiga mode only. Fixed (#328): a3 comes back unchanged (the original left the tag list in a3).

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
argsa2: the stack with the list array's address

◆ gtchnglist2_c()

void gtchnglist2_c ( UWORD id,
struct gtcontext * c )
static

GTChangeList GTList#,id: detach the listview's labels (GTLV_Labels = -1), as GTChangeList with a list.

Unlike the form with a list it does not test for a context first. Fixed (#328): a3 comes back unchanged (the original left the tag list in a3).

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})

◆ gtcludge_c()

void gtcludge_c ( UWORD on)
static

GTGimmeCludge On/Off: on = later gadgets are placed without the screen's border sizes and font height (cludge = 0).

Parameters
ond0.w: <> 0 on, 0 off

◆ gtcycle2_c()

void gtcycle2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTCycle GTList#,id,x,y,w,h,Text$,flags,Options$,active: GTCycle with the active entry (GTCY_Active, the word at a2-22).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Options$, active (see STDARGS)

◆ gtcycle_c()

void gtcycle_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTCycle GTList#,id,x,y,w,h,Text$,flags,Options$: add a CYCLE_KIND gadget.

As GTButton. Options$ ("a|b|c") becomes the GTCY_Labels array (getoptions: memlib globalloc, freed with the gadget or the GTList; fixed, #174: the original had room for 63 labels without a check and never freed it). Flag bit 6 GA_Disabled. Without active GTCY_Active is 0 (fixed, #169: the original kept the value of an earlier GTCycle with it). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Options$ (see STDARGS); the GTList in a3

◆ gtfreeblocks()

void gtfreeblocks ( struct gtcontext * c,
struct Gadget * gad )
static

◆ gtfreegadget_c()

ULONG gtfreegadget_c ( UWORD id,
struct gtcontext * c )
static

GTFreeGadget GTList#,id: unlink the run of gadgets with the id and free them.

The whole run from the first to the last gadget with the id (FreeGadgets), not a bug (#175); fixed (#174, #173): with the label blocks and GTShape images of the freed gadgets. If the run ends with the GTList's last gadget (current), the gadget in front of the run becomes the last one. Fixed (#962): the original left current on the freed gadget - the next creator linked into freed memory. Amiga mode only. Errors (debugger only): "GTList must be detached from window first!" (freegadchk).

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0.w: the number of gadgets freed, 0 if there is none with the id

◆ gtgetattrs_c()

ULONG gtgetattrs_c ( UWORD id,
ULONG tag,
struct gtcontext * c )
static

GTGetAttrs(GTList#,id,Tag): read one attribute of a gadget.

GT_GetGadgetAttrs of the tag into the library's value on the FIRST gadget with the id. Amiga mode only. Fixed (#328): a3 comes back unchanged (the original left gettag in a3: in a string expression the rest was written over gettag, value and what follows them).

Parameters
idd1: the gadget id
tagd2: the tag
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0: the value (the previous value if GadTools does not set it), 0 if there is no such gadget

◆ gtgetint_c()

ULONG gtgetint_c ( UWORD id,
struct gtcontext * c )
static

GTGetInteger(GTList#,id): the value of an integer gadget.

The StringInfo's LongInt of the FIRST gadget with the id. Amiga mode only.

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0: the value, 0 if there is no such gadget

◆ gtgetstatus_c()

ULONG gtgetstatus_c ( UWORD id,
struct gtcontext * c )
static

GTStatus(GTList#,Id): whether a gadget is selected.

GFLG_SELECTED of the FIRST gadget with the id, as 0/1 (not a Blitz truth value). Function of type byte.

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0: 1 selected, 0 not selected or no such gadget

◆ gtgetstring_c()

ULONG gtgetstring_c ( UWORD id,
struct gtcontext * c )
static

GTGetString(GTList#,id): the contents of a string gadget.

Copies the StringInfo buffer of the FIRST gadget with the id to the string buffer (a3, left behind the text). Amiga mode only.

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0: the length of the string, 0 if there is no such gadget

◆ gtinteger_c()

void gtinteger_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTInteger GTList#,id,x,y,w,h,Text$,flags,default: add an INTEGER_KIND gadget.

As GTButton, with GTIN_Number = default. Flag bits: 6 GA_Disabled, 7 GA_Immediate. Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, default (see STDARGS); the GTList in a3

◆ gtlib_dodisable()

void gtlib_dodisable ( void )

◆ gtlib_doenable()

void gtlib_doenable ( void )

◆ gtlib_doselect()

void gtlib_doselect ( void )

◆ gtlib_doselect2()

void gtlib_doselect2 ( void )

◆ gtlib_gttags()

void gtlib_gttags ( void )

◆ gtlib_sgchk()

void gtlib_sgchk ( void )

◆ gtlib_sgchk2()

void gtlib_sgchk2 ( void )

◆ gtlistview1_c()

void gtlistview1_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTListView GTList#,id,x,y,w,h,Text$,flags,list(),selected: GTListView with GTLV_Selected = GTLV_Top = selected (the word at a2-18).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, list(), selected (see STDARGS)

◆ gtlistview2_c()

void gtlistview2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTListView GTList#,id,x,y,w,h,Text$,flags,list(),selected,top: GTListView with GTLV_Selected (the word at a2-18) and GTLV_Top (a2-22).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, list(), selected, top (see STDARGS)

◆ gtlistview_c()

void gtlistview_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTListView GTList#,id,x,y,w,h,Text$,flags,list(): add a LISTVIEW_KIND gadget.

As GTButton. GTLV_Labels = the List header of the list array (its address - 28). Flag bits: 6 GA_Disabled, 12 GTLV_ReadOnly. Without selected/top GTLV_Selected is -1 and GTLV_Top 0 (fixed, #169: the original kept the values of an earlier GTListView with them). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, list() (see STDARGS); the GTList in a3

◆ gtmx2_c()

void gtmx2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTMX GTList#,id,x,y,w,h,Text$,flags,Options$,active: GTMX with the active entry (GTMX_Active, the word at a2-22).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Options$, active (see STDARGS)

◆ gtmx_c()

void gtmx_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTMX GTList#,id,x,y,w,h,Text$,flags,Options$: add an MX_KIND gadget.

As GTCycle (Options$ -> GTMX_Labels, fixed #174). Flag bits: 6 GA_Disabled, 9 GTMX_Scaled. Without active GTMX_Active is 0 (fixed, #169: the original kept an earlier value). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Options$ (see STDARGS); the GTList in a3

◆ gtnumber_c()

void gtnumber_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTNumber GTList#,id,x,y,w,h,Text$,flags,value: add a NUMBER_KIND gadget.

As GTButton, with GTNM_Number = value and GTNM_Border. No flag tags. Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, value (see STDARGS); the GTList in a3

◆ gtpalette2_c()

void gtpalette2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTPalette GTList#,id,x,y,w,h,Text$,flags,depth,Color: GTPalette with a colour (the word at a2-18).

Fixed (#168): the colour goes to GTPA_Color's value; the original wrote it to +38 of the tag list, the low word of the TAG_MORE pointer (the usertags address; the source layout had two more tags): the colour was ignored, a GTTags list after it was reached through a wrong pointer.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, depth, Color (see STDARGS)

◆ gtpalette_c()

void gtpalette_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTPalette GTList#,id,x,y,w,h,Text$,flags,depth: add a PALETTE_KIND gadget.

As GTButton, with GTPA_Depth = depth and GTPA_Color 0 (fixed, #168: not the colour of an earlier GTPalette with it). Flag bit 6 GA_Disabled. Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, depth (see STDARGS); the GTList in a3

◆ gtptr_c()

ULONG gtptr_c ( UWORD id,
struct gtcontext * c )
static

GTGadPtr(GTList#,id): the address of the gadget with the id.

The FIRST gadget with the id (the search starts at the context gadget, id -1), not a bug (#175). Amiga mode only.

Parameters
idd1: the gadget id
ca1: the GTList (!libs {mygadtoolslib,$1180})
Returns
d0: the gadget, 0 if there is none

◆ gtrelease()

void gtrelease ( struct gtcontext * c,
struct Gadget * gad )
static

◆ gtscroller2_c()

void gtscroller2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTScroller GTList#,id,x,y,w,h,Text$,flags,Visible,Total,Top: GTScroller with GTSC_Top (the word at a2-18).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Visible, Total, Top (see STDARGS)

◆ gtscroller_c()

void gtscroller_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTScroller GTList#,id,x,y,w,h,Text$,flags,Visible,Total: add a SCROLLER_KIND gadget.

As GTButton, with GTSC_Visible and GTSC_Total (words), GA_RelVerify. Flag bits: 6 GA_Disabled, 7 GA_Immediate, 10 vertical (PGA_Freedom 2, else 1), 11 arrows (GTSC_Arrows = GTArrowSize's size, else 0). Without Top GTSC_Top is 0 (fixed, #169: the original kept an earlier value). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Visible, Total (see STDARGS); the GTList in a3

◆ gtsetattrs_c()

ULONG gtsetattrs_c ( UWORD id,
UWORD pairs,
struct gtcontext * c,
const ULONG * args )
static

GTSetAttrs GTList#,id[,Tag,Value...]: set tags of a gadget (also a function).

GT_SetGadgetAttrs with the pairs (put into usertags) on the LAST gadget of the run with the id, not a bug (#175); nothing without a context or gadget. DIFF: a2 is not moved. Amiga mode only. Fixed (#328): a3 comes back unchanged, also as a function (the original left usertags in a3).

Parameters
idd1: the gadget id
pairsd7: the number of pairs
ca1: the GTList (!libs {mygadtoolslib,$1180})
argsa2: the stack of the pairs
Returns
d0: 0 (the original returns what d0 holds)

◆ gtsethighlight_c()

void gtsethighlight_c ( UWORD id,
ULONG v,
struct gtcontext * c )
static

GTSetHighlight GTList#,id,value: select a listview entry and make it visible.

GTLV_Selected and GTLV_MakeVisible = value on the LAST gadget of the run with the id, not a bug (#175); nothing without a context or gadget. Amiga mode only. Fixed (#328): a3 comes back unchanged (the original left the tag list in a3).

Parameters
idd1: the gadget id
vd2: the entry
ca1: the GTList (!libs {mygadtoolslib,$1180})

◆ gtsetint_c()

void gtsetint_c ( UWORD id,
ULONG v,
struct gtcontext * c )
static

GTSetInteger GTList#,id,value: set the value of an integer or number gadget.

GTIN_Number for an INTEGER_KIND gadget (GadgetType $104), else GTNM_Number, as GTSetString. Amiga mode only. Fixed (#328): a3 comes back unchanged (the original left the tag list in a3).

Parameters
idd1: the gadget id
vd2: the value
ca1: the GTList (!libs {mygadtoolslib,$1180})

◆ gtsetstring_c()

void gtsetstring_c ( UWORD id,
ULONG str,
struct gtcontext * c )
static

GTSetString GTList#,id,string$: set the text of a string or text gadget.

GTST_String for a STRING_KIND gadget (GadgetType $104), else GTTX_Text, on the FIRST gadget with the id (the search starts at the context gadget); nothing if there is none. Amiga mode only. Fixed (#328): a3 comes back unchanged (the original left the tag list in a3).

Parameters
idd1: the gadget id
strd2: the string
ca1: the GTList (!libs {mygadtoolslib,$1180})

◆ gtshape2_c()

void gtshape2_c ( UWORD id,
WORD x,
WORD y,
ULONG flags,
struct TextAttr ** font,
struct Screen ** scr,
const struct bb_shape * shape2,
const struct bb_shape * shape )
static

GTShape GTList#,id,x,y,flags,Shape#,Shape#: GTShape with a second shape as the selected image (Image 2, GFLG_GADGHIMAGE).

Errors (debugger only): "Uninitialized Shape" (sgchk2).

Parameters
id,x,yd1-d3: gadget id and position
flagsd4: the flags
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
shape2a2: the second shape (!libs {shapeslib,$1286})
shapea6: the shape (!libs {shapeslib,$1685}); the GTList in a3

◆ gtshape_c()

void gtshape_c ( UWORD id,
WORD x,
WORD y,
ULONG flags,
struct TextAttr ** font,
struct Screen ** scr,
const struct bb_shape * shape )
static

GTShape GTList#,id,x,y,flags,Shape#: add a BUTTON_KIND gadget that shows a shape.

The shape's width, height, depth and data become the static Image 1 (GFLG_GADGIMAGE); the gadget gets the shape's size, GACT_RELVERIFY and the boolean gadget type, GadgetRender = a copy of Image 1, SelectRender = a copy of Image 2. Flag bits: 6 GA_Disabled, 7 GA_Immediate. Amiga mode only. Errors (debugger only): "Uninitialized Shape" (sgchk). The gadget has no label. Fixed (#172): the original left the label of the previous gadget in the NewGadget. Fixed (#173): the gadget gets copies of Image 1/2 of its own (the original overwrote GadTools' GadgetRender with Image 1 and shared the static Image 2). Fixed (#327): if CreateGadget fails, nothing is written (the original wrote to addresses 12-25).

Parameters
id,x,yd1-d3: gadget id and position
flagsd4: the flags
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
shapea6: the shape (!libs {shapeslib,$1685}); the GTList in a3

◆ gtslider2_c()

void gtslider2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTSlider GTList#,id,x,y,w,h,Text$,flags,Min,Max,Level: GTSlider with GTSL_Level (the word at a2-18).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Min, Max, Level (see STDARGS)

◆ gtslider_c()

void gtslider_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTSlider GTList#,id,x,y,w,h,Text$,flags,Min,Max: add a SLIDER_KIND gadget.

As GTButton, with GTSL_Min and GTSL_Max (words), GA_RelVerify. Flag bits: 6 GA_Disabled, 7 GA_Immediate (the tag list's initial value is 1), 10 vertical (PGA_Freedom 2, else 1). Without Level GTSL_Level is 0 (fixed, #169: the original kept an earlier value). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Min, Max (see STDARGS); the GTList in a3

◆ gtstring2_c()

void gtstring2_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTString GTList#,id,x,y,w,h,Text$,flags,MaxChars,default$: GTString with GTST_String = default$ (the long at a2-22).

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, MaxChars, default$ (see STDARGS)

◆ gtstring_c()

void gtstring_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTString GTList#,id,x,y,w,h,Text$,flags,MaxChars: add a STRING_KIND gadget.

As GTButton, with GTST_MaxChars (word). Flag bits: 6 GA_Disabled, 7 GA_Immediate. Without default$ GTST_String is NULL (fixed, #169: the original kept the pointer of an earlier GTString with it, into the old string work area). Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, MaxChars (see STDARGS); the GTList in a3

◆ gttags()

const ULONG * gttags ( UWORD pairs,
const ULONG * sp )
static

◆ gttags_c()

void gttags_c ( UWORD pairs,
const ULONG * args )
static

GTTags Tag,Value[,Tag,Value...]: extra tags for the next gadget.

The pairs go to usertags (at most 15 without a check), which the next creator appends with TAG_MORE and then clears. DIFF: a2 is not moved (the original pops the pairs). Amiga mode only.

Parameters
pairsd7: the number of pairs
argsa2: the stack of the pairs

◆ gttext_c()

void gttext_c ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

GTText GTList#,id,x,y,w,h,Text$,flags,Display$: add a TEXT_KIND gadget.

As GTButton; Display$ is copied with allocst (GTTX_Text), with GTTX_Border. No flag tags. Amiga mode only.

Parameters
id,x,y,w,hd1-d5: gadget id, position and size
fonta0: the current IntuiFont (intuifontlib's textattr)
scra1: the used screen (screenslib)
argsa2: Text$, flags, Display$ (see STDARGS); the GTList in a3

◆ handlestd()

const ULONG * handlestd ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args,
int shape )
static

◆ lastof()

struct Gadget * lastof ( struct Gadget * gad,
UWORD id )
static

◆ listview()

void listview ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ mx()

void mx ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ palette()

void palette ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ posthandler_c()

ULONG posthandler_c ( struct IntuiMessage * m)
static

◆ prehandler_c()

ULONG prehandler_c ( struct IntuiMessage * m)
static

◆ scroller()

void scroller ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ setattrs()

ULONG setattrs ( struct gtcontext * c,
UWORD id,
struct TagItem * tags,
int last )
static

◆ setone()

void setone ( struct gtcontext * c,
UWORD id,
ULONG v,
ULONG tstr,
ULONG tother )
static

◆ sgchk2_c()

void sgchk2_c ( const struct bb_shape * shape2,
const struct bb_shape * shape )
static

◆ sgchk_c()

void sgchk_c ( const struct bb_shape * shape)
static

◆ shape1()

void shape1 ( const struct bb_shape * shape)
static

◆ slider()

void slider ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

◆ string()

void string ( UWORD id,
WORD x,
WORD y,
WORD w,
WORD h,
struct TextAttr ** font,
struct Screen ** scr,
const ULONG * args )
static

Variable Documentation

◆ arrowsize

ULONG arrowsize = 16
static

◆ [struct]

struct { ... } beveltags

◆ [struct]

struct { ... } boxtags

◆ [struct]

struct { ... } buttags

◆ cludge

WORD cludge = -1
static

◆ [struct]

struct { ... } cycletags

◆ end

struct TagItem selected makevisible end

◆ [struct]

struct { ... } gatchtags

◆ [struct]

struct { ... } gettag

◆ gflags

UWORD gflags
static

◆ gtbase

struct Library* gtbase
static

◆ gtblocks

struct gtblock* gtblocks
static

◆ [struct]

struct { ... } hightags

◆ image1

struct Image image1 = { 0, 0, 0, 0, 0, NULL, 3, 0, NULL }
static

◆ image2

struct Image image2 = { 0, 0, 0, 0, 0, NULL, 3, 0, NULL }
static

◆ [struct]

struct { ... } inttags

◆ labels

struct TagItem labels

◆ [struct]

struct { ... } listtags
Initial value:
= { { T_DISABLED, 0 }, { GTLV_Labels, 0 }, { GTLV_Top, 0 },
{ GTLV_Selected, (ULONG)-1 }, { GTLV_ReadOnly, 0 }, UNDERSC, MORE }
#define UNDERSC
Definition gtlib.c:463
#define T_DISABLED
Definition gtlib.c:121
#define MORE
Definition gtlib.c:462

◆ more

struct TagItem disabled immediate underscore more

◆ [struct]

struct { ... } mxtags
Initial value:
= { { T_DISABLED, 0 }, { GTMX_Labels, 0 }, { GTMX_Scaled, 0 }, { GTMX_Active, 0 },

◆ nulltags

struct TagItem nulltags[2]
static

◆ [struct]

struct { ... } numbertags

◆ [struct]

struct { ... } onetag

◆ [struct]

struct { ... } palettetags

◆ recessed

struct TagItem vinfo recessed

◆ [struct]

struct { ... } scrollertags
Initial value:
= { { T_DISABLED, 0 }, { T_IMMEDIATE, 0 }, { T_FREEDOM, 0 },
{ GTSC_Visible, 0 }, { GTSC_Total, 0 }, { GTSC_Arrows, 16 },
{ GTSC_Top, 0 }, UNDERSC, { T_RELVERIFY, (ULONG)-1 }, MORE }
#define T_IMMEDIATE
Definition gtlib.c:122
#define T_FREEDOM
Definition gtlib.c:124
#define T_RELVERIFY
Definition gtlib.c:123

◆ [struct]

struct { ... } shapetags

◆ [struct]

struct { ... } slidertags
Initial value:
= { { T_DISABLED, 0 }, { T_IMMEDIATE, 1 }, { T_FREEDOM, 0 }, { GTSL_Min, 0 },
{ GTSL_Max, 0 }, { GTSL_Level, 0 }, UNDERSC, { T_RELVERIFY, (ULONG)-1 },
MORE }

◆ STDLIBS

STDLIBS

◆ [struct]

struct { ... } stringtags
Initial value:
= { { T_DISABLED, 0 }, { T_IMMEDIATE, 0 }, { GTST_MaxChars, 0 },
{ GTST_String, 0 }, UNDERSC, MORE }

◆ tag

struct TagItem tag

◆ [struct]

struct { ... } texttags

◆ ufont

struct TextAttr* ufont
static

◆ uscreen

struct Screen* uscreen
static

◆ usertags

struct TagItem usertags[16]
static

◆ value

ULONG value
static

◆ wrkgadget

struct NewGadget wrkgadget
static