1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-14 19:56:28 +00:00
Files
Interlisp.maiko/inc/mnxdefs.h
Nick Briggs 6528ac38e3 Remove proprietary license from all files.
The code is being re-licensed under the MIT license.

	modified:   bin/fixid
	modified:   bin/launch.asm
	modified:   bin/makefile-hpux.hp9000-x
	modified:   bin/makefile-init.sgi
	modified:   bin/makefile-init.sparc
	modified:   bin/makefile-init.sparc-multi
	modified:   bin/makefile-irix.sgi-x
	modified:   bin/makefile-sunos4.sparc
	modified:   bin/makefile-sunos4.sparc%
	modified:   bin/makefile-sunos4.sparc-multi
	modified:   bin/makefile-sunos5.386-x
	modified:   bin/makefile-sunos5.i386-x
	modified:   bin/makefile-sunos5.sparc-x
	modified:   bin/makefile-tail
	modified:   bin/makeisc
	modified:   bin/makeright
	modified:   inc/Check.h
	modified:   inc/MyWindow.h
	modified:   inc/Stipple.h
	modified:   inc/XCursors.h
	modified:   inc/XKeymap.h
	modified:   inc/XVersion.h
	modified:   inc/Xdeflt.h
	modified:   inc/Xicon.h
	modified:   inc/address.h
	modified:   inc/arith.h
	modified:   inc/arith2.h
	modified:   inc/array.h
	modified:   inc/bb.h
	modified:   inc/cell.h
	modified:   inc/cell.h%
	modified:   inc/copyright
	modified:   inc/dbprint.h
	modified:   inc/debug.h
	modified:   inc/devif.h
	modified:   inc/display.h
	modified:   inc/dspdata.h
	modified:   inc/ether.h
	modified:   inc/fast_dsp.h
	modified:   inc/fp.h
	modified:   inc/gc.h
	modified:   inc/gc.h.save
	modified:   inc/gcscan.h
	modified:   inc/hdw_conf.h
	modified:   inc/ifpage.h
	modified:   inc/inlineC.h
	modified:   inc/inlnMIPS.h
	modified:   inc/inlnPS2.h
	modified:   inc/inlndos.h
	modified:   inc/iopage.h
	modified:   inc/kbdif.h
	modified:   inc/keyboard.h
	modified:   inc/keyboard.h%
	modified:   inc/keysym.h
	modified:   inc/ldeXdefs.h
	modified:   inc/lispemul.h
	modified:   inc/lispemul.h.save
	modified:   inc/lispmap.h
	modified:   inc/lldsp.h
	modified:   inc/lnk-Xdeflt.h
	modified:   inc/lnk-debug.h
	modified:   inc/lnk-fast_dsp.h
	modified:   inc/lnk-inlineC.h
	modified:   inc/lnk-lispmap.h
	modified:   inc/lnk-tosfns.h
	modified:   inc/lnk-tosret.h
	modified:   inc/locfile.h
	modified:   inc/lpdefs.h
	modified:   inc/lpglobl.h
	modified:   inc/lspglob.h
	modified:   inc/lsptypes.h
	modified:   inc/medleyfp.h
	modified:   inc/mnxdefs.h
	modified:   inc/my.h
	modified:   inc/native.h
	modified:   inc/ocr.h
	modified:   inc/osmsg.h
	modified:   inc/picture.h
	modified:   inc/pilotbbt.h
	modified:   inc/print.h
	modified:   inc/profile.h
	modified:   inc/rawrs232c.h
	modified:   inc/return.h
	modified:   inc/rs232c.h
	modified:   inc/stack.h
	modified:   inc/stream.h
	modified:   inc/stream.h%
	modified:   inc/stream.h2
	modified:   inc/sysatms.h
	modified:   inc/timeout.h
	modified:   inc/tos1defs.h
	modified:   inc/tosfns.h
	modified:   inc/tosret.h
	modified:   inc/tty.h
	modified:   inc/version.h
	modified:   inc/vmemsave.h
	modified:   inc/xbitmaps.h
	modified:   inc/xdefs.h
	modified:   src/Cldeetr.c
	modified:   src/allocmds.c
	modified:   src/arith2.c
	modified:   src/arith3.c
	modified:   src/arith4.c
	modified:   src/array.c
	modified:   src/array2.c
	modified:   src/array3.c
	modified:   src/array4.c
	modified:   src/array5.c
	modified:   src/array6.c
	modified:   src/asmbbt.c
	modified:   src/asmbitblt.c
	modified:   src/atom.c
	modified:   src/bbtSPARC.s
	modified:   src/bbtsub.c
	modified:   src/bin.c
	modified:   src/binds.c
	modified:   src/bitblt.c
	modified:   src/blt.c
	modified:   src/byteswap.c
	modified:   src/call-c.c
	modified:   src/car-cdr.c
	modified:   src/cdaudio.c
	modified:   src/cdrom.c
	modified:   src/chardev.c
	modified:   src/chatter.c
	modified:   src/codeconv.c
	modified:   src/codetbl.c
	modified:   src/colorbltfns.c
	modified:   src/common.c
	modified:   src/conspage.c
	modified:   src/cr
	modified:   src/dbgtool.c
	modified:   src/dir.c
	modified:   src/doscomm.c
	modified:   src/doskbd.c
	modified:   src/dosmouse.c
	modified:   src/draw.c
	modified:   src/dsk.c
	modified:   src/dspif.c
	modified:   src/dspsubrs.c
	modified:   src/ejlisp.c
	modified:   src/eqf.c
	modified:   src/ether.c
	modified:   src/findkey.c
	modified:   src/foreign.c
	modified:   src/fp.c
	modified:   src/fvar.c
	modified:   src/gc.c
	modified:   src/gc2.c
	modified:   src/gcarray.c
	modified:   src/gccode.c
	modified:   src/gcfinal.c
	modified:   src/gchtfind.c
	modified:   src/gcmain3.c
	modified:   src/gcoflow.c
	modified:   src/gcr.c
	modified:   src/gcrcell.c
	modified:   src/gcscan.c
	modified:   src/gvar2.c
	modified:   src/hacks.c
	modified:   src/hardrtn.c
	modified:   src/imagefile.c
	modified:   src/imagefile2.c
	modified:   src/inet.c
	modified:   src/initdsp.c
	modified:   src/initkbd.c
	modified:   src/initsout.c
	modified:   src/intcall.c
	modified:   src/kbdif.c
	modified:   src/kbdsubrs.c
	modified:   src/keyevent.c
	modified:   src/keylib.c
	modified:   src/keymaker.c
	modified:   src/keytst.c
	modified:   src/keytstno.c
	modified:   src/kprint.c
	modified:   src/launch.asm
	modified:   src/ldeboot.c
	modified:   src/ldeether.c
	modified:   src/ldsout.c
	modified:   src/lineblt8.c
	modified:   src/lisp2c.c
	modified:   src/llcolor.c
	modified:   src/llstk.c
	modified:   src/loader.c
	modified:   src/loopsops.c
	modified:   src/lowlev1.c
	modified:   src/lowlev2.c
	modified:   src/lpdual.c
	modified:   src/lpkit.c
	modified:   src/lplexyy.c
	modified:   src/lpmain.c
	modified:   src/lpread.c
	modified:   src/lpsolve.c
	modified:   src/lptran.c
	modified:   src/lpwrite.c
	modified:   src/lpytab.c
	modified:   src/lsthandl.c
	modified:   src/main.c
	modified:   src/misc7.c
	modified:   src/miscn.c
	modified:   src/mkatom.c
	modified:   src/mkcell.c
	modified:   src/mkkey.c
	modified:   src/mkvdate.c
	modified:   src/mnwevent.c
	modified:   src/mnxmeth.c
	modified:   src/mouseif.c
	modified:   src/mvs.c
	modified:   src/ocr.c
	modified:   src/ocrproc.c
	modified:   src/oether.c
	modified:   src/oldeether.c
	modified:   src/optck.c
	modified:   src/osmsg.c
	modified:   src/perrno.c
	modified:   src/picture.c
	modified:   src/rawcolor.c
	modified:   src/rawrs232c.c
	modified:   src/return.c
	modified:   src/rpc.c
	modified:   src/rplcons.c
	modified:   src/rs232c.c
	modified:   src/setsout.c
	modified:   src/shift.c
	modified:   src/socdvr.c
	modified:   src/storage.c
	modified:   src/subr.c
	modified:   src/subr0374.c
	modified:   src/sxhash.c
	modified:   src/testdsp.c
	modified:   src/testtool.c
	modified:   src/timeoday.c
	modified:   src/timeofday.c
	modified:   src/timer.c
	modified:   src/truecolor.c
	modified:   src/tstsout.c
	modified:   src/tty.c
	modified:   src/typeof.c
	modified:   src/ubf1.c
	modified:   src/ubf2.c
	modified:   src/ubf3.c
	modified:   src/ufn.c
	modified:   src/ufs.c
	modified:   src/unixcomm.c
	modified:   src/unixfork.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/usrsubr.c
	modified:   src/uutils.c
	modified:   src/vars3.c
	modified:   src/vesafns.asm
	modified:   src/vesainit.c
	modified:   src/vgainit.c
	modified:   src/vmemsave.c
	modified:   src/xbbt.c
	modified:   src/xc.c
	modified:   src/xc.c.orig
	modified:   src/xcursor.c
	modified:   src/xinit.c
	modified:   src/xlspwin.c
	modified:   src/xmkicon.c
	modified:   src/xrdopt.c
	modified:   src/xscroll.c
	modified:   src/xwinman.c
	modified:   src/z2.c
