[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Include device/input.h in console-client
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Include device/input.h in console-client |
Date: |
Tue, 10 Jan 2023 22:20:19 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
I was expecting it :)
I'll wait a bit for the updated gnumach to get uploaded etc. before
commiting it.
Flavio Cruz, le lun. 09 janv. 2023 22:37:47 -0500, a ecrit:
> We avoid using repeated definitions and also update kd_event with the
> new 64bit compatible fields (rpc_time_value).
> ---
> console-client/mach-inputdev.h | 56 +---------------------------------
> 1 file changed, 1 insertion(+), 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 #.
> --
> 2.39.0
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.