[comp.windows.x] xview -> NeWs

wrv@balr.com (Bill Vogel) (11/19/90)

I am using the OpenWindows Developers Guide to create a graphical
user interface, but I want to use postscript (NeWS) to do the
graphics work on the main drawing canvas.  How do you do it?
The devguide lets you select postscript as the imaging model for
the canvas, but I can't find any doc. on how to do this.  I know
how to open a connection to the NeWS side, but I don't know how
to send down the canvas id.

The repaint procedure (generated by devguide) looks like this:
void
repaint_graphics(pscanvas, newstoken, display, xid, rects)
        PScanvas        pscanvas;
        NeWStoken       newstoken;
        Display         *display;
        Window          xid;
        Xv_xrectlist    *rects;
{
        gmain_main_window_objects       *ip = (gmain_main_window_objects
*) xv_get(pscanvas, XV_KEY_DATA, INSTANCE);
        
        xv_set(pscanvas, PSCANVAS_CLIPRECTS, rects);
        pscanvas_flip();
        
        fprintf(stderr, "gmain: repaint_graphics\n");
}

I can't find any documentation on pscanvas_flip() which is really a cps
macro defined in pscan_ps.h.  There seem to be many useful calls
here, but there's no documentation.  Also, the canvas is created
as a PSCANVAS object, which I also can't find any documentation on,
although I've looked through the Devguide manual, the Vol 7 O'Reilly
manual, the openwindows Version 2: converting.... manual, and NeWS
manual.  The only place I haven't looked is the OpenLook Toolkit
Intrinsics manual.

Any help is much appreciated!

Bill Vogel

tomj@snowking.Eng.Sun.COM (Tom Jacobs) (11/21/90)

In article <1990Nov19.054303.26516@balr.com>, wrv@balr.com (Bill Vogel) writes:
|> I am using the OpenWindows Developers Guide to create a graphical
|> user interface, but I want to use postscript (NeWS) to do the
|> graphics work on the main drawing canvas.  How do you do it?
|> The devguide lets you select postscript as the imaging model for
|> the canvas, but I can't find any doc. on how to do this.  I know
|> how to open a connection to the NeWS side, but I don't know how
|> to send down the canvas id.
|> 
|> The repaint procedure (generated by devguide) looks like this:
|> void
|> repaint_graphics(pscanvas, newstoken, display, xid, rects)
|>         PScanvas        pscanvas;
|>         NeWStoken       newstoken;
|>         Display         *display;
|>         Window          xid;
|>         Xv_xrectlist    *rects;
|> {
|>         gmain_main_window_objects       *ip = (gmain_main_window_objects
|> *) xv_get(pscanvas, XV_KEY_DATA, INSTANCE);
|>         
|>         xv_set(pscanvas, PSCANVAS_CLIPRECTS, rects);
|>         pscanvas_flip();
|>         
|>         fprintf(stderr, "gmain: repaint_graphics\n");
|> }
|> 
|> I can't find any documentation on pscanvas_flip() which is really a cps
|> macro defined in pscan_ps.h.  There seem to be many useful calls
|> here, but there's no documentation.  Also, the canvas is created
|> as a PSCANVAS object, which I also can't find any documentation on,
|> although I've looked through the Devguide manual, the Vol 7 O'Reilly
|> manual, the openwindows Version 2: converting.... manual, and NeWS
|> manual.  The only place I haven't looked is the OpenLook Toolkit
|> Intrinsics manual.
|> 
|> Any help is much appreciated!
|> 
|> Bill Vogel

Apparently the PostScript (tm) online manual describing the XVPS extention
as accidently left off the OpenWindows V2 tapes... so I've placed a copy 
of the document on expo.lcs.mit.edu:/contrib/xvps.ps

  52 -rw-rw-rw-  1 ftp         52722 Nov 20 16:59 xvps.ps

---
Tom Jacobs				ARPA: tomj@Eng.Sun.com
Windows & Graphics Software		UUCP: sun!tomj
Sun Microsystems, Inc.

mh@roger.imsd.contel.com (Mike Hoegeman) (11/24/90)

In article <1990Nov19.054303.26516@balr.com> wrv@balr.com (Bill Vogel) writes:
 >I am using the OpenWindows Developers Guide to create a graphical
 >user interface, but I want to use postscript (NeWS) to do the
 >graphics work on the main drawing canvas.  How do you do it?
 >The devguide lets you select postscript as the imaging model for
 >the canvas, but I can't find any doc. on how to do this.  I know
 >how to open a connection to the NeWS side, but I don't know how
 >to send down the canvas id.
 >

If you have the PD xview 2.0 sources look in the lib/libxvps
directory.  There is a file called xvps.ps which is a postscript
documnet that can answer most of your questions.

-mike hoegeman, mh@roger.imsd.contel.com