diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-01-09 22:37:47 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-09-09 00:11:47 +0200 |
commit | a698c6dafb63de4e69450b63ba7f4b71892c27e4 (patch) | |
tree | 5dfdbe88709e7ad7c17a3ecabd464be55af93dae | |
parent | bafa5e5de0fa1f7e718ebb26d992bfa9abb6711b (diff) | |
download | hurd-a698c6dafb63de4e69450b63ba7f4b71892c27e4.tar.gz hurd-a698c6dafb63de4e69450b63ba7f4b71892c27e4.tar.bz2 hurd-a698c6dafb63de4e69450b63ba7f4b71892c27e4.zip |
Include device/input.h in console-client
We avoid using repeated definitions and also update kd_event with the
new 64bit compatible fields (rpc_time_value).
Message-ID: <Y7zdiy1QtUz4RSY3@jupiter.tail36e24.ts.net>
-rw-r--r-- | console-client/mach-inputdev.h | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/console-client/mach-inputdev.h b/console-client/mach-inputdev.h index 985e1e1d..08119ad6 100644 --- a/console-client/mach-inputdev.h +++ b/console-client/mach-inputdev.h @@ -51,61 +51,7 @@ #define _INPUTDEV_H_ 1 #include <trans.h> - -typedef u_short kev_type; /* kd event type */ - -/* (used for event records) */ -struct mouse_motion { - short mm_deltaX; /* units? */ - short mm_deltaY; -}; -typedef u_char Scancode; - -typedef struct { - kev_type type; /* see below */ - struct timeval time; /* timestamp */ - union { /* value associated with event */ - boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ - Scancode sc; /* KEYBD_EVENT */ - struct mouse_motion mmotion; /* MOUSE_MOTION */ - } value; -} kd_event; -#define m_deltaX mmotion.mm_deltaX -#define m_deltaY mmotion.mm_deltaY - -/* - * kd_event ID's. - */ -#define MOUSE_LEFT 1 /* mouse left button up/down */ -#define MOUSE_MIDDLE 2 -#define MOUSE_RIGHT 3 -#define MOUSE_MOTION 4 /* mouse motion */ -#define KEYBD_EVENT 5 /* key up/down */ - - -#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000U /* copy in parameters */ - -#ifndef _IOC -#define _IOC(inout,group,num,len) \ - (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) -#endif -#ifndef _IOR -#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) -#endif -#ifndef _IOW -#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) -#endif - -#define KDSKBDMODE _IOW('K', 1, int) /* set keyboard mode */ -#define KB_EVENT 1 -#define KB_ASCII 2 - -#define KDGKBDTYPE _IOR('K', 2, int) /* get keyboard type */ -#define KB_VANILLAKB 0 - -#define KDSETLEDS _IOW('K', 5, int) /* set keyboard leds */ +#include <device/input.h> /* * Low 3 bits of minor are the com port #. |