
/*
 * MWB.H
 *
 *  (c)1987 Matthew Dillon.  All Rights Reserved.
 */


#include <exec/types.h>
#include <exec/ports.h>
#include <exec/memory.h>

typedef struct MsgPort PORT;

#define PORT_NAME "MWB_PORT"
#define SCREEN_NAME "Other Workbench Screen"
#define TASK_NAME "MWB_RESIDENT"
#define MAXSCREENS  32

#define FL_NOREMOVE 0x01
#define FL_DEFINED  0x02

#define OP_QUIT         1
#define OP_NEWSCREEN    2
#define OP_SETSCREEN    3
#define OP_CLOSEUNUSED  4
#define OP_STARTUP      5   /* garbage message for startup handshaking  */


typedef struct {
    long screen;
    long scrmodes;
    short width;
    short height;
    short depth;
    short flags;
} XIT;

typedef struct {
    struct Message msg;
    long com;
    long screeno;
    XIT xit;
} XMSG;

typedef struct {
    PORT port;
    long segment;
    char scrname[sizeof(SCREEN_NAME)+1];    /* +1 for good measure  */
    char taskname[sizeof(TASK_NAME)+1];     /* +1 for good measure  */
    XIT xit[MAXSCREENS];
} XPORT;


extern PORT *FindPort(), *CreatePort();


