
    i"                        d Z ddlZddlZddlZddlZg dZ ej                  ej                  dd dg d      \  ZZes e	d        e
d       ereZd	ev Zd
Z ej                  e      ZerdZn2 e ej                               Zdj!                  ed   gedd       ZdZdZefdZ e e             Zes8 e	ddj!                  e      z  ej*                          ej                  d       dev rd eD        ZeZndev rd eD        ZeZej0                  j!                  e      Zeeesendgefz  Z e	ej5                                y)zQ
Generate a Python extension module with the constants defined in linux/input.h.
    N)z/usr/include/linux/input.hz&/usr/include/linux/input-event-codes.hz/usr/include/linux/uinput.h    )ecodesstubsreproduciblezAusage: genecodes.py [--ecodes|--stubs] [--reproducible] <headers>   )z--reproducibler   zX#define\s+((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)zhidden for reproducibility aE  
#include <Python.h>
#ifdef __FreeBSD__
#include <dev/evdev/input.h>
#include <dev/evdev/uinput.h>
#else
#include <linux/input.h>
#include <linux/uinput.h>
#endif

/* Automatically generated by evdev.genecodes */
/* Generated on   %s */
/* Generated from %s */

#define MODULE_NAME "_ecodes"
#define MODULE_HELP "linux/input.h macros"

static PyMethodDef MethodTable[] = {
    { NULL, NULL, 0, NULL}
};

static struct PyModuleDef moduledef = {
    PyModuleDef_HEAD_INIT,
    MODULE_NAME,
    MODULE_HELP,
    -1,          /* m_size */
    MethodTable, /* m_methods */
    NULL,        /* m_reload */
    NULL,        /* m_traverse */
    NULL,        /* m_clear */
    NULL,        /* m_free */
};

PyMODINIT_FUNC
PyInit__ecodes(void)
{
    PyObject* m = PyModule_Create(&moduledef);
    if (m == NULL) return NULL;

%s

    return m;
}
a  
# Automatically generated by evdev.genecodes
# Generated on %s
# Generated from %s

# pylint: skip-file

ecodes: dict[str, int]
keys: dict[int, str|list[str]]
bytype: dict[int, dict[int, str|list[str]]]

KEY: dict[int, str|list[str]]
ABS: dict[int, str|list[str]]
REL: dict[int, str|list[str]]
SW:  dict[int, str|list[str]]
MSC: dict[int, str|list[str]]
LED: dict[int, str|list[str]]
BTN: dict[int, str|list[str]]
REP: dict[int, str|list[str]]
SND: dict[int, str|list[str]]
ID:  dict[int, str|list[str]]
EV:  dict[int, str|list[str]]
BUS: dict[int, str|list[str]]
SYN: dict[int, str|list[str]]
FF_STATUS:     dict[int, str|list[str]]
FF_INPUT_PROP: dict[int, str|list[str]]

%s
c              #      K   | D ]@  }	 t        |      }|D ]-  }t        j	                  |      }|s|j                  d       / B y # t        t        f$ r Y Uw xY ww)Nr   )openIOErrorOSErrormacro_regexsearchgroup)headersheaderfhlinemacros        [/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/evdev/genecodes_c.pyparse_headersr   w   sm      	%	fB  	%D&&t,Ekk!n$	%	% ! 		s,   AA	AA	AAAAzno input macros found in: %s)file)z--ecodesr   c              #   &   K   | ]	  }d |z    yw)z     PyModule_AddIntMacro(m, %s);N .0r   s     r   	<genexpr>r      s     O5.6O   )z--stubsr   c              #   &   K   | ]	  }d |z    yw)z%s: intNr   r   s     r   r   r      s     6%I6r   )__doc__getoptosresysr   argvoptsargsprintexitr   r   compileunamelistjointemplate_ecodestemplate_stubsr   
all_macrosstderrbodytemplatelineseptextstripr       r   <module>r8      s{    	 	 
 V]]388AB<-PQ
d	
MNGG%- jbjj%(E EHHeAh+qr+,E+\> " 
% -/"
	
(388G+<
<3::NCHHQK tOJODH6:6DH	zzt5'<X;Y[_`` djjl r7   