[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1674.0. "Mouse position doesn't work under VMS V5.3/DECW V2.0" by PILOU::MOSER (Finnair, s'thing special in the air...) Mon Nov 06 1989 03:54

	Since installing VMS V5.3 and DECwindows V2.0 I cannot get anymore
	back the mouse position and button select via SMG$ routines.
	This worked prior to DECW V2.0.

	SMG$READ_LOCATOR does a $QIOW with func=IO$_READVBLK!IO$M_EXTEND and
	sends an escape sequence and when you click the mouse button it gives
	you back the mouse position and which button you pressed.

	Basically you get back an escape sequence with 5 parameters (event,
	button, row, cloumn, page) separated by semi-colons ';' and some start/
	end characters. In DECW V2.0 I only get back 4 parameters and then the
	parsing routine in SMG$ fails.

	Does anybody know what has been changed ? Which driver is involved when
	pressing any mouse button ?

	I have a small macro test program which will demonstrate the behavior.
	Just compile, link and run it. Move the cursor anywhere in your current
	window and press any button...

	Thanks for any info/help/pointers	/cmos

	ps: test program after <FF>

	.title	smg_test
	.ident	'V1.0-001'

	.library	/sys$library:lib/

	$ssdef
	$trmdef
	$iodef


	.psect	data	pic,rd,wrt,noexe,long

fao_ctr:.ascid	/!8XL !8XL !8XL !8XL  !16AF/	; display result in hex/ascii
outlen:	.long	80				; output buffer descr
	.address outbuf
outbuf:	.blkb	80				; output buffer

term_mask:					; all keys are terminators
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff
	.long	^xffffffff

prompt:	.byte	27				; escape string for the mouse
	.ascii	/[2;2'z/
	.byte	27
	.ascii	/[0;1;3'{/

itmlst:	.word	0				; itemlist for $QIO
	.word	trm$_modifiers
	.long	<trm$m_tm_nofiltr!trm$m_tm_trmnoecho!trm$m_tm_norecall!trm$m_tm_escape!trm$m_tm_noedit>
	.long	0
	.word	^x20
	.word	trm$_term
	.address term_mask
	.long	0
	.word	^x10
	.word	trm$_prompt
	.address prompt
	.long	0
itmlst_len = .-itmlst

chan:	.blkw	1				; channel number 
iosb:	.blkq	1				; IO status block
buffer:	.blkb	16				; return buffer
buflen = .-buffer				; return buffer length
tt:	.ascid	/TT:/				; device name



	.psect	code	pic,rd,nowrt,exe,long	

	.entry	start,^m<>

	$assign_s -				; assign a channel to terminal
		chan=chan, -
		devnam=tt

;	jsb	g^ini$brk

	$qiow_s	-				; terminal IO to get mouse position
		chan=chan, -			; channel number
		func=#<io$_readvblk!io$m_extend>, -	; read with itemlist
		iosb=iosb, -			; addr of IO status block
		p1=buffer, -			; return buffer addr
		p2=#buflen, -			; return buffer length
		p5=#itmlst, -			; addr of item list
		p6=#itmlst_len			; length of itemlist
	blbc	r0,error			; branch on error
	movzwl	iosb,r0				; get IO status
	blbc	r0,error			; branch on error

	movaq	iosb,r2				; get addr of IO status block
	movzwl	6(r2),r3			; get length of return msg
	movab	buffer,r4			; get return buffer addr

	$fao_s	-				; format the string
		ctrstr=fao_ctr, -
		outlen=outlen, -
		outbuf=outlen, -
		p1=12(r4), -
		p2=8(r4), -
		p3=4(r4), -
		p4=(r4), -
		p5=r3, -
		p6=#buffer
	blbc	r0,error			; branch on error

	pushaq	outlen				; push output buffer descr
	calls	#1,g^lib$put_output		; display it
	blbc	r0,error			; branch on error

	movzwl	#ss$_normal,r0			; return success
	ret

error:	$exit_s	r0				; return status
	ret

	.end	start
    
    
T.RTitleUserPersonal
Name
DateLines
1674.1DECterm and SMG implemented to different specs, it seemsHANNAH::MESSENGERBob MessengerMon Nov 06 1989 12:0917
Re: .0

This is bad news.  According to the DECterm functional spec, DECterm is
correct to send only 4 parameters; the 5th parameter is the page number,
which defaults to page 1, and according to the spec, DECterm "will" omit the
parameter since it only has one page.  I think DECterm V1 actually sent
5 parameters, and I changed it in V2 to conform to the spec.

The trouble is, locator support hasn't been added to DEC STD 070 (Video
Systems Reference Manual) yet, so I'm not sure how the SMG developers
determined how to parse the locator report escape sequence.  Judging from
the DECterm spec, they should have been able to accept a report with 4
parameters.  In any case, the result of this confusion is that locator
reports won't work in SMG running in a DECterm window until either SMG or
DECterm is modified, which would have to be in a future version of VMS.

				-- Bob