home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / ui_utils / nldaemon.lzh / NLDAEMON / SOURCE / NL-DAEMON.H next >
C/C++ Source or Header  |  1991-08-15  |  2KB  |  82 lines

  1. #define COPYRIGHT   "Copyright 1989 by Davide P. Cervone, all rights reserved" 
  2.  
  3. #define PORTNAME        "NL-Daemon-Port"
  4.  
  5.  
  6. #define STDBLOCKPEN     1
  7. #define STDDETAILPEN    0
  8.  
  9. #define BLOCKPEN        2
  10. #define DETAILPEN       3
  11.  
  12. #define PENCHANGED      0x80
  13.  
  14.  
  15.  
  16. /*
  17.  *  NL_HandlerInfo
  18.  *
  19.  *  The data structure shared between the handler and the loader
  20.  *  the loader sets some of these variables on behalf of the handler,
  21.  *  in order to keep the handler as small as possible.  The handler
  22.  *  passes information that the loader needs (like the pointers to 
  23.  *  the routines for SetFunction) via this structure.
  24.  */
  25.  
  26. struct NL_HandlerInfo
  27. {
  28.    struct MsgPort NL_Port;                  /* port used to store this info */
  29.    short MajVers,MinVers, MinLoadVers;      /* version of handler and loader */
  30.    long Segment;                            /* SegList loaded by loader */
  31.    struct IntuitionBase **IntuitionBase;
  32.    struct SysBase **SysBase;
  33.    
  34.    /*
  35.     *  These are the routines replaced by SetFunction() and the values
  36.     *  returned by SetFunction, used to replace the original routines
  37.     *  when NL-Daemon exits.
  38.     */
  39.    
  40.    void (*aOpenWindow)();
  41.    void (*aSetMenuStrip)();
  42.    void (*aOpenScreen)();
  43.    long *OldOpenWindow;
  44.    long *OldSetMenuStrip;
  45.    long *OldOpenScreen;
  46.    
  47.    
  48.    /*
  49.     *  These routines are called by the loader to retro-fit existing windows
  50.     *  and screens.
  51.     */
  52.     
  53.    void (*SetupWindow)();
  54.    void (*SetupScreen)();
  55.    
  56.    /*
  57.     *  These are the structures used by NL-Handler
  58.     */
  59.     
  60.    struct Image *CloseImage;
  61.    struct Image *UpFrontImage;
  62.    struct Image *DownBackImage;
  63.    struct Image *SizeImage;
  64.    struct Image *ZoomImage;
  65.  
  66.    struct Image *LR_CloseImage;
  67.    struct Image *LR_UpFrontImage;
  68.    struct Image *LR_DownBackImage;
  69.    struct Image *LR_SizeImage;
  70.    struct Image *LR_ZoomImage;
  71.    
  72.    int Flags;
  73.       #define   INTUITION_CHANGED   1
  74. };
  75.  
  76. /*
  77.  *  Macros to make using NL_HandlerInfo easy
  78.  */
  79.  
  80. #define VAR(x)      (*(NL_HandlerData->x))
  81. #define var(x)      (NL_HandlerData->x)
  82.