2020-08-11 18:39:45 -07:00

525 lines
16 KiB
C
Executable File

/* $Id: mnxdefs.h,v 1.2 1999/01/03 02:06:17 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
/************************************************************************/
/* */
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
/* All Rights Reserved. */
/* Manufactured in the United States of America. */
/* */
/************************************************************************/
#ifdef XTK
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Box.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Label.h>
#include <X11/Xmu/Converters.h>
#include <X11/Xaw/Scrollbar.h>
#endif /* XTK */
typedef void (*PFV)(); /* Pointer to Function returning Void */
typedef int (*PFI)(); /* Pointer to Function returning Int */
typedef char (*PFC)(); /* Pointer to Function returning Char */
typedef float (*PFF)(); /* Pointer to Function returning Float */
typedef int (*PFP)(); /* Pointer to Function returning a Pointer */
typedef unsigned long (*PFUL)(); /* Pointer to Function returning an unsigned long */
typedef struct {
int x;
int y;
int width;
int height;
} MRegion;
typedef struct {
int x;
int y;
} MPoint,
MPosition;
typedef struct {
unsigned left:1;
unsigned middle:1;
unsigned right:1;
unsigned nil:28;
} MButton;
typedef union
{
struct {
PFI InitW; /* Initialize a window */
PFI Openw;
PFI Closew;
PFI MoveW;
PFI ShapeW;
PFI TotopW;
PFI BuryW;
PFI ShrinkW;
PFI ExpandW;
PFI DestroyW; /* Finalize a window */
PFI GCIndicator;
PFI Query;
PFI DestroyMe; /* Finalize self */
PFI MakePromptW;
PFI BBTtoWin; /* Bitblt cases lisp -> native window, */
PFI BBTfromWin; /* native window -> lisp bitmap */
PFI BBTWinWin; /* native window -> native window */
PFI GetWindowProp;
PFI PutWindowProp;
PFI GrabPointer;
PFI UngrabPointer;
PFI DrawBox;
PFI MovePointer;
PFI MouseConfirm;
PFI SetCursor;
} Method;
PFI vector[ 25 ];
} DisplayDispatchTableRec, *DisplayDispatchTable;
typedef union
{
struct {
PFI CloseFn;
PFI XPosition;
PFI YPosItion;
PFI Font;
PFI FontCreate;
PFI StringWidth;
PFI CharWidth;
PFI CharWidthY;
PFI LeftMargin;
PFI RightMargin;
PFI TopMargin;
PFI BottomMargin;
PFI ClippingRegion;
PFI PushState;
PFI PopState;
PFI DefaultState;
PFI Scale;
PFI Scale2;
PFI Translate;
PFI Rotate;
PFI Color;
PFI BackColor;
PFI Operation;
PFI MoveTo;
PFI Reset;
PFI NewPage;
PFI LineFeed;
PFI TerPri;
PFI ScaleFactor;
PFI OutcharFn;
PFI CharSet;
PFI DrawPoint;
PFI DrawLine;
PFI DrawCurve;
PFI DrawCircle;
PFI DrawElips;
PFI DrawPolygon;
PFI FillPolygon;
PFI FillCircle;
PFI DrawArc;
PFI BltShade;
PFI BitBlt;
PFI ScaledBitBlt;
PFI WritePixel;
PFI BitmapSize;
PFI Offsets;
} Method;
PFI vector[ 44 ];
} ImageOpDispatchTableRec, *ImageOpDispatchTable;
typedef struct wifrec
{
int error; /* Place to save error number for diagnosis */
MRegion windowreg; /* The position Lisp thinks the window is in, LISP coordinates! */
MRegion topregion; /* The toplevel widget's size. */
MRegion outerregion; /* The window's outer size. */
MRegion innerregion; /* The window's inner size. */
MRegion extent; /* The extent of the whole window. */
int whiteborder; /* The white border of the window. */
int blackborder2;
Window blackframe; /* The black part of the windowframe */
Window handle; /* The actual X window for displaying things */
Pixmap backing; /* Pixmap to store window image / temp results */
GC ReplaceGC; /* GC for operations in REPLACE mode */
GC InvertGC; /* GC for operations in INVERT mode */
GC PaintGC1; /* Gc #1 for operations in PAINT mode */
GC PaintGC2; /* GC #2 for operations in PAINT mode */
GC EraseGC1; /* GC #1 for operations in ERASE mode */
GC EraseGC2; /* GC #2 for operations in ERASE mode */
GC gc; /* GC for random use */
/* Window Methods */
ImageOpDispatchTable Dispatch;
LispPTR MedleyWindow; /* The Lisp WINDOW this corresponds to */
LispPTR MedleyScreen; /* The Lisp SCREEN this corresponds to */
Screen *screen; /* The X screen this uses */
int depth; /* Depth of the window */
int op; /* current OP of window (0 = replace, etc) */
int xoffset; /* X offset, from the stream */
int yoffset; /* Y offset, from the stream */
LispPTR FGcolor; /* Foreground color (fixp or bitmap for fill ops) */
LispPTR BGcolor; /* Background color (fixp or bitmap for fill ops) */
Pixmap fgpixmap; /* These two slots are caches to make sure that */
Pixmap bgpixmap; /* the pixmaps in them a) stay around till they */
/* are needed, and (b) get garbage collected */
unsigned not_exposed:1; /* T if next Expose should decache SAVE bitmap */
unsigned moving:1; /* T if lisp MOVEW called, so ignore X event */
unsigned reshaping:1; /* T if lisp SHAPEW called, so ignore X event */
unsigned scrollfn:1; /* T if we have a scrollfn */
unsigned noscrollbars:1; /* T if windowprop NOSCROLLBARS is set. */
unsigned open:1; /* T if this window is open; NIL if not */
unsigned move_pend:1; /* T if we moved this window while closed */
unsigned shape_pend:1; /* T if we reshaped this window while closed */
unsigned nil:24; /* space for future flags */
struct wifrec *next; /* Thread all windows on this screen */
Window parent; /* The parent window of this window */
struct dspifrec *dspif; /* the dspif for this window */
#ifdef XTK
Widget topwidget; /* The hold on the widget of this window */
Widget formwidget;
Widget framewidget; /* The widget to represent the frame */
Widget windowwidget; /* The white region of the window */
char gstring[32]; /* A string to hold geometry strings in. */
#endif /*XTK */
} WindowInterfaceRec, *WindowInterface;
/******************************************************/
/* */
/* D S P I N T E R F A C E R E C */
/* */
/* Display-interface record: The interface from */
/* Medley to the X display for a given Medley- */
/* Native-Windows screen. */
/* */
/******************************************************/
typedef struct dspifrec
{
int error; /* A generic errornumber */
Display *handle; /* The X Display this dspif describes */
Mask DisableEventMask;
Mask EnableEventMask;
XImage image; /* The scratch image structure (used in blt'ing) */
XImage tmpimage; /* The tmp image (used for depth conversion) */
GC TitleGC; /* The gc for title blitting. */
DisplayDispatchTableRec Dispatch; /* The methods for the display */
ImageOpDispatchTableRec ImageOp;
LispPTR screen; /* The lisp SCREEN this display corresponds to */
Screen *xscreen; /* The X screen we're on on this display */
Window root; /* The root window for this screen */
Cursor cursor; /* The cursor in effect on this screen */
int black; /* black pixel for this screen */
int white; /* white pixel for this screen */
int width; /* Width of the screen, in pixels */
int height; /* Height of the screen, in pixels */
int depth; /* SCDEPTH for this screen -- Medley's view */
WindowInterface CreatedWifs; /* A list of all windows on this screen */
WindowInterface promptw; /* The PROMPTWINDOW for this screen */
#ifdef XTK
XtAppContext xtcontext; /* The application context for this display */
#endif /*XTK */
int bw_plane; /* plane-mask for the plane that distinguishes B & W */
int bw_inverted; /* T if B & W are backwards from Lisp */
GC PixRGC; /* GC for blt'ing FROM window in REPLACE mode */
GC PixPGC; /* GC for blt'ing FROM window in PAINT mode */
GC PixIGC; /* GC for blt'ing FROM window in INVERT mode */
GC PixEGC; /* GC for blt'ing FROM window in ERASE mode */
GC BoxingGC; /* GC for drawing boxes on full screen */
Widget gcindicator;
Widget legatewidget;
} DspInterfaceRec, *DspInterface;
#ifdef NEVER
/******************************************/
/* The Legate window structure is a */
/* WindowInterfaceRec with some stuff on */
/* the tail end of the record. This is */
/* to be viewed as the subclassing of the */
/* ordinary WindowInterfaceRec. */
/******************************************/
typedef struct
{
WindowInterfaceRec promptw; /* The prompt window. */
Widget barwidget; /* A place to hold the bar widgets. */
Widget gcindicator; /* The garbage collector status window */
Widget menuwindow; /* The background popup menu window */
} LegateWindowInterfaceRec, *LegateWindowInterface;
#endif /* NEVER */
typedef struct{
LispPTR SCONOFF;
LispPTR SCDESTINATION;
LispPTR SCWIDTH;
LispPTR SCHEIGHT;
LispPTR SCTOPW;
LispPTR SCTOPWDS;
LispPTR SCTITLEDS;
LispPTR SCFDEV;
LispPTR SCDS;
LispPTR SCDATA;
DspInterface NativeIf;
#ifdef THIRTYTWOBITS
int junk;
#endif /* BITS */
LispPTR NATIVE_INFO;
LispPTR NATIVETYPE;
LispPTR WINIMAGEOPS;
LispPTR WINFDEV;
LispPTR CREATEWFN;
LispPTR OPENWFN;
LispPTR CLOSEWFN;
LispPTR MOVEWFN;
LispPTR RELMOVEWFN;
LispPTR SHRINKWFN;
LispPTR EXPANDWFN;
LispPTR SHAPEWFN;
LispPTR REDISPLAYFN;
LispPTR GETWINDOWPROPFN;
LispPTR SETWINDOWPROPFN;
LispPTR BURYWFN;
LispPTR TOTOPWFN;
LispPTR IMPORTWFN;
LispPTR EXPORTWFN;
LispPTR DESTROYFN;
LispPTR SETCURSORFN;
LispPTR PROMPTW;
LispPTR SHOWGCFN;
LispPTR DSPCREATEFN;
LispPTR BBTTOWIN;
LispPTR BBTFROMWIN;
LispPTR BBTWINWIN;
LispPTR SCCURSOR;
LispPTR SCKEYBOARD;
LispPTR SCDEPTH;
} MedleyScreenRec, *MedleyScreen;
typedef struct{
LispPTR DSP;
LispPTR NEXTW;
LispPTR SAVE;
LispPTR REG;
LispPTR BUTTONEVENTFN;
LispPTR RIGHTBUTTONFN;
LispPTR CURSORINFN;
LispPTR CURSOROUTFN;
LispPTR CURSORMOVEFN;
LispPTR REPAINTFN;
LispPTR RESHAPEFN;
LispPTR EXTENT;
LispPTR USERDATA;
LispPTR VERTSCROLLREG;
LispPTR HORIZSCROLLREG;
LispPTR SCROLLFN;
LispPTR VERTSCROLLWINDOW;
LispPTR HORIZSCROLLWINDOW;
LispPTR CLOSEFN;
LispPTR MOVEFN;
LispPTR WTITLE;
LispPTR NEWREGION;
LispPTR WBORDER; /* Assumed to allways be a SMALLP */
LispPTR PROCESS;
LispPTR WINDOWENTRYFN;
LispPTR SCREEN;
WindowInterface NativeIf;
#ifdef THIRTYTWOBITS
int junk1;
#endif /* THIRTYTWOBITS */
LispPTR MISCNATIVE;
#ifdef THIRTYTWOBITS
int junk2;
#endif /* THIRTYTWOBITS */
LispPTR NATIVE_P1;
} MedleyWindowRec, *MedleyWindow;
typedef LispPTR *LispArgs;
typedef struct WinList
{
struct WinList *prior;
struct WinList *next;
WindowInterfaceRec *thiswin;
} winlist;
/* Structure that defines an entry in the ring buffer of MNW events */
/* This uses the same ring-buffer scheme as keyboard codes do */
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
int pad[4]; /* Ad hoc fields to be able to access slots by */
/* position in the struct rather than name. */
} MNWAnyEvent,
MNWCloseEvent,
MNWFocusEvent,
MNWFocusInEvent,
MNWFocusOutEvent,
MNWToTopEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
MPosition pos;
} MNWMoveEvent,
MNWPointerMotionEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
MRegion reg;
} MNWReshapeEvent,
MNWShapeReqEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
MPosition pos;
MButton button;
} MNWButtonEvent,
MNWButtonDownEvent,
MNWButtonUpEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
MPosition pos;
MButton button;
} MNWMouseEvent,
MNWMouseInEvent,
MNWMouseOutEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
int dx;
int dy;
} MNWScrollReqEvent;
typedef struct {
LispPTR screen; /* lisp SCREEN this event happened for */
LispPTR window; /* lisp WINDOW this event happened for */
int event; /* What kind of event this is (see defs below for code) */
float xpercent;
float ypercent;
} MNWJumpScrollReqEvent;
typedef union mnwevenT
{
MNWAnyEvent Any;
MNWCloseEvent Close;
MNWFocusEvent Focus;
MNWFocusInEvent FocusBegin;
MNWFocusOutEvent FocusEnd;
MNWToTopEvent Top;
MNWMoveEvent Move;
MNWReshapeEvent Reshape;
MNWShapeReqEvent ShapeReq;
MNWButtonEvent Button;
MNWButtonDownEvent ButtonDown;
MNWButtonUpEvent ButtonUp;
MNWMouseEvent Mouse;
MNWMouseInEvent MouseIn;
MNWMouseOutEvent MouseOut;
MNWScrollReqEvent ScrollReq;
MNWJumpScrollReqEvent JumpScrollReq;
} MNWEvent;
#define MNWClose 1
#define MNWMove 2
#define MNWReshape 3 /* This window was reshaped */
#define MNWFocusIn 4 /* Focus moved into this window */
#define MNWFocusOut 5 /* Focus moved out of this window */
#define MNWButton 6
#define MNWButtonUp 7
#define MNWMouseIn 8
#define MNWMouseOut 9 /* Mouse moved out of this window */
#define MNWToTop 10 /* This window brought to top */
#define MNWShapeReq 11 /* Window mgr asked to reshape this window */
#define MNWScrollReq 12 /* Window widget asked for incremental scroll. */
#define MNWScrollJmpReq 13 /* Window widget asked for jmp scroll. */
#define MNWPointerMotion 14
#define MINMNWEVENT 2 /* allow 2 words for the ring buffer */
#define MNWEVENTSIZE ((sizeof(MNWEvent)+1)>>1)
#define MAXMNWEVENT (MINMNWEVENT + (100* MNWEVENTSIZE))
#define MNWTitle 0
#define MNWScrollFn 1
#define MNWNoScrollbars 2
#define MNWScrollExtent 3
#define MNWScrollExtentUse 4
#define MNWBorder 5
#define REPLACE 0 /* Operations for BITBLT, etc, as they come from lisp */
#define PAINT 1
#define INVERT 2
#define ERASE 3
/***************************************************/
/* Macros for dealing with pointer complexity. */
/***************************************************/
/***************************************************/
/* The argument for all these macros is a LispPTR */
/* to a Medley window structure. */
/* The result of the calculation is a C pointer. */
/***************************************************/
#define Cptr(LADDR) Addr68k_from_LADDR(LADDR)
#define WIfFromMw(win) (((MedleyWindow)Cptr(win))->NativeIf)
#define ScrnFromMw(win) ((MedleyScreenRec *)Cptr(((MedleyWindow)Cptr(win))->SCREEN))
#define DspstreamFromMw(win) ((Stream *)Cptr(((MedleyWindow)Cptr(win))->DSP))
#define ImDataFromMw(win) ((DISPLAYDATA *)Cptr(DspstreamFromMw(win)->IMAGEDATA))
#define MScrFromMw(win) ((MedleyScreen)Cptr(((MedleyWindow)Cptr(win))->SCREEN))
#define TitleDSFromMw(win) ((Stream *)Cptr(MScrFromMw(win)->SCTITLEDS))
#define TitleDDFromMw(win) ((DISPLAYDATA *)Cptr(TitleDSFromMw(win)->IMAGEDATA))
#define DspIfFromMw(win) (MScrFromMw(win)->NativeIf)
#define XDisplayFromMw(win) (DspIfFromMw(win)->handle)
#define XWindowFromMw(win) (WIfFromMw(win)->handle)
#define DspIfFromMscr(scr) (((MedleyScreen)Cptr(scr))->NativeIf)
#ifndef max
#define max( a, b ) (((a)>(b))?(a):(b))
#endif /* max */
#ifndef min
#define min( a, b ) (((a)<(b))?(a):(b))
#endif /* min */