/* svobjects/svobjectbase.h         */
/* Version    : 1.1                 */
/* Date       : 16.12.1993          */
/* Written by : Andreas R. Kleinert */

#ifndef SVOBJECTS_SVOBJECTBASE_H
#define SVOBJECTS_SVOBJECTBASE_H

#ifndef SVOBJECTS_SVOBJECTS_H
#include <svobjects/svobjects.h>
#endif /* SVOBJECTS_SVOBJECTS_H */

#ifndef EXEC_LISTS
#include <exec/lists.h>
#endif /* EXEC_LISTS */

#ifndef EXEC_LIBRARIES
#include <exec/libraries.h>
#endif /* EXEC_LIBRARIES_H */

   /* An external support-library for the superview.library is called a
      "svobject".
      Each svobject has to contain a "SVO_ObjectNode" structure (as follows)
      in its Library-Header, which later will be READ and MODIFIED by
      the superview.library.
      Because the superview.library supports three different sorts
      of SVObjects at the time (internal, independent and external),
      there are three different types of this structure (might be more in
      the future), which can be identified via their "svo_ObjectType".
   */

   /* The Construction of a svobject :
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      The Library Base
      ----------------

      Version MUST be 1 yet, Revision can be set freely

      (see structure described below)


      The Function Table
      ------------------

      Offset  Function                  Parameters            Result

      - 30    SVO_AllocHandle           -                     D0: APTR  Handle
      - 36    SVO_FreeHandle            A1 : APTR Handle      D0: ULONG ErrCode
      - 42    SVO_Show                  A1 : APTR Handle      D0: ULONG ErrCode
      - 48    SVO_Write                 A1 : APTR Handle      D0: ULONG ErrCode
      - 54    SVO_CloseDisplay          A1 : APTR Handle      D0: ULONG ErrCode
      - 60    SVO_FreeResources         A1 : APTR Handle      D0: ULONG ErrCode
      - 66    SVO_SetAccessMode         A1 : APTR Handle
                                        D1 : ULONG Mode       D0: ULONG ErrCode
      - 72    SVO_SetWriteSubType       A1 : APTR Handle
                                        D1 : ULONG SubType
                                        A2 : APTR future      D0: ULONG ErrCode
      - 78    SVO_SetScreenType         A1 : APTR Handle
                                        D1 : ULONG Flags
                                        A2 : APTR future      D0: ULONG ErrCode
      - 84    SVO_SetWindowFlags        A1 : APTR Handle
                                        D1 : ULONG Flags
                                        A2 : APTR future      D0: ULONG ErrCode
      - 90    SVO_SetWindowIDCMP        A1 : APTR Handle
                                        D1 : ULONG Flags
                                        A2 : APTR future      D0: ULONG ErrCode
      - 96    SVO_GetScreenAddress      A1 : APTR Handle    
                                        A2 : APTR future      D0: Screen *
      -102    SVO_GetWindowAddress      A1 : APTR Handle      
                                        A2 : APTR future      D0: Window *
      -108    SVO_SetScreenAddress      A1 : APTR Handle
                                        A2 : Screen *       
                                        A3 : APTR future      D0: ULONG ErrCode
      -114    SVO_SetWindowAddress      A1 : APTR Handle
                                        A2 : Screen *       
                                        A3 : APTR future      D0: ULONG ErrCode
      -122    SVO_SetWriteName          A1 : APTR Handle
                                        A2 : UBYTE *FileName
                                        A3 : APTR future      D0: ULONG ErrCode
      -130    SVO_SetReadName           A1 : APTR Handle
                                        A2 : UBYTE *FileName
                                        A3 : APTR future      D0: ULONG ErrCode
      -136    SVO_FileInfoRequest       A1 : APTR Handle
                                        A2 : Window *
                                        A3 : APTR future      D0: ULONG ErrCode
      -142    SVO_CheckFileType         A1 : BPTR FileHandle
                                        A2 : UBYTE *FileName
                                        A3 : APTR future      D0: Bool

      END OF FUNCTIONS IN AN VERSION 1 svobject

   */

/* *************************************************** */
/* *						     * */
/* * Library base Definition for svobjects           * */
/* *						     * */
/* *************************************************** */

struct SVObjectBase
{
 struct Library         svb_LibNode;       /* Exec LibNode                   */
 struct SVO_ObjectNode *svb_SVObject;      /* POINTER to initialized         */
                                           /* SVO_ObjectNode                 */
                                           /* Define it somewhere else,      */
                                           /* then initialize this pointer.  */

 ULONG                  svo_Reserved [32]; /* Reserved for future expansion. */
                                           /* Always NULL yet (Version 1).   */

 /*
   Private data of the svobject, not to be accessed
   by superview.library, may follow.
 */
};

#endif /* SVOBJECTS_SVOBJECTBASE_H */
