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-File13.8.29.5 ID4-Server TOS Important: If ID4 is to function with memory protection the GLOBAL- flag should be set in the ID4-Server program header! If a Client would like to embed an object, the Server will receive an OLGA_EMBED message from the Manager, to which it must reply with OLGA_EMBEDDED. To draw, the Client calls CBDraw-Callback. During processing of the Callback the Server as a rule may not make any AES calls (it closes wind_update!). The Server must also not adjust the palette. If the Server makes changes to an object, it can immediately send an OLGA_INPLACEUPDATE message to the Client so that it can perform an immediate update. To avoid passing an undefined pointer on terminating a Server or closing of documents, the Server must proceed as follows: For each object, the Server tests whether OLGAObjectInfo.CBLock<=0. If this is the case, the Server first sets CBLock to -16000, then CBDraw to NULL. Everything must be enclosed in an evnt_timer loop and repeated until no more objects are assigned. Only then may the Server terminate or close the document window. Once the Server has set all corresponding CBDraw pointers to NULL, an OLGA_UNEMBED message must be sent to the Client. On receipt of this message the Client can mark the objects as 'invalid', for example by drawing a white rectangle crossed out by a red cross. In order for a Server to determine if a Client is still using an embedded object, the Clients will call CBUNEMBED Callback to dissolve the connection. An ID4-Server should react the same way on receipt of OLGA_CLIENTTERMINATED. In order to avoid any problems resulting from a Server crash, the Server should overwrite etv_critic, and by running this routine CBDraw will set all objects to NULL and CBLock to -16000. This function was added to OLGA in Rev 1.2 (1996-11-20). See also: OLGA protocol OLGA_EMBEDDED OLGA_UNEMBED OLGA_INPLACEUPDATE CBDraw CBUnembed