diff options
| author | Charles.Forsyth <devnull@localhost> | 2009-03-25 15:55:14 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2009-03-25 15:55:14 +0000 |
| commit | dfd1934d5e1ddbeb326f77fc0e52307c801a1a3e (patch) | |
| tree | f1e8b23278caae95e01d88b00421d6c3642357ef /emu/Nt/ieplugin.h | |
| parent | 78dfdcbd59dc8f36975e7695933e3f753957474c (diff) | |
x20090325-1554
Diffstat (limited to 'emu/Nt/ieplugin.h')
| -rw-r--r-- | emu/Nt/ieplugin.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/emu/Nt/ieplugin.h b/emu/Nt/ieplugin.h new file mode 100644 index 00000000..bb8db90c --- /dev/null +++ b/emu/Nt/ieplugin.h @@ -0,0 +1,75 @@ +typedef struct Pop Pop; +typedef struct Iop Iop; +typedef struct IPoint IPoint; +typedef struct IRectangle IRectangle; +typedef struct Plugin Plugin; + +enum { + // messages from Plugin to Inferno + Pgfxkey, + Pmouse, + + // message from Inferno to Plugin + Iattachscr, + Iflushscr, + Isetcur, + Idrawcur, + Iquit, +}; + +struct Pop { + int op; + union { + int key; // Pgfxkey + struct { + int x; + int y; + int b; + int modify; + } m; // Pmouse + } u; +}; + +struct IPoint +{ + LONG x; + LONG y; +}; + +struct IRectangle +{ + IPoint min; + IPoint max; +}; + +struct Iop { + int op; + int val; + union { + IRectangle r; // Iflushscr + // need additional support for Isetcur & Idrawcur + } u; +}; +#define PI_NCLOSE 2 + +struct Plugin { + LONG sz; // size of this data struct (including screen mem) + HANDLE conin; // console input (from plugin) - never NULL + HANDLE conout; // console output (to plugin) - can be NULL + HANDLE datain; // #C data file for initialisation (HACK!) + HANDLE dopop; // new Pop available + HANDLE popdone; // acknowledgement of Pop + HANDLE doiop; // new Iop available + HANDLE iopdone; // acknowledgement of Iop + HANDLE closehandles[PI_NCLOSE]; + Pop pop; + Iop iop; + int Xsize; // screen dimensions + int Ysize; + ULONG cdesc; // display chans descriptor + int cflag; + ULONG screen[1]; +}; + +#define IOP (plugin->iop) +#define POP (plugin->pop) |
