Thread View: comp.windows.x.pex
2 messages
2 total messages
Started by Matthias Pfuetzner
Thu, 10 Sep 1992 14:54
Problem with locator requests in PEX-SI. Any hints?
Author: Matthias Pfuetzner
Date: Thu, 10 Sep 1992 14:54
Date: Thu, 10 Sep 1992 14:54
95 lines
4319 bytes
4319 bytes
Hi Everybody!
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.
The problem is as follows:
appl_display = XOpenDisplay( display_name );
xswa.backing_store = NotUseful;
xswa.event_mask = ExposureMask | StructureNotifyMask;
xswa.override_redirect = True;
visual.visualid = CopyFromParent;
appl_window =
XCreateWindow( appl_display,
RootWindow( appl_display, DefaultScreen( appl_display ) ),
0,
0,
DisplayWidth( appl_display,
DefaultScreen( appl_display ) ),
DisplayHeight( appl_display,
DefaultScreen( appl_display ) ),
(unsigned int)0,
DefaultDepth( appl_display,
DefaultScreen( appl_display ) ),
InputOutput,
&visual,
CWEventMask | CWBackingStore | CWBorderPixel |
CWOverrideRedirect,
&xswa );
XMapWindow( appl_display, appl_window );
XSync( appl_display, False );
XWindowEvent( appl_display, appl_window, ExposureMask, &exposureEvent );
conn.display = appl_display;
conn.drawable_id = appl_window;
xinfo.display = appl_display;
xinfo.flags.no_monitor = 0; /* False -> Monitor is running! */
xinfo.flags.force_client_SS = 0; /* False! */
popen_xphigs( NULL, 0, PXPHIGS_INFO_FLAGS_NO_MON |
PXPHIGS_INFO_FLAGS_CLIENT_SS |
PXPHIGS_INFO_DISPLAY, &xinfo );
popen_ws( WS1, (Pconnid)(&conn), phigs_ws_type_x_drawable );
/* some stuff for creating objects deleted */
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( appl_display,
DefaultScreen( appl_display ) );
echo_volume.y_min = 0.0;
echo_volume.y_max = (Pfloat) DisplayHeight( appl_display,
DefaultScreen( appl_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 );
preq_loc3( 1, 1, &status, &init_view_ind, &loc_pos );
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?
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)
Re: Problem with locator requests in PEX-SI. Any hints?
Author: 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)
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