Filter manager SWIs

Filter_RegisterPreFilter (SWI &42640)


Add a new pre filter to the list of pre filters.

Entry:

        R0 - Pointer to 0 terminated filter name. 
        R1 - Addresss of filter.
        R2 - Value to be passed in R12.
        R3 - Task handle of task to which filter is applied.
             or 0 for all tasks.

Exit:

        Registers preserved.
        The address pointed to by R1 will be called whenever the task who's
handle is passed in R3 calls Wimp_Poll with R12 equal to the value of R2 when this SWI is called.
        The routine pointed to by R1 will be called with:
        R0 =  Event mask as passed to Wimp_Poll
        R1 -> Event block as passed to Wimp_Poll
        R2 = Task handle of task that called Wimp_Poll.  
        On Exit:
        It may clear bits in r0 to provide a new event mask.
        It must preserve all other registers.

Filter_RegisterPostFilter (SWI &42641)


Add a new post filter to the list of post filters.

Entry:

        R0 - Pointer to 0 terminated filter name. 
        R1 - Addresss of filter.
        R2 - Value to be passed in R12.
        R3 - Task handle of task to which filter is applied.
             or 0 for all tasks.
        R4 - Event mask ( 1 bit masks the event out as for Wimp_Poll).

Exit:

        Registers preserved.
        The address pointed to by R1 will be called whenever the Wimp is
about to return to the task who's handle is passed in R3 from Wimp_Poll with R12 equal to the value of R2 when this SWI is called.
        On entry to the routine pointed to by R1:
        R0 - Event reason code (as from Wimp Poll)
        R1 -> User's event buffer.
        R2 = Task handle for task to which the return is made.
        Task paged in.
        On Exit:
        The routine may modify the reason code in r0 and the contents of the 
        buffer pointed to by R1 to provide a new event.
        It must preserve R1 and R2.

Filter_DeRegisterPreFilter (SWI &42642)


Remove a pre filter from the list of pre filters.

Entry:

        R0 - Pointer to 0 terminated filter name. 
        R1 - Addresss of filter.
        R2 - Value to be passed in R12.
        R3 - Task handle of task to which filter was applied.
        All must be the same as those passed to RegisterPreFilter
Exit:
        Registers preserved.
        Filter de-registered.

Filter_DeRegisterPostFilter (SWI &42642)


Remove a pre filter from the list of pre filters.

Entry:

        R0 - Pointer to 0 terminated filter name. 
        R1 - Addresss of filter.
        R2 - Value to be passed in R12.
        R3 - Task handle of task to which filter was applied.
        All must be the same as those passed to RegisterPreFilter
Exit:
        Registers preserved.
        Filter de-registered.

Filter Manager service calls

Service_FilterManagerInstalled (&87)


 in     R0 = Version number of Filter Manager *100, ie. 1.23 => 123
        R1 = Service_FilterManagerInstalled
out all must be preserved, must never be claimed

This service call is broadcast to allow modules that install a Filter to be reinstalled when the filter manager is reloaded / re-inited.

The SWI is issued on a callback, so the SWI interface is valid for registering filters.

Service_FilterManagerDying (&88)


 in     R1 = Service_FilterManagerDying
out all must be preserved, must never be claimed

This is broadcast when the filter manager has unlinked all filters from its active lists (just before the module dies) to allow the filter owners to tidy any internal state.