The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file input.h
5
* @brief the input core: /dev/input, one stream of key, button, motion
6
* and wheel events from every input driver.
7
*
8
* drivers call input_report for each change and input_sync at the end of
9
* a group. each open of /dev/input has its own queue, so several programs
10
* can read the events; a reader that falls behind loses its oldest events
11
* and gets SYN_DROPPED.
12
*/
13
14
#include "
common/stdint.h
"
15
#include "
input_event.h
"
16
17
/**
18
* make /dev/input. call once, after device_registry_init.
19
*/
20
void
input_init
(
void
);
21
22
/**
23
* report one change. safe in an interrupt handler.
24
* @param type EV_KEY, EV_REL or EV_ABS.
25
* @param code the key, button or axis.
26
* @param value the new state or the change.
27
*/
28
void
input_report
(
uint16_t
type,
uint16_t
code,
int32_t
value);
29
30
/**
31
* end a group of events (EV_SYN / SYN_REPORT). safe in an interrupt
32
* handler.
33
*/
34
void
input_sync
(
void
);
35
36
/**
37
* true while a reader holds the keyboard (INPUT_IOC_GRAB): the keyboard
38
* driver then gives its keys only to /dev/input, not to the console.
39
*/
40
bool
input_keyboard_grabbed
(
void
);
stdint.h
input_init
void input_init(void)
make /dev/input.
Definition
input.c:273
input_sync
void input_sync(void)
end a group of events (EV_SYN / SYN_REPORT).
Definition
input.c:94
input_report
void input_report(uint16_t type, uint16_t code, int32_t value)
report one change.
Definition
input.c:89
input_keyboard_grabbed
bool input_keyboard_grabbed(void)
true while a reader holds the keyboard (INPUT_IOC_GRAB): the keyboard driver then gives its keys only...
Definition
input.c:99
input_event.h
the events of /dev/input (ABI).
uint16_t
unsigned short uint16_t
Definition
stdint.h:13
int32_t
int int32_t
Definition
stdint.h:14
src
kernel
input
input.h
Generated by
1.18.0