FilterMgr 4.72 KB
Newer Older
Neil Turton's avatar
Neil Turton 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
; Copyright 1996 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.Front

;;-----------------------------------------------------------------------------
;;
;; Change list
;;            0.01   16-Nov-1990  Started.
;;            0.02   23-May-1991  Added task=0 for all tasks.
;;            0.03   29-May-1991  Fixed bug, find_filter didn't return errors
;;            0.07   16-Apr-1992  Respond to Service_WimpRegisterFilters, fixes RP-1637.
;;                                * Deregistration ensures that only the low 16 bits of the task handle
;;                                 match since only these are saved in the filter block.  Fixes RP-2404
;;                                * Delay registering with wimp until first filter registered.  This
;;                                  avoids unnecessary degradation in WimpPoll performance
;;            0.08   22-Apr-1992  Broadcasts two new service calls, one when installed, one when removed.
;;
;;-----------------------------------------------------------------------------
;; Wish list
;;-----------------------------------------------------------------------------

Module_BaseAddr

        GET     Hdr:ListOpts
        GET     Hdr:Macros
        GET     Hdr:System
        GET     Hdr:ModHand
        GET     Hdr:Services
        GET     Hdr:VduExt
        GET     Hdr:FSNumbers
        GET     Hdr:NewErrors
        GET     Hdr:Variables
        GET     Hdr:Proc
        GET     Hdr:Sprite
        GET     Hdr:Wimp
        GET     Hdr:WimpSpace
        GET     Hdr:Messages
        GET     Hdr:FilerAct
        GET     Hdr:MsgTrans
        GET     Hdr:MsgMenus
        GET     Hdr:ResourceFS
        GET     Hdr:ColourTran
        GET     Hdr:Hourglass
        GET     Hdr:NdrDebug
        GET     Hdr:Switcher

59
        GET     VersionASM
Neil Turton's avatar
Neil Turton committed
60 61 62 63

        GBLL    hostvdu
        GBLL    debugxx
        GBLL    debugregister
Kevin Bracey's avatar
Kevin Bracey committed
64
	GBLL	standalone
Neil Turton's avatar
Neil Turton committed
65 66 67 68 69 70 71


debug           SETL false              ; ONLY FALSE IF NO DEBUGGING
hostvdu         SETL true               ; True to send debug to tube

debugxx         SETL false              ; General debugging.
debugregister   SETL false              ; Register/de-register
72
standalone	SETL false		; Build-in Messages file and i/f to ResourceFS
Neil Turton's avatar
Neil Turton committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107

wsptr           RN      R12

; ----------------------------------------------------------------------------------------------------------------------
        MACRO
$label  ALIGNHASH  $o,$m
      [ ((@-$o):AND:($m-1))<>0
$label  #          $m-((@-$o):AND:($m-1))
      |
$label  #          0
      ]
        MEND
; ----------------------------------------------------------------------------------------------------------------------
;      Filter block structure
                ^       0
next_ptr        #       4       ;       Pointer to next in chain                (-1 if none)
prev_ptr        #       4       ;       Pointer to previous entry in chain      (-1 if none)
f_task          #       4       ;       Task ID for which the filter is to be called.
f_mask          #       4       ;       Event mask.
f_address       #       4       ;       Address to call.
f_R12           #       4       ;       Value in R12 when calling.
f_name          #       4       ;       Pointer to filter name.
f_block_size      *      (@-next_ptr)

        ASSERT  next_ptr=0
; ----------------------------------------------------------------------------------------------------------------------
;       Workspace layout

workspace       RN      R12
                ^       0,workspace
wsorigin        #       0

callbackpending #       4               ; non-zero if callback is pending
pre_filters     #       4
post_filters    #       4
Kevin Bracey's avatar
Kevin Bracey committed
108 109 110 111
rect_filters    #       4
copy_filters	#	4
post_rect_filters #	4
post_icon_filters #	4
Neil Turton's avatar
Neil Turton committed
112 113 114 115 116 117 118
convert_buffer  #       20
message_block   #       16
flags           #       4
filter_text     #       4
task_text       #       4
mask_text       #       4
all_text        #       4
119 120 121
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)
Neil Turton's avatar
Neil Turton committed
122 123 124 125 126 127 128 129

f_messagesopen  *       (1:SHL:0)

max_running_work   *       (@-wsorigin)


        LNK     s.ModHead