Thread View: comp.windows.x.pex
1 messages
1 total messages
Started by Matthias Pfuetzner
Fri, 11 Sep 1992 13:46
Question concerning sunPHIGS and PEX-SI, open_ws, open_phigs calls
Author: Matthias Pfuetzner
Date: Fri, 11 Sep 1992 13:46
Date: Fri, 11 Sep 1992 13:46
105 lines
4954 bytes
4954 bytes
Hi Everybody!
I again have a question concerning PEX-SI as supplied with X11R5 from MIT and
sunPHIGS from SunSoft.
Is there a real difference between the two following codes, and if yes, what
are these?
CODE 1:
------------------------------------------------------------------------------
grafik_display = XOpenDisplay( display_name );
xswa.backing_store = NotUseful;
xswa.event_mask = ExposureMask | StructureNotifyMask;
xswa.override_redirect = True;
visual.visualid = CopyFromParent;
grafik_window =
XCreateWindow( grafik_display,
RootWindow( grafik_display,
DefaultScreen( grafik_display ) ),
0,
0,
DisplayWidth( grafik_display,
DefaultScreen( grafik_display ) ),
DisplayHeight( grafik_display,
DefaultScreen( grafik_display ) ),
(unsigned int)0,
DefaultDepth( grafik_display,
DefaultScreen( grafik_display ) ),
InputOutput,
&visual,
CWEventMask | CWBackingStore | CWBorderPixel |
CWOverrideRedirect,
&xswa );
XMapWindow( grafik_display, grafik_window );
XSync( grafik_display, False );
XWindowEvent( grafik_display, grafik_window, ExposureMask, &exposureEvent );
xinfo.display = grafik_display;
xinfo.flags.no_monitor = 0; /* False -> Monitor is running! */
popen_xphigs( NULL, 0, PXPHIGS_INFO_FLAGS_NO_MON |
PXPHIGS_INFO_DISPLAY, &xinfo );
conn.display = grafik_display;
conn.drawable_id = grafik_window;
popen_ws( 1, (Pconnid)(&conn), phigs_ws_type_x_drawable );
------------------------------------------------------------------------------
CODE 2:
------------------------------------------------------------------------------
grafik_display = XOpenDisplay( display_name );
xinfo.display = grafik_display;
popen_xphigs( NULL, 0, PXPHIGS_INFO_DISPLAY, &xinfo );
ws_type = phigs_ws_type_create( phigs_ws_type_x_tool,
(char *)PHIGS_TOOL_X,
(char *)0,
(char *)PHIGS_TOOL_Y,
(char *)0,
(char *)PHIGS_TOOL_WIDTH,
(char *)DisplayWidth( grafik_display,
DefaultScreen( grafik_display ) ),
(char *)PHIGS_TOOL_HEIGHT,
(char *)DisplayHeight( grafik_display,
DefaultScreen( grafik_display ) ),
(char *)PHIGS_TOOL_BORDER_WIDTH,
(char *)0,
(char *)0 );
popen_ws( 1, (char *)display_name, ws_type );
------------------------------------------------------------------------------
My questions in special:
1.) Which code is prefered? Why?
2.) In the case of code 2, why do I have to use XOpenDisplay explicitly for
retrieving an argument for popen_xphigs, when I later have to specify (in
popen_ws) the display_name again?
3.) In case of code 2, does the popen_ws call use the existing connection to
the server, or does it open the display again?
4.) In case of code 2, should I add the options PHIGS_X_DISPLAY and
PHIGS_X_DISPLAY_NAME to the list of attributes in phigs_ws_type_create?
Would this adding of attributes allow me to remove the "(char *)
display_name" argument from the call to popen_ws?
5.) Are there differences in performance and behavior? If yes, which and why?
Thanks in advance!
Sincerly,
Matthias
--
Matthias Pfuetzner | @work: +49 6151 155-150 | @home: +49 6151 75717
6100 Darmstadt, FRG | ZGDV, Wilhelminenstrasse 7 | Lichtenbergstrasse 73
pfuetzner@igd.fhg.de, pfuetzner@zgdvda.UUCP | Hans-Ulrich Klose sagte:
Wir pfeifen nicht nach ihrer Tanze... (09.09.92 in der Haushaltsdebatte)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads