home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 106 / af106a.adf / archives / serious.lzx / ViNCEd / Include / VNCBase.h < prev    next >
C/C++ Source or Header  |  1997-11-19  |  10KB  |  248 lines

  1. #ifndef VNC_VNCBASE_H
  2. #define VNC_VNCBASE_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-97 THOR-Software inc.                        **
  8.  ** Version 3.50                                        **
  9.  **                                                     **
  10.  ** program version 1.23 05/03/91       THOR            **
  11.  ** update  version 1.25 06/19/91       THOR            **
  12.  ** header file 06/19/91                THOR            **
  13.  ** updated to 3.30      03/31/97       THOR            **
  14.  ** updated to 3.40      05/08/97       THOR            **
  15.  ** updated to 3.50      07/28/97       THOR            **
  16.  **                                                     **
  17.  ** ViNCEd Library Base                                 **
  18.  **-----------------------------------------------------**
  19.  **                                                     **
  20.  ** all use at your own risk,etc.,etc.                  **
  21.  **                                                     **
  22.  ** Everything declared as "reserved" or                **
  23.  ** "not used" is NOT free for your use,                **
  24.  ** it will propably used in a later release.           **
  25.  ** All FREE entries are free for public                **
  26.  ** use and are, if not otherwise noticed,              **
  27.  ** initialized as ZERO                                 **
  28.  *********************************************************/
  29.  
  30. #ifndef EXEC_TYPES_H
  31. #include <exec/types.h>
  32. #endif
  33.  
  34. #ifndef EXEC_LIBRARIES_H
  35. #include <exec/libraries.h>
  36. #endif
  37.  
  38. #ifndef EXEC_INTERRUPTS_H
  39. #include <exec/interrupts.h>
  40. #endif
  41.  
  42. #ifndef EXEC_PORTS_H
  43. #include <exec/ports.h>
  44. #endif
  45.  
  46. #ifndef EXEC_SEMAPHORES_H
  47. #include <exec/semaphores.h>
  48. #endif
  49.  
  50. #ifndef EXEC_EXECBASE_H
  51. #include <exec/execbase.h>
  52. #endif
  53.  
  54. #ifndef EXEC_IO_H
  55. #include <exec/io.h>
  56. #endif
  57.  
  58. #ifndef EXEC_DEVICES_H
  59. #include <exec/devices.h>
  60. #endif
  61.  
  62. #ifndef INTUITION_INTUITIONBASE_H
  63. #include <intuition/IntuitionBase.h>
  64. #endif
  65.  
  66. #ifndef GRAPHICS_GFXBASE_H
  67. #include <graphics/GfxBase.h>
  68. #endif
  69.  
  70. #ifndef DOS_DOS_H
  71. #include <dos/dos.h>
  72. #endif
  73.  
  74. #ifndef DOS_DOSEXTENS_H
  75. #include <dos/dosextens.h>
  76. #endif
  77.  
  78. #ifndef UTILITY_UTILITY_H
  79. #include <utility/utility.h>
  80. #endif
  81.  
  82. #ifndef VNC_PREFS_H
  83. #include <vnc/prefs.h>
  84. #endif
  85.  
  86. #ifndef VNC_WINDOW_H
  87. #include <vnc/window.h>
  88. #endif
  89.  
  90. #ifndef VNC_MENU_H
  91. #include <vnc/menu.h>
  92. #endif
  93.  
  94.  
  95. /* The vnc.library base
  96.  
  97.         This one is READ ONLY!
  98.  
  99.         DO NOT TOUCH, use the library functions instead.
  100.  
  101.         Some of the library bases in here might get invalid,
  102.         even if the library IS AVAILABLE.
  103.         Disk based libraries are not held open by ViNCEd!
  104.         BE WARNED!
  105. */
  106.  
  107. struct VNCBase {
  108.         struct Library           vnc_Lib;       /* the exec lib node */
  109.         UWORD                    vnc_wordfill1; /* LW alignment */
  110.         struct IntuitionBase    *vnc_IntBase;   /* ptr to intuition */
  111.         struct GfxBase          *vnc_GfxBase;   /* ptr to graphics */
  112.         struct Library          *vnc_LayersBase;/* ptr to layers */
  113.         struct DosLibrary       *vnc_DosBase;   /* ptr to dos */
  114.         struct Device           *vnc_ConsoleBase; /* ptr to console */
  115.         ULONG                    vnc_Flags;     /* see below */
  116.         struct VNCPrefs         *vnc_Prefs;     /* current prefs.
  117.                                                    DO NOT READ! Use
  118.                                                    the library functions!*/
  119.  
  120.         BPTR                     vnc_Segment;   /* library segment */
  121.         struct MsgPort          *vnc_InputPort; /* used for input.device */
  122.         struct IOStdReq         *vnc_InputIO;   /* ditto */
  123.         struct Interrupt        *vnc_Immediate; /* imm. input handler */
  124.         struct Interrupt        *vnc_InputIRQ;  /* delayed input handler */
  125.         struct IOStdReq         *vnc_ConsoleIO; /* console IO pkt */
  126.         struct Library          *vnc_IffBase;   /* IFF if open.
  127.                                                    DO NOT READ! Might get
  128.                                                    invalid!*/
  129.         struct ViNCWindow       *vnc_ActualCN;  /* foreground window */
  130.         struct Library          *vnc_LocaleBase;/* locale.lib.
  131.                                                    DO NOT READ! Might get
  132.                                                    invalid!*/
  133.         struct ViNCMenu         *vnc_EdMenu;    /* Menu constructor, if
  134.                                                    available */
  135.  
  136.         struct ViNCMenu         *vnc_EditMenu;  /* reserved */
  137.         char                    *vnc_ReqTitle;  /* TAB requester title */
  138.  
  139.         struct UtilityBase      *vnc_UtilityBase; /* ptr to utility, if
  140.                                                    available */
  141.         struct ExecBase         *vnc_SysBase;   /* ptr to exec for
  142.                                                    speedup */
  143.         char                    *vnc_SnipVec;   /* snip data. DO NOT
  144.                                                    touch */
  145.         void                    *vnc_Obsolete2; /* no longer used.
  146.                                                    DO NOT touch! */
  147.         struct MinList           vnc_VNCList;   /* list of all windows */
  148.         struct MinList           vnc_UserList;  /* all registered users,
  149.                                                    reserved */
  150.         struct MinList           vnc_SnipList;  /* all hooks to call at
  151.                                                    snip time */
  152.         struct MinList           vnc_HookList;  /* all added hooks */
  153.  
  154.         struct SignalSemaphore   vnc_PrefsSema; /* access to prefs */
  155.         struct SignalSemaphore   vnc_ListSema;  /* access to hook list */
  156.         struct SignalSemaphore   vnc_SnipSema;  /* access to sniplist */
  157.         struct SignalSemaphore   vnc_WindowSema;/* access to windowlist */
  158.  
  159.         struct MsgPort          *vnc_Supervisor;/* link to supervisor task */
  160.         struct MsgPort          *vnc_SuperPort; /* send msgs there */
  161.         struct Message          *vnc_DeathMsg;  /* send this to kill super */
  162.  
  163.         struct Library          *vnc_WBBase;    /* ptr to workbench lib
  164.                                                    if open */
  165.  
  166.         struct Library          *vnc_IconBase;  /* ptr to icon base */
  167.         struct Library          *vnc_ArpBase;   /* private, not guaranteed to be legal */
  168.         struct Library          *vnc_AslBase;   /* private, do not use */
  169.         struct Library          *vnc_MoreBases[5]; /* reserved room */
  170.  
  171.         ULONG                    vnc_NextID;    /* for UniqueID if
  172.                                                    utility is not available */
  173.  
  174.         char                    *vnc_SuspendStr;/* string for suspend msg */
  175.         char                    *vnc_CloseRqBody; /* close requester body
  176.                                                      string */
  177.         char                    *vnc_CloseRqOK; /* positive gadget */
  178.         char                    *vnc_CloseRqCn; /* negative gadget */
  179.         char                    *vnc_NoErrorStr; /* "no error" or localized
  180.                                                     version */
  181.  
  182.         char                    *vc_LoadFromStr; /* the hail text of the Open... requester */
  183.         char                    *vc_SaveToStr;   /* ... of Save As */
  184.         char                    *vc_LdHistoryStr;/* ... of Open History */
  185.         char                    *vc_SvHistoryStr;/* ... of Save As History */
  186.         char                    *vc_FailedLoad;  /* contents of the open fail requester */
  187.         char                    *vc_FailedSave;  /* contents of the save fail requester */
  188.         char                    *vc_AcceptStr;   /* the contents of the accept button */
  189.                                                  /* in a failure requester */
  190.  
  191.         /* more stuff beyond this point, do not touch!*/
  192. };
  193.  
  194.  
  195. /* Note: If you MUST hold more than one semaphore at once, lock them
  196.    in the following order to prevent deadlocks:
  197.  
  198. highest:       vnc_WindowSema in library        list of ViNCEd windows
  199.                vcn_Semaphore in window          access to single window
  200.                                                 LockWindow(),UnLockWindow()
  201.                vnc_SnipSema in library          access to snipvec
  202.                vcn_OwnerSema in window          access to ownerlist
  203.                vnc_PrefsSema in library         access to prefs
  204.                                                 LockPrefs(),UnLockPrefs()
  205. lowest:        vnc_ListSema in library          access to hooklist
  206.  
  207.  
  208.    Use the library functions to grand access where available!
  209. */
  210.  
  211.  
  212. /* Defined flags in vnc_Flags: */
  213.  
  214. /* Input handler active ?*/
  215. #define VNC_INPUTENABLED_BIT    0
  216. #define VNC_INPUTENABLED_MASK   (1L<<0)
  217.  
  218. /* Library should be removed ?*/
  219. #define VNC_FLUSHING_BIT        1
  220. #define VNC_FLUSHING_MASK       (1L<<1)
  221.  
  222. /* snip vec up to date ?*/
  223. #define VNC_UPDATE_BIT          2
  224. #define VNC_UPDATE_MASK         (1L<<2)
  225.  
  226. /* external snip vec written?*/
  227. #define VNC_WRITTEN_BIT         3
  228. #define VNC_WRITTEN_MASK        (1L<<3)
  229.  
  230. /* library localized ?*/
  231. #define VNC_LOCALIZED_BIT       4
  232. #define VNC_LOCALIZED_MASK      (1L<<4)
  233.  
  234. /* notification started ?*/
  235. #define VNC_NOTIFIED_BIT        5
  236. #define VNC_NOTIFIED_MASK       (1L<<5)
  237.  
  238. /* running in 1.2/1.3 ?*/
  239. #define VNC_OLDOS_BIT           6
  240. #define VNC_OLDOS_MASK          (1L<<6)
  241.  
  242. /* welcome message printed ?*/
  243. #define VNC_STARTUP_BIT         7
  244. #define VNC_STARTUP_MASK        (1L<<7)
  245.  
  246. #endif
  247.  
  248.