home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / include / pcgWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-13  |  3.4 KB  |  121 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.       PClass                 *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 __PARMS((
  56.                      pcgWindow     *self,
  57.                      UWORD          leftedge,
  58.                      UWORD          topedge,
  59.                      UWORD          width,
  60.                      UWORD          height,
  61.                      UWORD          minwidth,
  62.                      UWORD          minheight,
  63.                      UWORD          maxwidth,
  64.                      UWORD          maxheight,
  65.                      char          *title,
  66.                      ULONG          IDCMPFlags,
  67.                      ULONG          flags,
  68.                      struct Screen *screen
  69.                    ));
  70.  
  71.  
  72.  
  73. struct Window *pcgOpenWindow __PARMS((
  74.                   pcgWindow *self
  75.                   ));
  76.  
  77. void pcgCloseWindow __PARMS((
  78.                         pcgWindow  *self
  79.                      ));
  80.  
  81. struct Window *iWindow __PARMS(( pcgWindow *self ));
  82.    /* returns a pointer to the Intuition window. */
  83.  
  84. RastPort *RPort __PARMS(( pcgWindow *self ));
  85.  
  86. ULONG SetIDCMPFlags __PARMS((
  87.                         pcgWindow *self,
  88.                         ULONG newflags
  89.                    ));
  90.  
  91.  
  92. void AddWindowPObject  __PARMS((
  93.                          pcgWindow       *window,
  94.                          GraphicObject   *graphic
  95.                       ));
  96.  
  97.  
  98. void RemoveWindowPObject __PARMS((
  99.                            pcgWindow      *window,
  100.                            GraphicObject  *graphic
  101.                         ));
  102.  
  103.  
  104. void AddMenuStrip __PARMS((
  105.                      pcgWindow *window, Menu *menustrip
  106.                  ));
  107.  
  108.  
  109. void RemoveMenuStrip __PARMS((
  110.                         pcgWindow *window
  111.                     ));
  112.  
  113. /* Additions for missing Builder prototypes -- EDB */
  114.  
  115. void AddInteractor __PARMS(( pcgWindow *self, Interactor *interactor ));
  116.  
  117. void AddGraphicObject __PARMS(( pcgWindow *self, GraphicObject *graphic ));
  118.  
  119.  
  120. #endif
  121.