Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!hropus!jrw From: jrw@hropus.UUCP (Jim Webb) Newsgroups: net.micro.att Subject: Re: 7300 shift print escape sequence Message-ID: <502@hropus.UUCP> Date: Fri, 13-Jun-86 20:24:07 EDT Article-I.D.: hropus.502 Posted: Fri Jun 13 20:24:07 1986 Date-Received: Tue, 17-Jun-86 22:48:46 EDT References: <886@hounx.UUCP> <495@hropus.UUCP> <1427@ihuxy.UUCP> Distribution: net.unix Organization: Bell Labs, Holmdel, NJ Lines: 58 > There is an ioctl() call to get an array filled with the screen's image. > There is, however, no indication of the layout of that array so dumping > it to a printer is a lost cause. If somebody can explain this layout, > then screen dumps can be done from a program... All of these ioctl's pertain to the BITMAP display, NOT ASCII terminals attached via the RS-232 or PHONE lines! Quoting window(7) of the PC UNIX 3.0 Admin's manual: ioctl(wd,WIOCREAD,&pixmap) This ioctl causes the pixel image of the entire display to be "dumped" into memory at pixmap. pixmap should be 15,660 unsigned shorts arranged as 348 rows each containing 45 unsigned shorts. The least significant bit of the first short in the array contains the upper-left-hand display pixel. So, on the PC, the screen is 348 x 720 pixels, which is exactly what the pixmap is (348 x sizeof (short) * 45). Therefore, all one would have to do is in their program, define an array unsigned short pixmap[348][45]; do the above ioctl, and then dump each "row" to a file preceded by whatever escape sequences are required by your printer to recognize bit maps. Now, if you want to get really fancy, their is another neat ioctl: ioctl(wd,WIOCSYS,num) This ioctl declares window wd to be system window num. There are currently three system windows. Each system window "owns" a number of the keys on the keyboard, and regardless of which window is currently selected, if one of these keys is pressed, it is queued up for reading on the system window: num=0: Window Manager Suspd, SHIFT-Suspd, Rsume, SHIFT-Rsume, *** SHIFT-Print *** num=1: Phone Manager all SHIFT-ed function keys num=2: Status Manager Msg, SHIFT-Msg So, I would imagine that you could throw away the functionality of the Status Manager for a while, and use the Msg keys to dump the screen to a different printer (read, not an epson) or file. I don't think you would want to change the window manager, though, otherwise it may (:-) be quite difficult to select another window. -- Jim Webb ihnp4!houxm!hropus!jrw