Article View: comp.windows.x.pex
Article #140Re: Problem with locator requests in PEX-SI. Any hints?
From: Matthias Pfuetzner
Date: Tue, 15 Sep 1992 14:45
Date: Tue, 15 Sep 1992 14:45
111 lines
4711 bytes
4711 bytes
Hi again!
In article <1498@igd.fhg.de> I wrote:
>I have a problem with the PEX-SI as supplied by X11R5 from MIT (I don't know,
>whether this might also be a problem with other PHIGS implementations, I only
>used this one). I'm running my application on SUN SparcStation 1+, displaying
>it on the X11R5-MIT server for this Sparcstation and on Tektronix XP29P. Both
>have the same behavior.
[some stuff deleted]
>The problem is quite simple: in x-dimension always values between 0 and 1000
>are recognized, even if echo_volume.x_min is set to 300! Even inquiry with
>pinq_loc_st3 returns that echo_volume is set to the above values and also
>realized to these values. Clicking beyond the x-pixel-value of 1000 doesn't do
>anything! The resulting values in loc_pos are 0 for x-pixel == 0 and 1 for
>x-pixel == 1000 (view_index 0 isn't used, so default values are taken). But no
>problems with the y-direction. This can be larger than 1000 pixels!
>
>Any hints?
Here a complete example:
----- cut ----- cut ----- cut ----- cut ----- cut ----- cut ----- cut -----
/* Build with:
cc -g -pipe -I/usr/include/X11 -DPEX_SI_PHIGS -target sun4 -c my_test1.c
cc -o my_test1 my_test1.o -g -pipe -lphigs -lXext -lX11 -lm
*/
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <X11/Xlib.h>
#include <phigs/phigs.h>
int ret_val;
Display *grafik_display;
Window grafik_window;
XSetWindowAttributes xswa;
Pint ws_type;
Pconnid_x_drawable conn;
Pxphigs_info xinfo;
Plimit3 echo_volume;
Ppoint3 init_loc_pos;
Ppoint3 loc_pos;
Ploc_data3 record;
Pin_status status;
Pint init_view_ind;
main()
{
grafik_display = XOpenDisplay( NULL );
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, NULL, ws_type );
pset_disp_upd_st( 1, PDEFER_WAIT, PMODE_UWOR );
init_loc_pos.x = .5;
init_loc_pos.y = .5;
init_loc_pos.z = .5;
echo_volume.x_min = 300.0;
echo_volume.x_max = (Pfloat)DisplayWidth( grafik_display,
DefaultScreen( grafik_display ) );
echo_volume.y_min = 0.0;
echo_volume.y_max = (Pfloat)DisplayHeight( grafik_display,
DefaultScreen( grafik_display ) );
echo_volume.z_min = 0.0;
echo_volume.z_max = 1.0;
pset_loc_mode( 1, 1, POP_REQ, PSWITCH_ECHO );
pinit_loc3( 1 , 1, 0, &init_loc_pos, 1, &echo_volume, &record );
while( TRUE )
{
preq_loc3( 1, 1, &status, &init_view_ind, &loc_pos );
fprintf( stderr, "Hallo!\n" );
}
ret_val = getchar();
pclose_ws( 1 );
pclose_phigs();
} /* main */
----- cut ----- cut ----- cut ----- cut ----- cut ----- cut ----- cut -----
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)
Technical Details
Message-ID:
<1508@igd.fhg.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!yale.edu!ira.uka.de!fhg!igd!pfuetzReferences:
<1498@igd.fhg.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!yale.edu!ira.uka.de!fhg!igd!pfuetz From: pfuetz@igd.fhg.de (Matthias Pfuetzner) Newsgroups: comp.windows.x.pex Subject: Re: Problem with locator requests in PEX-SI. Any hints? Message-ID: <1508@igd.fhg.de> Date: 15 Sep 92 14:45:12 GMT References: <1498@igd.fhg.de> Sender: news@igd.fhg.de Reply-To: pfuetz@igd.fhg.de (Matthias Pfuetzner) Followup-To: poster Organization: Zentrum fuer Graphische Datenverarbeitung, Darmstadt, FRG Lines: 111