home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 594b.lha / Precognition_rel1 / pcgWindow.h < prev    next >
C/C++ Source or Header  |  1991-12-12  |  3KB  |  83 lines

  1. #ifndef PCGWINDOW_H
  2. #define PCGWINDOW_H
  3.  
  4.  
  5. #include <intuition/intuition.h>
  6. #include "object.h"
  7. #include "Interactor.h"
  8.  
  9. typedef struct pcgWindow
  10.    {
  11.       Class                 *isa;
  12.       char                  *ObjectName;
  13.       void                  *Next;      /* Not used. */
  14.       struct pcgWindow      *IaWindow;  /* not used. */
  15.       Point                  Location;
  16.       Point                  Size;
  17.       struct NewWindow       NewWindow;
  18.       struct Window         *Window;
  19.       ULONG                  IDCMPFlags;
  20.       struct Interactor     *FirstInteractor;
  21.       struct GraphicObject  *FirstGraphic;
  22.       struct MsgPort        *SharedUserPort;
  23.       Menu                  *MenuStrip;
  24.    } pcgWindow;
  25.  
  26. /*
  27.    The field 'IDCMPFlags' maintains the current IDCMP values.  The field
  28.    NewWindow.IDCMPFlags contains the bare minimum IDCMP values that the
  29.    window must have.  (Other IDCMP flags are set automagically by adding
  30.    Interactors to the window.
  31.  
  32.    NOTE: If SharedUserPort is not NULL, it is assumed to be a pointer to
  33.    a valid MessagePort structure, and that the window is to use this
  34.    MessagePort as its UserPort instead of creating its own.
  35.  
  36.    This is useful for having multiple windows sharing one MessagePort.
  37.    (See the Amiga 1.3 RKMs:  Libraries and Devices, Chapter 7, page 171
  38.    for more details on sharing UserPorts.
  39.  */
  40.  
  41.  
  42.  
  43.  
  44. void pcgWindow_Init( pcgWindow     *self,
  45.                      UWORD          leftedge,
  46.                      UWORD          topedge,
  47.                      UWORD          width,
  48.                      UWORD          height,
  49.                      UWORD          minwidth,
  50.                      UWORD          minheight,
  51.                      UWORD          maxwidth,
  52.                      UWORD          maxheight,
  53.                      char          *title,
  54.                      ULONG          IDCMPFlags,
  55.                      ULONG          flags,
  56.                      struct Screen *screen );
  57.  
  58.  
  59.  
  60. struct Window *pcgOpenWindow( pcgWindow *self );
  61.  
  62. void pcgCloseWindow( pcgWindow  *self );
  63.  
  64. struct Window *iWindow( pcgWindow *self );
  65.    /* returns a pointer to the Intuition window. */
  66.  
  67. RastPort *RPort( pcgWindow *self );
  68.  
  69. ULONG SetIDCMPFlags( pcgWindow *self, ULONG newflags );
  70.  
  71.  
  72. void AddWindowObject   ( pcgWindow      *window,
  73.                          GraphicObject   *graphic );
  74.  
  75. void RemoveWindowObject( pcgWindow      *window,
  76.                          GraphicObject   *graphic );
  77.  
  78. void AddMenuStrip( pcgWindow *window, Menu *menustrip );
  79.  
  80. void RemoveMenuStrip( pcgWindow *window );
  81.  
  82. #endif
  83.