libevdev
0.2
A wrapper library for evdev devices
Main Page
Modules
Files
File List
Globals
All
Files
Functions
Typedefs
Enumerations
Enumerator
Groups
libevdev
libevdev.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2013 Red Hat, Inc.
3
*
4
* Permission to use, copy, modify, distribute, and sell this software and its
5
* documentation for any purpose is hereby granted without fee, provided that
6
* the above copyright notice appear in all copies and that both that copyright
7
* notice and this permission notice appear in supporting documentation, and
8
* that the name of the copyright holders not be used in advertising or
9
* publicity pertaining to distribution of the software without specific,
10
* written prior permission. The copyright holders make no representations
11
* about the suitability of this software for any purpose. It is provided "as
12
* is" without express or implied warranty.
13
*
14
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20
* OF THIS SOFTWARE.
21
*/
22
23
#ifndef libevdev_H
24
#define libevdev_H
25
26
#include <linux/input.h>
27
#include <stdarg.h>
28
285
struct
libevdev;
286
287
enum
EvdevReadFlags
{
288
LIBEVDEV_READ_SYNC
= 1,
289
LIBEVDEV_READ_NORMAL
= 2,
290
LIBEVDEV_FORCE_SYNC
= 4,
293
LIBEVDEV_READ_BLOCKING
= 8,
294
};
295
310
struct
libevdev*
libevdev_new
(
void
);
311
334
int
libevdev_new_from_fd
(
int
fd,
struct
libevdev **dev);
335
346
void
libevdev_free
(
struct
libevdev *dev);
347
357
typedef
void (*
libevdev_log_func_t
)(
const
char
*format, va_list args);
358
369
void
libevdev_set_log_handler
(
struct
libevdev *dev,
libevdev_log_func_t
logfunc);
370
371
372
enum
EvdevGrabModes
{
373
LIBEVDEV_GRAB
= 3,
374
LIBEVDEV_UNGRAB
= 4,
375
};
376
393
int
libevdev_grab
(
struct
libevdev *dev,
int
grab);
394
418
int
libevdev_set_fd
(
struct
libevdev* dev,
int
fd);
419
440
int
libevdev_change_fd
(
struct
libevdev* dev,
int
fd);
441
448
int
libevdev_get_fd
(
const
struct
libevdev* dev);
449
483
int
libevdev_next_event
(
struct
libevdev *dev,
unsigned
int
flags,
struct
input_event *ev);
484
495
const
char
*
libevdev_get_name
(
const
struct
libevdev *dev);
496
508
const
char
*
libevdev_get_phys
(
const
struct
libevdev *dev);
509
519
const
char
*
libevdev_get_uniq
(
const
struct
libevdev *dev);
520
530
int
libevdev_get_product_id
(
const
struct
libevdev *dev);
531
541
int
libevdev_get_vendor_id
(
const
struct
libevdev *dev);
542
552
int
libevdev_get_bustype
(
const
struct
libevdev *dev);
553
563
int
libevdev_get_version
(
const
struct
libevdev *dev);
564
574
int
libevdev_get_driver_version
(
const
struct
libevdev *dev);
575
586
int
libevdev_has_property
(
const
struct
libevdev *dev,
unsigned
int
prop);
587
598
int
libevdev_has_event_type
(
const
struct
libevdev *dev,
unsigned
int
type);
599
611
int
libevdev_has_event_code
(
const
struct
libevdev *dev,
unsigned
int
type,
unsigned
int
code);
612
623
int
libevdev_get_abs_min
(
const
struct
libevdev *dev,
unsigned
int
code);
634
int
libevdev_get_abs_max
(
const
struct
libevdev *dev,
unsigned
int
code);
645
int
libevdev_get_abs_fuzz
(
const
struct
libevdev *dev,
unsigned
int
code);
656
int
libevdev_get_abs_flat
(
const
struct
libevdev *dev,
unsigned
int
code);
667
int
libevdev_get_abs_resolution
(
const
struct
libevdev *dev,
unsigned
int
code);
668
680
const
struct
input_absinfo*
libevdev_get_abs_info
(
const
struct
libevdev *dev,
unsigned
int
code);
681
700
int
libevdev_get_event_value
(
const
struct
libevdev *dev,
unsigned
int
type,
unsigned
int
code);
701
727
int
libevdev_fetch_event_value
(
const
struct
libevdev *dev,
unsigned
int
type,
unsigned
int
code,
int
*value);
728
749
int
libevdev_get_slot_value
(
const
struct
libevdev *dev,
unsigned
int
slot,
unsigned
int
code);
750
776
int
libevdev_fetch_slot_value
(
const
struct
libevdev *dev,
unsigned
int
slot,
unsigned
int
code,
int
*value);
777
791
int
libevdev_get_num_slots
(
const
struct
libevdev *dev);
792
806
int
libevdev_get_current_slot
(
const
struct
libevdev *dev);
807
825
int
libevdev_enable_event_type
(
struct
libevdev *dev,
unsigned
int
type);
826
852
int
libevdev_disable_event_type
(
struct
libevdev *dev,
unsigned
int
type);
853
881
int
libevdev_enable_event_code
(
struct
libevdev *dev,
unsigned
int
type,
unsigned
int
code,
const
void
*data);
882
910
int
libevdev_disable_event_code
(
struct
libevdev *dev,
unsigned
int
type,
unsigned
int
code);
911
926
int
libevdev_kernel_set_abs_value
(
struct
libevdev *dev,
unsigned
int
code,
const
struct
input_absinfo *abs);
927
946
int
libevdev_is_event_type
(
const
struct
input_event *ev,
unsigned
int
type);
947
968
int
libevdev_is_event_code
(
const
struct
input_event *ev,
unsigned
int
type,
unsigned
int
code);
969
981
const
char
*
libevdev_get_event_type_name
(
unsigned
int
type);
994
const
char
*
libevdev_get_event_code_name
(
unsigned
int
type,
unsigned
int
code);
995
1009
const
char
*
libevdev_get_input_prop_name
(
unsigned
int
prop);
1010
1023
int
libevdev_get_event_type_max
(
unsigned
int
type);
1024
1038
int
libevdev_get_repeat
(
struct
libevdev *dev,
int
*delay,
int
*period);
1039
1040
#endif
/* libevdev_H */
Generated on Mon Jul 22 2013 09:13:48 for libevdev by
1.8.3.1