mouse.h revision fd9cb95cbb2f626355a60efb9d02c5f0a33c10e6
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
#ifndef _SYS_MOUSE_H
#define _SYS_MOUSE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define BUTCHNGMASK 0x38
#define MOVEMENT 0x40
#define BUTSTATMASK 7
#define BUT3STAT 1
#define BUT2STAT 2
#define BUT1STAT 4
#define BUT3CHNG 8
#define BUT2CHNG 0x10
#define BUT1CHNG 0x20
struct mse_event {
/* bit 0 clear if right button pushed; */
/* bit 1 clear if middle button pushed; */
/* bit 2 clear if left button pushed; */
char x; /* delta x movement (mouse motion only) */
char y; /* delta y movement (mouse motion only) */
};
#define MSE_BUTTON 0
#define MSE_MOTION 1
struct mouseinfo {
unsigned char status;
};
/* Ioctl Command definitions */
#define VPC_MOUSE_READ MOUSEIOCREAD
#define UPPERLIM 127
#define LOWERLIM -128
struct cmd_320 {
int cmd;
int arg1;
int arg2;
int arg3;
};
/*
* AT&T 320 (PS/2 style) Mouse Commands
*/
/*
* 320 mouse 8042 controller commands and flags
*/
/*
* Begin Carrol touch screen-specific definitions.
*/
/*
* Calibration data structure. Used with TS_CALIB ioctl to register the upper
* left opto-coordinate that corresponds to the upper left corner of the active
* video area, and the lower right opto-coordinate that corresponds to the
* lower right corner of the active video area.
*/
struct ts_calib {
int c_ulx, /* upper left X opto-coordinate of active video area */
c_uly, /* upper left Y opto-coordinate of active video area */
c_lrx, /* lower right X opto-coordinate of active video area */
c_lry; /* lower right Y opto-coordinate of active video area */
};
/*
* Position cursor at the given "pixel" coordinate.
*/
struct ts_curpos {
int p_xpos, /* X cursor coordinate */
p_ypos; /* Y cursor coordinate */
};
/*
* End Carrol touch screen-specific definitions.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MOUSE_H */