home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
desqview
/
dvglue10.arc
/
TVPREAD.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-08-10
|
1KB
|
38 lines
/*================================================*/
/* TVPREAD.C */
/* */
/* (c) Copyright 1988 Ralf Brown */
/* All Rights Reserved */
/* May be freely copied for noncommercial use as */
/* long as this copyright notice is kept intact */
/* and any changes are indicated in the comment */
/* blocks for the functions */
/*================================================*/
#include <stdio.h>
#include "tvapi.h"
/*================================================*/
/* TVptr_read read next mouse message */
/* Ralf Brown 6/23/88 */
/* Ralf Brown 7/21/88 change to use proper msg */
/*================================================*/
int pascal TVptr_read(OBJECT ptr,POINTER_MSG *msg)
{
PARMLIST2 p ;
if (msg == NULL || !TVisobj(ptr))
return -1 ;
p.num_args = 0 ;
TVsendmsg(READ_MSG, TOS, ptr, (PARMLIST *)&p) ;
if ((int) p.arg[1] != 5)
return -1 ; /* wrong length on message */
msg->row = ((int far *)p.arg[0])[0] ;
msg->column = ((int far *)p.arg[0])[1] ;
msg->button_state = ((BYTE far *)p.arg[0])[4] ;
return 0 ; /* successful */
}
/* End of TVPREAD.C */