libevdevxx 0.5.0
A C++ wrapper for libevdev.
Loading...
Searching...
No Matches
Uinput Class Reference

A class to send events to a virtual device. More...

#include <Uinput.hpp>

Public Member Functions

 Uinput (std::nullptr_t p=nullptr) noexcept
 
 Uinput (const Device &dev, int fd=LIBEVDEV_UINPUT_OPEN_MANAGED)
 
 ~Uinput () noexcept
 
 Uinput (Uinput &&other) noexcept
 Move constructor.
 
Uinputoperator= (Uinput &&other) noexcept
 Move assignment.
 
void create (const Device &dev, int fd=LIBEVDEV_UINPUT_OPEN_MANAGED)
 
void destroy () noexcept override
 
int get_fd () const noexcept
 
std::filesystem::path get_syspath () const
 
std::optional< std::filesystem::path > try_get_syspath () const
 
std::filesystem::path get_devnode () const
 
std::optional< std::filesystem::path > try_get_devnode () const
 
void write (Type type, Code code, int value)
 
void write (TypeCode type_code, int value)
 
void write (const Event &event)
 
void write_syn (Code code, int value)
 
void write_key (Code code, int value)
 
void write_rel (Code code, int value)
 
void write_abs (Code code, int value)
 
void write_msc (Code code, int value)
 
void write_sw (Code code, int value)
 
void write_led (Code code, int value)
 
void write_snd (Code code, int value)
 
void write_rep (Code code, int value)
 
void write_ff (Code code, int value)
 
void write_pwr (Code code, int value)
 
void write_ff_status (Code code, int value)
 
void flush ()
 
- Public Member Functions inherited from basic_wrapper< libevdev_uinput * >
constexpr basic_wrapper () noexcept=default
 
constexpr basic_wrapper (libevdev_uinput *src) noexcept
 
constexpr basic_wrapper (basic_wrapper &&other) noexcept
 Move constructor.
 
basic_wrapperoperator= (basic_wrapper &&other) noexcept
 Move assignment.
 
bool is_valid () const noexcept
 
 operator bool () const noexcept
 
raw_type data () noexcept
 
const raw_type data () const noexcept
 
void acquire (state_type new_state) noexcept
 
state_type release () noexcept
 
constexpr basic_wrapper () noexcept=default
 
constexpr basic_wrapper (libevdev_uinput *src) noexcept
 
constexpr basic_wrapper (basic_wrapper &&other) noexcept
 Move constructor.
 
basic_wrapperoperator= (basic_wrapper &&other) noexcept
 Move assignment.
 
bool is_valid () const noexcept
 
 operator bool () const noexcept
 
raw_type data () noexcept
 
const raw_type data () const noexcept
 
void acquire (state_type new_state) noexcept
 
state_type release () noexcept
 

Additional Inherited Members

- Public Types inherited from basic_wrapper< libevdev_uinput * >
using raw_type
 
using state_type
 
- Static Public Attributes inherited from basic_wrapper< libevdev_uinput * >
static constexpr raw_type invalid_value
 
static constexpr raw_type invalid_value
 
- Protected Member Functions inherited from basic_wrapper< libevdev_uinput * >
 ~basic_wrapper () noexcept=default
 
 ~basic_wrapper () noexcept=default
 
- Protected Attributes inherited from basic_wrapper< libevdev_uinput * >
libevdev_uinput * raw
 
libevdev_uinput * raw
 

Detailed Description

A class to send events to a virtual device.

Constructor & Destructor Documentation

◆ Uinput() [1/3]

Uinput ( std::nullptr_t p = nullptr)
noexcept

◆ Uinput() [2/3]

Uinput ( const Device & dev,
int fd = LIBEVDEV_UINPUT_OPEN_MANAGED )

◆ ~Uinput()

~Uinput ( )
noexcept

◆ Uinput() [3/3]

Uinput ( Uinput && other)
noexcept

Move constructor.

Member Function Documentation

◆ create()

void create ( const Device & dev,
int fd = LIBEVDEV_UINPUT_OPEN_MANAGED )

◆ destroy()

void destroy ( )
overridevirtualnoexcept

◆ flush()

void flush ( )

◆ get_devnode()

std::filesystem::path get_devnode ( ) const

◆ get_fd()

int get_fd ( ) const
noexcept

◆ get_syspath()

std::filesystem::path get_syspath ( ) const

◆ operator=()

Uinput & operator= ( Uinput && other)
noexcept

Move assignment.

◆ try_get_devnode()

std::optional< std::filesystem::path > try_get_devnode ( ) const

◆ try_get_syspath()

std::optional< std::filesystem::path > try_get_syspath ( ) const

◆ write() [1/3]

void write ( const Event & event)

◆ write() [2/3]

void write ( Type type,
Code code,
int value )

◆ write() [3/3]

void write ( TypeCode type_code,
int value )

◆ write_abs()

void write_abs ( Code code,
int value )

◆ write_ff()

void write_ff ( Code code,
int value )

◆ write_ff_status()

void write_ff_status ( Code code,
int value )

◆ write_key()

void write_key ( Code code,
int value )

◆ write_led()

void write_led ( Code code,
int value )

◆ write_msc()

void write_msc ( Code code,
int value )

◆ write_pwr()

void write_pwr ( Code code,
int value )

◆ write_rel()

void write_rel ( Code code,
int value )

◆ write_rep()

void write_rep ( Code code,
int value )

◆ write_snd()

void write_snd ( Code code,
int value )

◆ write_sw()

void write_sw ( Code code,
int value )

◆ write_syn()

void write_syn ( Code code,
int value )

The documentation for this class was generated from the following file: