[unix-pc.general] Who handles Shift-Print...

lenny@icus.islp.ny.us (Lenny Tropiano) (03/24/89)

In article <724@kosman.UUCP> kevin@kosman.UUCP (Root) writes:
[...lots of discussion about what does Shift-Print do, and screen printing...]
..
|>So the questions I still have some interest in:
|>
|>1) Who (what program) is listening to Shift-Print, and if it's not
|>	the kernel, how does it get connected to Shift-Print.
|>
This is taken from the window(7) manual page:

ioctl(wd, WIOCSYS, num)
ioctl(wd, WIOCGSYS, num)

   The WIOCSYS ioctl declares window wd to be a system window number num.
   WIOCGSYS return the process group associated with an existing system 
   window number num.  There are currently three system windows.  Each 
   system window "owns" a number of keys on the keyboard, regardless of 
   the currently selected window.  If one of these keys is struck, it is
   queued for reads in the appropriate system window and is not sent to the
   currently active one.  No other action is taken (specifically, the
   system window is not selected).  The following table lists the special
   system keys:

	SYSWMGR(0)	Window Manager
		Suspd, s-Suspd, Rsume, s-Rsume, s-Print
	SYSPMGR(1)	Phone Manager
		All shifted function keys (F1-F8)
	SYSSMGR(2)	Status Manager
		Msg, s-Msg

|>2) What program actually executes the ioctl, and if not the same as
|>	the answer to 1), how does it get started.
|>
Therefore, in a long winded paragraph, the Window Manager has the
responsibility of taking care of the s-Print key.  When read, it invokes
/usr/bin/sprint to handle the screen dump.  wmgr is started from
the system /etc/rc file on bootup.

|>3) What starts the progam sprint, and what are its calling parameters.
|>	What are the expected inputs and outputs of sprint.
|>
See above.  I beleive sprint requires no parameters.  It just dumps the 
screen to the default printer.

|>4) Does sprint invoke /bin/lp directly, or does it have its own way
|>	into the print queues.  The snapshots I took did not show
|>	/bin/lp running when sprint was running, so I wonder about
|>	this.
|>
I believe it invokes lp with the following command:
"lp -d<PRINTER> -ascreenprint /tmp/sprint.tmp"  And /tmp/sprint.tmp is
the screen dump image gotten from the ioctl(wd, WIOCREAD, &pixmap) ...

-Lenny
-- 
Lenny Tropiano             ICUS Software Systems         [w] +1 (516) 582-5525
lenny@icus.islp.ny.us      Telex; 154232428 ICUS         [h] +1 (516) 968-8576
{talcott,decuac,boulder,hombre,pacbell,sbcs}!icus!lenny  attmail!icus!lenny
        ICUS Software Systems -- PO Box 1; Islip Terrace, NY  11752