Thread View: comp.sys.acorn.tech
4 messages
4 total messages
Started by Jason O'Broin
Thu, 19 Nov 1992 13:25
Noticing when Shutdown is activated
Author: Jason O'Broin
Date: Thu, 19 Nov 1992 13:25
Date: Thu, 19 Nov 1992 13:25
18 lines
1120 bytes
1120 bytes
Is there anyway of intercepting the RiscOs 3.1 Desktop shutdown mechanism? I need to be able to do some processing before this is allowed to continue. In addition to this, I need to be able to distinguish between this and Exiting the desktop (ie. closing down the desktop is not the same as starting the shutdown procedure). Does anyone know the actual operations performed by shutdown. Ideally, I'd like to replace it completely. Many Thanks, Jason O'Broin (nmsc084@uk.ac.newcastle.turing) ( 'To make some kind of difference QUEENSRYCHE Then everyone must know, 'Speak' Eradicate the fascists, Revolution will grow' Operation : Mindcrime )
Re: Noticing when Shutdown is activated
Author: Tom Hughes
Date: Thu, 19 Nov 1992 14:19
Date: Thu, 19 Nov 1992 14:19
26 lines
1771 bytes
1771 bytes
In article <BxytAB.8KB@newcastle.ac.uk> unregistered@newcastle.ac.uk (Jason O'Broin) writes:
>Is there anyway of intercepting the RiscOs 3.1 Desktop shutdown mechanism? I need
>to be able to do some processing before this is allowed to continue.
>In addition to this, I need to be able to distinguish between this and Exiting
>the desktop (ie. closing down the desktop is not the same as starting the
>shutdown procedure). Does anyone know the actual operations performed by
>shutdown. Ideally, I'd like to replace it completely.
I believe there is a service call (Service_Shutdown?) which is issued
when a shutdown occurs. I think one of its parameters is a flag to say
whether it is an 'exit' or a 'shutdown'. I suspect that this call is
only issued after the Wimp and OS have done most of their shutdown
processing.
I'll have a look in my PRMs tonight and flesh out the details for you.
Tom.
============================================================================
Tom Hughes, CS3
thughes@uk.ac.warwick.dcs 57 Shakleton Road
csugk@uk.ac.warwick.csv Earlsdon
Coventry
(0203) 673584 CV5 6HT
============================================================================
Re: Noticing when Shutdown is activated
Author: Clive Jones
Date: Fri, 20 Nov 1992 02:06
Date: Fri, 20 Nov 1992 02:06
21 lines
1945 bytes
1945 bytes
In article <BxytAB.8KB@newcastle.ac.uk>, unregistered@newcastle.ac.uk (Jason O'Broin) writes: > > In addition to this, I need to be able to distinguish between this and Exiting > the desktop (ie. closing down the desktop is not the same as starting the > shutdown procedure). Does anyone know the actual operations performed by > shutdown. Ideally, I'd like to replace it completely. I believe the mechanism is almost identical between RiscOS3.1 and previous versions, in terms of its external interface. The difference between the shutdown dbox and merely leaving the desktop is slight. Basically, all tasks are first sent a PreQuit message (number 8). If none of them respond, they're all sent Quit (0) messages. So - the former should be handled if you want the opportunity to object to the shutdown, or the latter can be handled if you just want to do something. Under RiscOS3, the PreQuit message *may* have a flag word at address 20 in the message block (if the block is large enough). The bottom bit of this is set if it's your application being quit, or clear if a shutdown is happening. --Clive.
Re: Noticing when Shutdown is activated
Author: Tom Hughes
Date: Fri, 20 Nov 1992 09:25
Date: Fri, 20 Nov 1992 09:25
50 lines
3154 bytes
3154 bytes
In article <1992Nov20.020639.10146@infodev.cam.ac.uk> crj10@phx.cam.ac.uk (Clive Jones) writes:
>In article <BxytAB.8KB@newcastle.ac.uk>, unregistered@newcastle.ac.uk (Jason O'Broin) writes:
>> In addition to this, I need to be able to distinguish between this and Exiting
>> the desktop (ie. closing down the desktop is not the same as starting the
>> shutdown procedure). Does anyone know the actual operations performed by
>> shutdown. Ideally, I'd like to replace it completely.
>
>I believe the mechanism is almost identical between RiscOS3.1 and previous
>versions, in terms of its external interface. The difference between the
>shutdown dbox and merely leaving the desktop is slight.
>
>Basically, all tasks are first sent a PreQuit message (number 8). If none of
>them respond, they're all sent Quit (0) messages. So - the former should be
>handled if you want the opportunity to object to the shutdown, or the latter
>can be handled if you just want to do something.
>
>Under RiscOS3, the PreQuit message *may* have a flag word at address 20 in
>the message block (if the block is large enough). The bottom bit of this is set
>if it's your application being quit, or clear if a shutdown is happening.
Right. I looked this up in the RiscOS 3 PRMs last night, and whilst
the above info is correct, there are some new calls.
Firstly, there is a new messagem, Message_Shutdown (message 14) which
I think is only issued on the portable when an enforced shutdown
occurs (due to battery failure). I suspect this replaces the
Message_PreQuit/Quit sequence, as applciations should try to save and
exit gracefully when they receive it (accoring to the manuals).
Secondly, there are two service calls. These are Service_Shutdown
(&7E) which is issued before a shutdown, and may be claimed to block
the shutdown, and Service_ShutdownComplete (&80) which is issued after
a shutdown is completed.
One other clever (?) way of replacing the shutdown sequence that I
thought of is to install a post-filter on the task manager, watch for
Shutdown/Exit being selected from the menu of ctrl-shift-F12 being
pressed, and then mask these out from the task manager and do your own
thing. This is however truly sick.
Tom.
============================================================================
Tom Hughes, CS3
thughes@uk.ac.warwick.dcs 57 Shakleton Road
csugk@uk.ac.warwick.csv Earlsdon
Coventry
(0203) 673584 CV5 6HT
============================================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads