Antkeeper
0.0.1
|
A virtual mouse which generates mouse-related input events. More...
#include <mouse.hpp>
Public Member Functions | |
void | press (mouse_button button) |
Simulates a mouse button press. More... | |
void | release (mouse_button button) |
Simulates a mouse button release. More... | |
void | move (const math::vec2< std::int32_t > &position, const math::vec2< std::int32_t > &difference) |
Simulates mouse movement. More... | |
void | scroll (const math::fvec2 &velocity) |
Simulates mouse scrolling. More... | |
const math::vec2< std::int32_t > & | get_position () const noexcept |
Returns the current mouse position, in pixels, relative to the window. More... | |
::event::channel< mouse_button_pressed_event > & | get_button_pressed_channel () noexcept |
Returns the channel through which mouse button pressed events are published. More... | |
::event::channel< mouse_button_released_event > & | get_button_released_channel () noexcept |
Returns the channel through which mouse button released events are published. More... | |
::event::channel< mouse_moved_event > & | get_moved_channel () noexcept |
Returns the channel through which mouse moved events are published. More... | |
::event::channel< mouse_scrolled_event > & | get_scrolled_channel () noexcept |
Returns the channel through which mouse scrolled events are published. More... | |
constexpr device_type | get_device_type () const noexcept override |
Returns device_type::mouse. More... | |
![]() | |
void | connect () |
Simulates the device being connected. More... | |
void | disconnect () |
Simulates the device being disconnected. More... | |
bool | is_connected () const noexcept |
Returns true if the device is currently connected. More... | |
void | set_uuid (const ::uuid &id) |
Sets the universally unique identifier (UUID) of this input device. More... | |
const ::uuid & | get_uuid () const noexcept |
Returns the universally unique identifier (UUID) of this input device. More... | |
::event::channel< device_connected_event > & | get_connected_channel () noexcept |
Returns the channel through which device connected events are published. More... | |
::event::channel< device_disconnected_event > & | get_disconnected_channel () noexcept |
Returns the channel through which device disconnected events are published. More... | |
A virtual mouse which generates mouse-related input events.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexproverridevirtualnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
void input::mouse::move | ( | const math::vec2< std::int32_t > & | position, |
const math::vec2< std::int32_t > & | difference | ||
) |
void input::mouse::press | ( | mouse_button | button | ) |
void input::mouse::release | ( | mouse_button | button | ) |
void input::mouse::scroll | ( | const math::fvec2 & | velocity | ) |