#ifndef lint
static char SccsCtrldefId[] = "%W%  %G%";
#endif

/* Module:	Control.def
 * Purpose:	Declare and initialize event loop and control parameters
 * Modified:	{0} Michael VanHilst	initial version		  19 May 1989
 *		{n} <who> -- <does what> -- <when>
 */
extern void open_imtool_connection();

struct controlRec control = {
  SOP,		/* int mode;		active event response mode */
  NULL,		/* int *response;	widget returned data pointer */
  0,		/* int eventmask;	current event mask */
  0,		/* int priority;	special event tracking mask */
  0,		/* int completed;	event response completed flag */
  1,		/* int verbose;		print-messages-about-statuses */
  1,		/* int tracking;	magnifier and color graph tracking */
  1,		/* int magni_track;	track mouse with magni box */
  1,		/* int coord_track;	track mouse with coord string */
  0,		/* int print_buttons;	include buttons in hardcopy output */
  IOP_PostScript, /* int printer;	PostScript, Imagen Impress, etc. */
  0,		/* int look_and_feel;	SAO, Motif, OpenLook */
  0,		/* int remote_connected; select for more than just X events */
  0,		/* int select_size;	size of mask to check for event */
  { 0 },	/* int select_mask[4];	combined select mask for connection */
  { 0 },	/* struct connectRec Xserver; */
  {		/*  struct connectRec IRAF_in; */
#ifdef VMS
   IOP_mailbox,	/* int type;		named pipe, socket, or VMS mailbox */
#else
   IOP_pipe,	/* int type;		named pipe, socket, or VMS mailbox */
#endif
   IOP_Imtool,	/* int protocol;	packet type (IRAF, AIPS, HRC, CMD) */
   0,		/* int fd;		file descriptor */
#ifdef IMTOOL
   1,		/* int open;		0 if closed, else open */
#else
   0,		/* int open;		0 if closed, else open */
#endif
   IOP_Read,	/* int direction;	read, write, read/write, listen */
   "/dev/imt1o", /* char *name;		pipe name or net socket address */
   0,		/* int address;		network address or parent fd */
#ifdef IMTOOL
   open_imtool_connection,	/* void func();	call to init */
#else
   NULL,	/* void func();		function to call when signalled */
#endif
   { 0 },	/* int mask[4];		mask bit for file descriptor */
   NULL, /* struct connectRec *next;	linklist queue for event handling */
   NULL	 /* struct connectRec *affiliate; binding for listener/connection */
  },
  {		/* struct connectRec IRAF_out; */
#ifdef VMS
   IOP_mailbox,	/* int type;		named pipe, socket, or VMS mailbox */
#else
   IOP_pipe,	/* int type;		named pipe, socket, or VMS mailbox */
#endif
   IOP_Imtool,	/* int protocol;	packet type (IRAF, AIPS, HRC, CMD) */
   0,		/* int fd;		file descriptor */
   0,		/* int open;		0 if closed, else open */
   IOP_Write,	/* int direction;	read, write, read/write, listen */
   "/dev/imt1i", /* char *name;		pipe name or net socket address */
   0,		/* int address;		network address or parent fd */
   NULL,	/* void (*func)();	function to call when signalled */
   { 0 },	/* int mask[4];		mask bit for file descriptor */
   NULL, /* struct connectRec *next;	linklist queue for event handling */
   NULL	 /* struct connectRec *affiliate; binding for listener/connection */
  },
  {		/* struct connectRec AIPS_in; */
#ifdef VMS
   IOP_mailbox,	/* int type;		named pipe, socket, or VMS mailbox */
#else
   IOP_socket,	/* int type;		named pipe, socket, or VMS mailbox */
#endif
   IOP_AIPS,	/* int protocol;	packet type (IRAF, AIPS, HRC, CMD) */
   0,		/* int fd;		file descriptor */
   0,		/* int open;		0 if closed, else open */
   IOP_ReadWrite, /* int direction;	read, write, read/write, listen */
   NULL,	/* char *name;		pipe name or net socket address */
   0,		/* int address;		network address or parent fd */
   NULL,	/* void (*func)();	function to call when signalled */
   { 0 },	/* int mask[4];		mask bit for file descriptor */
   NULL, /* struct connectRec *next;	linklist queue for event handling */
   NULL	 /* struct connectRec *affiliate; binding for listener/connection */
  },
  { 0 },	/* struct connectRec AIPS_out; */
  { 0 },	/* struct connectRec aux_in; */
  { 0 }		/* struct connectRec aux_out; */
		/* XEvent event;	info about most recent X event */
};

/* Note: the XEvent declaration is odd and best left to the compiler default */
