Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File8.3.18 x_appl_sleep TOS Name: »Put application to sleep« - or wake it up (Geneva) Opcode: 28930 Syntax: int16_t x_appl_sleep( int16_t id, int16_t sleep ); Description: The call x_appl_sleep searches for the application whose ID (found by appl_find or appl_search) is id and either puts it to sleep or wakes it up. While an application is asleep, its windows are automatically closed, and it does not receive any events. Parameter Meaning sleep 0: Awaken application 1: Put application to sleep -1: No change The old state of wakefulness is always returned in xas_return, unless an error occurs. There are several situations where an error code will be returned: . There is no application with the ID specified. . The application was the only program awake and the user tried to put it to sleep. . The application has a single-tasking child. If an application puts itself to sleep, it will not be able to wake itself; this must be done by another application or by the user from the Desk menu. If an application which is asleep is about to be terminated for any reason, it is first awakened, so that it can receive the AP_TERM message. Return value: -1: Application not found, or the state could not be changed bit 0 set: Application was sleep bit 1 set: Application is multitasking is clear, the application is single-tasking Availability: The function is available only under Geneva. Group: Application library See Also: Binding