From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- emu/Nt/ieplugin.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 emu/Nt/ieplugin.h (limited to 'emu/Nt/ieplugin.h') 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) -- cgit v1.2.3