xref: /onnv-gate/usr/src/uts/common/io/vuidmice/vuidmice.h (revision 9840:bff764ffad2c)
1*9840Sgdamore@opensolaris.org /*
2*9840Sgdamore@opensolaris.org  * CDDL HEADER START
3*9840Sgdamore@opensolaris.org  *
4*9840Sgdamore@opensolaris.org  * The contents of this file are subject to the terms of the
5*9840Sgdamore@opensolaris.org  * Common Development and Distribution License (the "License").
6*9840Sgdamore@opensolaris.org  * You may not use this file except in compliance with the License.
7*9840Sgdamore@opensolaris.org  *
8*9840Sgdamore@opensolaris.org  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9840Sgdamore@opensolaris.org  * or http://www.opensolaris.org/os/licensing.
10*9840Sgdamore@opensolaris.org  * See the License for the specific language governing permissions
11*9840Sgdamore@opensolaris.org  * and limitations under the License.
12*9840Sgdamore@opensolaris.org  *
13*9840Sgdamore@opensolaris.org  * When distributing Covered Code, include this CDDL HEADER in each
14*9840Sgdamore@opensolaris.org  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9840Sgdamore@opensolaris.org  * If applicable, add the following below this CDDL HEADER, with the
16*9840Sgdamore@opensolaris.org  * fields enclosed by brackets "[]" replaced with your own identifying
17*9840Sgdamore@opensolaris.org  * information: Portions Copyright [yyyy] [name of copyright owner]
18*9840Sgdamore@opensolaris.org  *
19*9840Sgdamore@opensolaris.org  * CDDL HEADER END
20*9840Sgdamore@opensolaris.org  */
21*9840Sgdamore@opensolaris.org /*
22*9840Sgdamore@opensolaris.org  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*9840Sgdamore@opensolaris.org  * Use is subject to license terms.
24*9840Sgdamore@opensolaris.org  */
25*9840Sgdamore@opensolaris.org 
26*9840Sgdamore@opensolaris.org #ifndef _VUIDMICE_H
27*9840Sgdamore@opensolaris.org #define	_VUIDMICE_H
28*9840Sgdamore@opensolaris.org 
29*9840Sgdamore@opensolaris.org #if _KERNEL
30*9840Sgdamore@opensolaris.org struct MouseStateInfo {
31*9840Sgdamore@opensolaris.org 	unsigned long	last_event_lbolt;
32*9840Sgdamore@opensolaris.org 	uchar_t		wheel_state_bf;
33*9840Sgdamore@opensolaris.org 	uchar_t		format;
34*9840Sgdamore@opensolaris.org 	uchar_t		state;
35*9840Sgdamore@opensolaris.org 	uchar_t		buttons;		/* current button state */
36*9840Sgdamore@opensolaris.org 	int		deltax;			/* delta X value */
37*9840Sgdamore@opensolaris.org 	int		deltay;			/* delta Y value */
38*9840Sgdamore@opensolaris.org 	int		vuid_mouse_mode;
39*9840Sgdamore@opensolaris.org 	uchar_t		oldbuttons;		/* previous button state */
40*9840Sgdamore@opensolaris.org 	uchar_t		sync_byte;
41*9840Sgdamore@opensolaris.org 	uchar_t		inited;
42*9840Sgdamore@opensolaris.org 	uchar_t		nbuttons;
43*9840Sgdamore@opensolaris.org 	timeout_id_t	init_tid;		/* used for initialization */
44*9840Sgdamore@opensolaris.org 	uchar_t		init_count;		/* track down init count */
45*9840Sgdamore@opensolaris.org };
46*9840Sgdamore@opensolaris.org 
47*9840Sgdamore@opensolaris.org typedef struct Mouse_iocstate {
48*9840Sgdamore@opensolaris.org 	int		ioc_state;
49*9840Sgdamore@opensolaris.org 	caddr_t		u_addr;
50*9840Sgdamore@opensolaris.org } Mouse_iocstate_t;
51*9840Sgdamore@opensolaris.org 
52*9840Sgdamore@opensolaris.org #define	STATEP		((struct MouseStateInfo *)qp->q_ptr)
53*9840Sgdamore@opensolaris.org #define	VUIDMICE_NUM_WHEELS		2
54*9840Sgdamore@opensolaris.org #define	VUIDMICE_VERTICAL_WHEEL_ID	0
55*9840Sgdamore@opensolaris.org #define	VUIDMICE_HORIZONTAL_WHEEL_ID	1
56*9840Sgdamore@opensolaris.org 
57*9840Sgdamore@opensolaris.org #ifdef	VUIDM3P
58*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuidm3p"
59*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuidm3p_putnext
60*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuidm3p
61*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuidm3p_open
62*9840Sgdamore@opensolaris.org #endif
63*9840Sgdamore@opensolaris.org 
64*9840Sgdamore@opensolaris.org #ifdef	VUIDM4P
65*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuidm4p"
66*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuidm4p_putnext
67*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuidm4p
68*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuidm4p_open
69*9840Sgdamore@opensolaris.org #endif
70*9840Sgdamore@opensolaris.org 
71*9840Sgdamore@opensolaris.org #ifdef	VUIDM5P
72*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuidm5p"
73*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuidm5p_putnext
74*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuidm5p
75*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuidm5p_open
76*9840Sgdamore@opensolaris.org #endif
77*9840Sgdamore@opensolaris.org 
78*9840Sgdamore@opensolaris.org #ifdef	VUID2PS2
79*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuid2ps2"
80*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuid2ps2_putnext
81*9840Sgdamore@opensolaris.org #define	VUID_INIT_TIMEOUT	vuid2ps2_init_timeout
82*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuid2ps2
83*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuid2ps2_open
84*9840Sgdamore@opensolaris.org #define	VUID_CLOSE		vuid2ps2_close
85*9840Sgdamore@opensolaris.org #endif
86*9840Sgdamore@opensolaris.org 
87*9840Sgdamore@opensolaris.org #ifdef	VUID3PS2
88*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuid3ps2"
89*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuid3ps2_putnext
90*9840Sgdamore@opensolaris.org #define	VUID_INIT_TIMEOUT	vuid3ps2_init_timeout
91*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuid3ps2
92*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuid3ps2_open
93*9840Sgdamore@opensolaris.org #define	VUID_CLOSE		vuid3ps2_close
94*9840Sgdamore@opensolaris.org #endif
95*9840Sgdamore@opensolaris.org 
96*9840Sgdamore@opensolaris.org #ifdef	VUIDPS2
97*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuidps2"
98*9840Sgdamore@opensolaris.org #define	VUID_PUTNEXT		vuidps2_putnext
99*9840Sgdamore@opensolaris.org #define	VUID_INIT_TIMEOUT	vuidps2_init_timeout
100*9840Sgdamore@opensolaris.org #define	VUID_QUEUE		vuidps2
101*9840Sgdamore@opensolaris.org #define	VUID_OPEN		vuidps2_open
102*9840Sgdamore@opensolaris.org #define	VUID_CLOSE		vuidps2_close
103*9840Sgdamore@opensolaris.org #endif
104*9840Sgdamore@opensolaris.org 
105*9840Sgdamore@opensolaris.org #ifndef	VUID_NAME
106*9840Sgdamore@opensolaris.org #define	VUID_NAME		"vuidmice"
107*9840Sgdamore@opensolaris.org #endif
108*9840Sgdamore@opensolaris.org 
109*9840Sgdamore@opensolaris.org #endif /* _KERNEL */
110*9840Sgdamore@opensolaris.org 
111*9840Sgdamore@opensolaris.org #endif /* _VUIDMICE_H */
112