idev.h revision 2eec67acbb00593e414549a7e5b35eb7dd776b1b
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright (C) 2014 David Herrmann <dh.herrmann@gmail.com>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
/*
* IDev
*/
#pragma once
#include <libudev.h>
#include <stdbool.h>
#include <systemd/sd-event.h>
#include <xkbcommon/xkbcommon.h>
typedef struct idev_data_evdev idev_data_evdev;
typedef struct idev_data_keyboard idev_data_keyboard;
typedef struct idev_event idev_event;
typedef struct idev_device idev_device;
typedef struct idev_session idev_session;
typedef struct idev_context idev_context;
/*
* Types
*/
enum {
};
enum {
};
/*
* Evdev Elements
*/
struct idev_data_evdev {
struct input_event event;
};
/*
* Keyboard Devices
*/
struct xkb_state;
enum {
};
enum {
};
struct idev_data_keyboard {
};
return false;
return false;
}
/*
* Data Packets
*/
enum {
};
struct idev_data {
unsigned int type;
bool resync : 1;
union {
};
};
/*
* Events
*/
enum {
};
struct idev_event {
unsigned int type;
union {
struct {
struct {
} device_data;
};
};
/*
* Devices
*/
void idev_device_enable(idev_device *d);
void idev_device_disable(idev_device *d);
/*
* Sessions
*/
enum {
IDEV_SESSION_CUSTOM = (1 << 0),
};
idev_context *c,
unsigned int flags,
const char *name,
void *userdata);
bool idev_session_is_enabled(idev_session *s);
void idev_session_enable(idev_session *s);
void idev_session_disable(idev_session *s);
/*
* Contexts
*/