home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / utils / precognition / include / pcgwindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-24  |  3.4 KB  |  130 lines

  1. /* ==========================================================================
  2. **
  3. **                               pcgWindow.h
  4. **
  5. ** PObject<GraphicObject<Interactor<pcgWindow
  6. **
  7. ** ©1991 WILLISoft
  8. **
  9. ** ==========================================================================
  10. */
  11.  
  12. #ifndef PCGWINDOW_H
  13. #define PCGWINDOW_H
  14.  
  15.  
  16. #include <intuition/intuition.h>
  17. #include "PObject.h"
  18. #include "Interactor.h"
  19.  
  20. typedef struct pcgWindow
  21.    {
  22.       Class                 *isa;
  23.       char                  *PObjectName;
  24.       void                  *Next;      /* Not used. */
  25.       struct pcgWindow      *IaWindow;  /* not used. */
  26.       Point                  Location;
  27.       Point                  Size;
  28.       struct NewWindow       NewWindow;
  29.       struct Window         *Window;
  30.       ULONG                  IDCMPFlags;
  31.       struct Interactor     *FirstInteractor;
  32.       struct GraphicObject  *FirstGraphic;
  33.       struct MsgPort        *SharedUserPort;
  34.       Menu                  *MenuStrip;
  35.    } pcgWindow;
  36.  
  37. /*
  38.    The field 'IDCMPFlags' maintains the current IDCMP values.  The field
  39.    NewWindow.IDCMPFlags contains the bare minimum IDCMP values that the
  40.    window must have.  (Other IDCMP flags are set automagically by adding
  41.    Interactors to the window.
  42.  
  43.    NOTE: If SharedUserPort is not NULL, it is assumed to be a pointer to
  44.    a valid MessagePort structure, and that the window is to use this
  45.    MessagePort as its UserPort instead of creating its own.
  46.  
  47.    This is useful for having multiple windows sharing one MessagePort.
  48.    (See the Amiga 1.3 RKMs:  Libraries and Devices, Chapter 7, page 171
  49.    for more details on sharing UserPorts.
  50.  */
  51.  
  52.  
  53.  
  54.  
  55. void pcgWindow_Init( 
  56.    #ifdef ANSI_HEADERS
  57.                      pcgWindow     *self,
  58.                      UWORD          leftedge,
  59.                      UWORD          topedge,
  60.                      UWORD          width,
  61.                      UWORD          height,
  62.                      UWORD          minwidth,
  63.                      UWORD          minheight,
  64.                      UWORD          maxwidth,
  65.                      UWORD          maxheight,
  66.                      char          *title,
  67.                      ULONG          IDCMPFlags,
  68.                      ULONG          flags,
  69.                      struct Screen *screen 
  70.    #endif
  71.                    );
  72.  
  73.  
  74.  
  75. struct Window *pcgOpenWindow( 
  76.    #ifdef ANSI_HEADERS
  77.                   pcgWindow *self 
  78.    #endif
  79.                   );
  80.  
  81. void pcgCloseWindow( 
  82.    #ifdef ANSI_HEADERS
  83.                         pcgWindow  *self 
  84.    #endif
  85.                      );
  86.  
  87. struct Window *iWindow( pcgWindow *self );
  88.    /* returns a pointer to the Intuition window. */
  89.  
  90. RastPort *RPort( pcgWindow *self );
  91.  
  92. ULONG SetIDCMPFlags( 
  93.    #ifdef ANSI_HEADERS
  94.                         pcgWindow *self, 
  95.                         ULONG newflags 
  96.    #endif
  97.                    );
  98.  
  99.  
  100. void AddWindowPObject ( 
  101.    #ifdef ANSI_HEADERS
  102.                          pcgWindow       *window,
  103.                          GraphicObject   *graphic 
  104.    #endif
  105.                       );
  106.  
  107.  
  108. void RemoveWindowPObject( 
  109.    #ifdef ANSI_HEADERS
  110.                            pcgWindow      *window,
  111.                            GraphicObject  *graphic 
  112.    #endif
  113.                         );
  114.  
  115.  
  116. void AddMenuStrip( 
  117.    #ifdef ANSI_HEADERS
  118.                      pcgWindow *window, Menu *menustrip 
  119.    #endif
  120.                  );
  121.  
  122.  
  123. void RemoveMenuStrip( 
  124.    #ifdef ANSI_HEADERS
  125.                         pcgWindow *window 
  126.    #endif
  127.                     );
  128.  
  129. #endif
  130.