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.9 CBDraw TOS C notation: void cdecl (*CBDraw) (ObjectInfo *objectinfo, int outScreen, int outHandle, int outDevID, GRECT *Size, GRECT *Clip); PurePascal notation: (d1..d5 are dummy values, here NULL or 0 shoul be passed) CBDraw: procedure(d1,d2: pointer; d3,d4,d5: longint; objectinfo: POLGAObjectInfo; outScreen, outHandle, outDevID: integer; Size, Clip: GRECTPtr); If CBDraw is called by the Client, the Server should check whether the file OLGAObjectInfo.Filename (the OLGAObjectInfo pointer is passed by CBDraw) is already loaded - if not then it should do so now. Since the loading should actually have been ensured through OLGA_EMBED, one can in that case alternatively signal an error, for example by crossing out the object area using two red lines (or possibly by displaying the actual error as plain text in the object area). Then the Server can draw the graphics with the help of the passed values (see below). Inside of this drawing routine the Server must not make any wind_update calls! The CBDraw parameters have the following meaning: . outScreen signals whether output is to be to the screen (<>0) or not (=0). An on-screen preview is screen output too! . outHandle is the handle of the open workstation (screen, printer etc.), to which the Server can output directly. If outScreen is <>0, the Server can also alternatively output to its own screen workstation. . outDevID gives the device number (from ASSIGN.SYS) of the driver to output to. If outputting purely to screen this field contains NULL. Although a preview is an output to the screen, outDevID in that case specifies, for instance, the driver to which output will be made later during printing. In that case the Server can try to open that driver in order to better match the screen output to subsequent printer output. . Size is the rectangle in which the passed graphic must fit exactly, even if this leads to distortions. Clip is the Clipping rectangle (set before the call). Important: A Server must not make any AES calls during CBDraw! (Unless the AESPB pointer field has been adapted by the ClientGEMPB; nevertheless wind_update remains taboo for ID4-Servers). Additionally the colour palette in Callback must not be changed. This function was added to OLGA in Rev 1.2 (1996-11-20). See also: OLGA protocol OLGA_EMBEDDED OLGA_UNEMBED OLGA_INPLACEUPDATE CBUnembed