GetREIAttrsA
Synopsis
numProcessed = GetREIAttrsA(rei, name, taglist)
D0 A0 A1 A2C Prototype
ULONG *GetREIAttrsA(struct REI *, STRPTR, struct TagItem *);
/* Varargs stub */
ULONG *GetREIAttrs(struct REI *, STRPTR, Tag, ...);Description
Retrieves information about the elements that make up a REI, according to the attributes specified in the tag list. For each item in the tag list, ti_Tag represents the attribute and ti_Data is a pointer to a longword where the attribute value will be stored.
GetREIAttrsA() recognizes all attributes that can also be passed to OpenREIA(). For a safe review of the software and for future modifications, see the file assembly/asmintuition.h to check which attributes are recognized.
Inputs
- rei — Pointer to a REI structure, previously loaded from disk by
OpenInterface(). Can be NULL, in which case thenameparameter will be used to search for the REI in the system list. - name — Pointer to a null-terminated string containing the name of the REI to query. This parameter is only considered when
reiis NULL. - taglist — Pointer to a TagItem list.
Tags
See OpenREIA for the tag list, and the file assembly/asmintuition.h for the parameters that can be used with this command.
Result
- numProcessed — Number of attributes successfully filled.
Warning
The pointer used to store the requested attribute in ti_Data MUST point to a LONGWORD. This applies regardless of the bit size of the requested data.
See Also
assembly/asmintuition.h
Implementation
The original 68020 assembly implementation:
; (17-Mar-1995) --- num = GetREIAttrsA(rei,name,TagList) (a0/a1/a2)
GetREITable
dc.l GET_ESR * Offset...
dc.l GETScreen,GETWindowTAG,GETScreenTAG,GETWindowTextAttr
dc.l SKIPGET,SKIPGET,GETNewMenu,GETNewMenuTAG
dc.l GETUserData,GETLayoutCallBack,GETCustomHook
dc.l GETRememberPos,GETRememberSize,GETCenterHScreen,GETCenterVScreen
dc.l GETCenterMouse,GETNoFontSensitive,GETWindowTitle,GETWindow
dc.l GETFirstAsmGadget,GETLastAsmGadget
dc.l SKIPGET,SKIPGET,SKIPGET,SKIPGET,SKIPGET,SKIPGET,SKIPGET,SKIPGET
dc.l SKIPGET,SKIPGET,SKIPGET,SKIPGET
dc.l GETDoubleClick
_LVOGetREIAttrsA
movem.l d2-d6/a2-a6,-(sp)
moveq #0,d2
move.l a6,a5 * Save AsmBase
move.l a0,d0 * Was a REI provided??
bne.s GET_FND * Ok, then don't search for it by name...
move.l a1,d0 * if a NULL name was provided
beq.s GET_ESR * exit...
move.l ab_ExecBase(a5),a0
move.l ([ThisTask.w,a0],TC_Userdata.w),a0 * struct MinList *
move.l a0,d0
beq.s GET_ESR
FINDNAME
move.l d0,a4 * (struct REI *) in A4
move.l a4,d0 * Check...
bne.s GET_FND * Ok, name and node found... continue...
GET_ESR move.l d2,d0
movem.l (sp)+,d2-d6/a2-a6 * Nothing, just exit
rts
;--------------------------------------------------------------------------------------
GET_FND move.l d0,a4 * THIS REI ALWAYS IN A4
move.l a2,a0 * TagItem in A1...
move.l a0,d0 * Is there a TagItem list??
beq.s GET_ESR * If no TagList, exit quickly, thanks.
;--------------------------------------------------------------------------------------
GETTAG USETAGLIST.l GetREITable(pc),GETATAG,GET_ESR
;--------------------------------------------------------------------------------------
GETScreen
move.l rei_Screen(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra.s GETATAG
;--------------------------------------------------------------------------------------
SKIPGET addq.w #4,a0
bra.s GETATAG
;--------------------------------------------------------------------------------------
GETWindowTAG
move.l rei_NewWindowTAG(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETScreenTAG
move.l rei_ScreenTAG(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETWindowTextAttr
move.l rei_GadgetTextAttr(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETNewMenu
move.l rei_NewMenu(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETNewMenuTAG
move.l rei_NewMenuTAG(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETUserData
move.l rei_UserData(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETLayoutCallBack
move.l rei_LayoutCallBack(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETCustomHook
move.l rei_CustomHook(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETRememberPos
move.l rei_Flags(a4),d0
andi.l #REIB_REMEMBERPOS,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETRememberSize
move.l rei_Flags(a4),d0
andi.l #REIB_REMEMBERSIZE,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETCenterHScreen
move.l rei_Flags(a4),d0
andi.l #REIB_CENTERHSCREEN,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETCenterVScreen
move.l rei_Flags(a4),d0
andi.l #REIB_CENTERVSCREEN,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETCenterMouse
move.l rei_Flags(a4),d0
andi.l #REIB_CENTERMOUSE,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETNoFontSensitive
move.l rei_Flags(a4),d0
andi.l #REIB_NOFONTSENSITIVE,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETWindowTitle
move.l rei_NewWindow+nw_Title(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETWindow
move.l rei_Window(a4),([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETFirstAsmGadget
move.l rei_HEADAsmGadget(a4),d1
move.l LN_SUCC(a0),d0
bne.s FHEAD
moveq #0,d1
FHEAD move.l d1,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETLastAsmGadget
move.l rei_TAILAsmGadget(a4),d1
move.l LN_PRED(a0),d0
bne.s FTAIL
moveq #0,d1
FTAIL move.l d1,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG
;--------------------------------------------------------------------------------------
GETDoubleClick
move.l rei_Flags(a4),d0
andi.l #REIB_DOUBLECLICK,d0
move.l d0,([a0])
addq.w #1,d2
addq.w #4,a0
bra GETATAG