Commit fd810078 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Folded in changes from separate version 0.18 on the Ursula branch,...

Folded in changes from separate version 0.18 on the Ursula branch, re-inserting the standalone build capability and the bug-fix for de-registering PostIcon filters.
parent e2bf85fb
PreFT:Filters called on entry to Wimp_Poll:
PostFT:Filters called on exit from Wimp_Poll:
RectFT:Filters called on entry to Wimp_GetRectangle:
CopyFT:Filters called on entry to Wimp_BlockCopy:
PostRectFT:Filters called on exit from Wimp_GetRectangle:
PostIconFT:Filters called after plotting icons in Wimp_GetRectangle:
RectFT:Filters called at the start of a rectangle redraw:
CopyFT:Filters called just before a rectangle copy:
PostRectFT:Filters called after any work area fill in a rectangle redraw:
PostIconFT:Filters called after any icons are plotted in a rectangle redraw:
Filter:Filter
Task:Task
Mask:Mask
......
......@@ -6,7 +6,7 @@
GBLS Date
Version SETA 018 ; 001
VString SETS "0.18" ; "0.01"
Date SETS "01 Jan 1998" ; "16 Nov 1990"
VString SETS "0.19" ; "0.01"
Date SETS "05 Mar 1998" ; "16 Nov 1990"
END
......@@ -117,8 +117,9 @@ filter_text # 4
task_text # 4
mask_text # 4
all_text # 4
fake_postrect # 4 ; do we want to fake the post-rectangle
; filter?
fake_postrect # 4 ; do we want to fake the post-rectangle filter? (Wimp < 3.86)
get_handle_from_r10 # 4 ; do we get the window handle from r10 or the stack
; for get-rectangle filters? (from r10 for Wimp > 3.99)
f_messagesopen * (1:SHL:0)
......
......@@ -59,13 +59,14 @@ all_token DCB "All",0
ALIGN
min_gap * 3
min_tab1 * 16
min_tab2 * 16
min_tab1 * 20
min_tab2 * 24
min_tab3 * 8
; ---------------------------------------------------------------------------------------------------------------------
; Handle *Filters - List all attached filters with the tasks they are attached to.
Filters_Code
Push "LR"
Push "r7-r8,LR"
Debug xx,"*Filters called listing pre_filters"
LDR wsptr,[R12]
......@@ -77,7 +78,7 @@ Filters_Code
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
Pull "PC",VS
Pull "r7-r8,PC",VS
MOV r4, #0 ; r4 = how much space we are using on the stack to hold column headings.
......@@ -101,6 +102,9 @@ Filters_Code
BL lookuptostack
BVS %FT05
STR sp, mask_text
ADD r7, r3, #min_gap ; r7 = width of column 3
CMP r7, #min_tab3
MOVCC r7, #min_tab3
ADR r1, all_token
BL lookuptostack
......@@ -111,10 +115,18 @@ Filters_Code
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
SWI XOS_Write0
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -130,7 +142,8 @@ Filters_Code
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
BLVC Write32
MOVVC r1, r6
BLVC writefield
SWIVC XOS_NewLine
BVS %FT05
......@@ -154,15 +167,26 @@ Filters_Code
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
BVS %FT05
LDR r0, mask_text
SWI XOS_Write0
MOV r1, r7
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
BVS %FT05
LDR r0, mask_text
MOV r1, r7
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -211,11 +235,18 @@ Filters_Code
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -258,11 +289,18 @@ Filters_Code
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -306,11 +344,18 @@ Filters_Code
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -354,6 +399,10 @@ Filters_Code
MOV r1, r5
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
SWIVC XOS_NewLine
BVS %FT05
......@@ -372,7 +421,7 @@ Filters_Code
BNE %BT12
05
ADD sp, sp, r4
Pull "PC"
Pull "r7-r8,PC"
lookuptostack
; In: r1->token
......@@ -381,10 +430,10 @@ lookuptostack
; r3=length of text found
; r4=new size of data on stack
; sp->text
MOV r7, lr ; Don't use stack in here (BLs are OK though)
MOV r8, lr ; Don't use stack in here (BLs are OK though)
MOV r2, #0
BL MsgTrans_Lookup
MOVVS pc, r7
MOVVS pc, r8
ADD r1, r3, #4 ; Word align length (allow for terminator).
BIC r1, r1, #3
......@@ -399,9 +448,10 @@ lookuptostack
BCS %BT06
MOV r0, #0
STRB r0, [r1]
MOV pc, r7
MOV pc, r8
writefield
; Write control-terminated string, padded with spaces to field width
; In: r0 = text to print
; r1 = field width
; Out: r0,r2 corrupted
......@@ -413,6 +463,46 @@ writefield
SUB r0, r1, r0
07
SWI XOS_WriteI+" "
Pull "pc",VS
SUBS r0, r0, #1
BGE %BT07
Pull "pc",,^
Write32
; Output a control character terminated string to fit in a given field width
; In: R0 -> Ctrl-terminated string
; R1 = field width
Push "R1,R2,LR"
;
SUB R1,R1,#min_gap
MOV R2,R0
01 LDRB R0,[R2],#1
CMP R0,#32
SUBHSS R1,R1,#1
MOVLO R0,R2
Pull "R1,R2,PC",LO
SWI XOS_WriteC
BVC %BT01
Pull "R1,R2,PC"
writefield_dashed
; Write dashes for the length of the given control-terminated string, and pad with spaces to field width
; In: r0 = text string
; r1 = field width
; Out: r0,r2 corrupted
Push "lr"
MOV r2, r0
01
LDRB lr, [r0], #1
CMP lr, #32
SWIHS XOS_WriteI+"-"
Pull "pc",VS
BHS %BT01
SUB r0, r0, r2
SUB r0, r1, r0
07
SWI XOS_WriteI+" "
Pull "pc",VS
SUBS r0, r0, #1
BGE %BT07
Pull "pc",,^
......@@ -426,7 +516,7 @@ Filtercommand
; ----------------------------------------------------------------------------------------------------------------------
[ International_Help=0
Filters_Help
DCB "*Filters displays all pre and post Wimp_Poll filters currently active."
DCB "*Filters displays all Wimp filters currently active."
DCB 0
Filters_Syntax
DCB "Syntax: *Filters",0
......@@ -470,9 +560,14 @@ Init
SWI Wimp_ReadSysInfo
SUB r0, r0, #256
CMP r0, #386-256
MOVLT r0, #1
MOVGE r0, #0
STR r0, fake_postrect
MOVLT r1, #1
MOVGE r1, #0
STR r1, fake_postrect
; If we're on a Wimp earlier than 3.99, then we cannot rely on getting handles from r10
CMP r0, #399-256
MOVLT r1, #0
MOVGE r1, #1
STR r1, get_handle_from_r10
[ standalone
BL declareresourcefsfiles
......@@ -785,19 +880,5 @@ Die
Pull "R0-R11,PC",,^ ; don't refuse to die
; ----------------------------------------------------------------------------------------------------------------------
; Write32 - output a control character terminated string
;
; In: R0->Ctrl-terminated string
Write32
Push "R1,LR"
;
MOV R1,R0
01 LDRB R0,[R1],#1
CMPS R0,#32
MOVLO R0,R1
Pull "R1,PC",LO
SWI XOS_WriteC
BVC %BT01
Pull "R1,PC"
LNK s.SWIs
......@@ -109,6 +109,7 @@ MsgTrans_Lookup
message_file_name2
DCB "FilterManager:Messages",0
ALIGN
message_file_name
DCB "Resources:$.Resources.FilterMgr.Messages",0
......
......@@ -44,9 +44,12 @@ rect_filter_handler
TEQNE LR, #0 ; Window Manager's stack
BLNE sortout_fakepostrect
LDR r0,[sp,#16+12+0] ; find the window being redrawn
ADD r0,r0,#1 ; turn pointer into window handle
; BTW - you didn't see that...
LDR r0, get_handle_from_r10 ; find the window being redrawn
TEQ r0, #0
LDREQ r0, [sp,#16+12+0] ; BTW - you didn't see that...
ADDEQ r0, r0, #1
ADDNE r0, r10, #1 ; turn pointer into window handle
LDR r1,rect_filters
rect_filter_exit
CMP r1,#0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment