•  Back 
  •  CPX functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
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-File9.1.2.6  cpx_init                                                  TOS

 Name:        »cpx_init« - Initialization of the CPX.

 Declaration  CPXINFO * cdecl cpx_init (XCPB *xcpb);

              CPXINFO * cdecl cpx_init (XCPB *xcpb, int32_t magic, 
              int32_t version );

 Description  The call cpx_init serves for initializing the CPX. The 
              following applies:

               Parameter  Meaning

               xcpb       Pointer to the XCPB structure of XControl

              Note: The function must be placed at the start of the 
              TEXT segment of the CPX file, and is called during 
              XControl initialization as well as on activating the 
              CPX.

              With the aid of the second calling procedure one can 
              ascertain from the parameters magic and version whether 
              the CPX is running under XCONTROL or COPS. The following 
              routine may be used:

              int16_t is_COPS ( int32_t magic, int32_t version )
              {
                 if ((magic == 'COPS') && (version >= 0x10000L))
                    return (TRUE);      /* COPS */
                 else return (FALSE);   /* XCONTROL */
              }

              If COPS is recognized, the CPX can draw an object tree 
              with a size up to 512*384 pixels and pass it to the 
              function Xform_do.

 Return value: The function returns one of the following values:

               NULL  :  'Set-only' CPX 
               Else  :  Pointer to the CPXINFO structure of the CPX 

 Group:       CPX functions

 See also:    cpx_close   XCONTROL