/* UNISRC_ID: %W% %E% */ /********************************************************************* * file: h/scrn/wmicom.h * part #: * internal sequence #: * * ************************************************************ * * "(c) Copyright Hewlett-Packard Company, 1984. All * * * rights are reserved. Copying or other reproduction * * * of this program except for archival purposes is * * * prohibited without the prior written consent of * * * Hewlett-Packard Company." * * ************************************************************ * * * This file contains definitions for common window managment protocols. * It contains defines, structure definitions and external definitions. * It must have scrn/smsysdep.h, sys/types.h (for tty.h), sys/tty.h, * scrn/disp.h, and scrn/wmcom.h included in front of it. * * Pisces Q-DOS project * Jon Brewster PCD * ---------------------------------------------------- * initial 4/4/83 * broke into two files - wmcom.h * for user programs and wmicom.h * for windows 8/23/83 * added defines for menu types jnp 1/19/84 * * $Log: /usr/src/uts.p/h/scrn/wmicom.h,v $ * Revision 2.12 84/09/25 15:07:16 karen * roll over to pebbles for Release 13 (update include files) * * Revision 2.11 84/09/24 21:47:28 karen * roll over to pebbles for Release 13 (clean up include files) * * Revision 2.10 84/08/20 13:07:56 karen * release 11 * * Revision 2.8 84/08/03 18:14:38 karen * add change flag to shared data * * Revision 2.7 84/07/30 21:45:35 karen * *** empty log message *** * * Revision 2.6 84/07/09 07:22:59 andreas * Modified ttcom and seq structures to aid in plot_table and * term_table shrinking. * * Revision 2.5 84/06/08 15:25:13 jon * move menu structure from wmicom.h to wmcom.h * * Revision 2.4 84/05/30 15:28:13 jon * syncronize with ,v * * Revision 2.3 84/04/12 12:28:29 jon * *** empty log message *** * * Revision 2.2 84/04/06 15:17:48 jon * This checkin just garentees that everything is in sync * * Revision 2.1 84/03/12 19:47:42 jon * Release 8 * * Revision 1.7 84/03/06 10:16:39 jon * bring up to date with 2/14/84 ers * * Revision 1.6 84/02/29 17:28:57 jon * changed buffer handeling to normal tty technology * * Revision 1.5 84/02/02 20:51:19 jon * Start using RCS log * * *********************************************************************/ #define BUFSIZE 256 #define NUM_KEYS 16 #define TRUE 1 #define FALSE 0 /********************************************************************* * * menu types * *********************************************************************/ #define USER_MENU 0 /* select user menu */ #define SYS_MENU 1 /* select system menu */ #define WIN_MENU 2 /* select window menu */ /* the following routines are used by non window control module code to syncronize the window manager. */ extern char *wmdata(); /* return pointer to window data */ extern int wmfstat(); /* set up display status without showing */ extern int wmgotkey(); /* window manager key interrupt */ extern int wmiclose(); /* reinitialize window */ extern int wminit(); /* init shared structure */ extern int wmioctl(); /* general window ioctl */ extern int wmmenuon(); /* cause the menu to turn on */ extern int wmmenuoff(); /* cause the menu to turn off */ extern int wmshow(); /* cause the window to be shown */ extern int wmsync(); /* allow non showing windows to update */ struct shared { char w_path[FILENAME_SIZE]; /* path name of window */ char *w_name; /* pointer into path simple name */ long w_minor; /* window minor device number */ short w_type; /* type of window */ short w_gen1; /* general purpose var */ short w_gen2; /* general purpose var */ short w_gen3; /* general purpose var */ short w_gen4; /* general purpose var */ unsigned short w_stat; /* window status */ short w_xloc; /* left edge of desired window */ short w_yloc; /* top of desired window */ short w_height; /* height of desired window */ short w_width; /* width of desired window */ short w_curxloc; /* current left edge of window */ short w_curyloc; /* current top of window */ short w_curheight; /* current height of window */ short w_curwidth; /* current width of window */ struct stat_data w_dstat; /* desired display status */ unsigned long mask; /* mouse interrupt mask */ unsigned long events; /* event occurence flags */ unsigned long lastevent; /* last event */ short counts[MAXEVENT+1]; /* event count history */ short xs[MAXEVENT+1]; /* event x locations */ short ys[MAXEVENT+1]; /* event y locations */ struct sprt_stat sprite; /* sprite image */ short curmtype; /* current menu type */ unsigned short asterisk; /* place asterisk in position 8 in label, one bit per key */ struct menu *win_menu; /* pointer to window specific menu */ struct menu user_menu; /* user softkey menu labels */ short w_pgrp; /* (struct proc *) last process to open window */ short change; /* window shape has been changed */ short fakecur; /* window has a fake cursor */ }; /* * seq - parser state machine transition table */ struct seq { unsigned char char1; /* lower end of character range */ unsigned char char2; /* upper end of character range */ unsigned char next_state; /* next state to enter */ unsigned char func_index; /* index to next runtime routine */ }; struct ttcom { struct tty tty; /* tty data structure */ PFI_t wioctl; /* pntr to win specific ioctl routine */ PFI_t eowcall; /* pntr to win spec end of write func */ PFI_t sorcall; /* pntr to win spec start of read func*/ PFI_t disp_func_call; /* pntr to win spec disp func routine */ char *table; /* parsing table */ PFI_t func_table; /* pointer to runtime func table */ bool_t disp_func; /* display functions flag */ struct shared sd; /* window manager data */ unsigned char in_char; /* input char. which is being parsed */ short current_state; /* current state in parsing machine */ int parm1; /* parameters */ int parm2; int parm3; int parm4; int frac1; /* number to divide by to get fraction*/ int frac2; int frac3; int frac4; int working_num; /* working number for entering parm */ int working_frac; /* working number for entering frac */ }; struct state_info { short nstate; int (*rtfunc)(); }; extern next_state(); extern parm1(); extern parm2(); extern parm3(); extern parm4(); extern set_frac(); extern clr_parm(); extern enter_num(); extern enter_min_num(); extern win_proc();