PoIcFilter 1.9 KB
Newer Older
Kevin Bracey's avatar
Kevin Bracey committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
; Copyright 1997 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; > s.PoIcFilter

;;----------------------------------------------------------------
;; post_icon_filter_handler
;;
;; This is called by the Wimp on entry to int_get_rectangle, after
;; it has drawn the icons for the previous rectangle.
;;
;; Entry:
;;
;;      R2    - Task handle of calling task.
;;      R6-R9 - screen coordinates of rectangle (x0,y0,x1,y1)
;;      R10   - window handle - 1
;;
;; Exit:
;;
;;      All other registers preserved.
;;
;;      All interested filters called.
;;
;;

post_icon_filter_handler

        Push    "r0-r2,LR"

        MOV     R2,R2,ASL #16
        MOV     R2,R2,LSR #16

44
        Rel     r0,r10                   ; find the window being redrawn
Kevin Bracey's avatar
Kevin Bracey committed
45 46 47 48

        LDR     r1,post_icon_filters
post_icon_filter_exit
        CMP     r1,#0
49
      [ No26bitCode
Stewart Brodie's avatar
Stewart Brodie committed
50
        Pull    "r0-r2,PC",EQ            ; End of list.
51 52 53
      |
        Pull    "r0-r2,PC",EQ,^          ; End of list.
      ]
Kevin Bracey's avatar
Kevin Bracey committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
        LDR     r14,[r1,#next_ptr]
        Push    "r14"

        LDR     r14,[r1,#f_task]
        TEQ     r14,R2
        CMPNE   r14,#0
        Pull    "r1",NE
        BNE     post_icon_filter_exit        ; Filter not interested.

        LDR     r12,[r1,#f_R12]        ; Set R12.

        MOV     LR,PC
        LDR     PC, [r1,#f_address]
        NOP
        Pull    "r1"
        B       post_icon_filter_exit


Robert Sprowson's avatar
Robert Sprowson committed
72
        LNK     CopyFilter.s
Kevin Bracey's avatar
Kevin Bracey committed
73 74