diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /emu/Nt/ieplugin.h | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
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) |
