home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d500 / swindows.lha / sWindows / Source / sWindows.h < prev    next >
C/C++ Source or Header  |  1991-06-06  |  2KB  |  62 lines

  1. #include "swMemory.h"
  2.  
  3. #define COPYRIGHT   "Copyright 1989 by Davide P. Cervone, all rights reserved" 
  4.  
  5. #define PORTNAME        "sWindowsPort"
  6.  
  7. /*
  8.  *  DEFAULTSIGNAL is the signal to wait for when a screen can not be closed
  9.  *  immediately, and no other signal could be allocated.
  10.  */
  11.  
  12. #define DEFAULTSIGNAL   SIGBREAKF_CTRL_F
  13. #define NOWINDOW        ((struct Window *)-1L)
  14. #define ONE             1L
  15.  
  16.  
  17. /*
  18.  *  swHandlerInfo
  19.  *
  20.  *  The data structure shared between the handler and the loader
  21.  *  the loader sets some of these variables on behalf of the handler,
  22.  *  in order to keep the handler as small as possible.  The handler
  23.  *  passes information that the loader needs (like the pointers to 
  24.  *  the routines for SetFunction) via this structure
  25.  */
  26.  
  27. struct swHandlerInfo
  28. {
  29.    struct MsgPort swPort;                   /* port used to store this info */
  30.    short MajVers,MinVers, LoadVers;         /* version of handler and loader */
  31.    long Segment;                            /* SegList loaded by loader */
  32.    struct IntuitionBase **IntuitionBase;
  33.    struct SysBase **SysBase;
  34.    
  35.    SLISTITEM *ScreenList;                   /* the linked list of screens */
  36.    WLISTITEM *WindowList;                   /* the linked list of windows */
  37.    
  38.    /*
  39.     *  These are the routines replaced by SetFunction()
  40.     */
  41.    
  42.    void (*aOpenWindow)();
  43.    void (*aCloseWindow)();
  44.    void (*aCloseScreen)();
  45.    
  46.    /*
  47.     *  These are the values returned by SetFunction, and are used
  48.     *  to replace the original routines when sWindows exits
  49.     */
  50.    
  51.    long *OldOpenWindow;
  52.    long *OldCloseWindow;
  53.    long *OldCloseScreen;
  54. };
  55.  
  56. /*
  57.  *  Macros to make using swHandlerInfo easy
  58.  */
  59.  
  60. #define VAR(x)      (*(swHandlerData->x))
  61. #define var(x)      (swHandlerData->x)
  62.