neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::keyboard Class Reference

#include <keyboard.hpp>

Inheritance diagram for neogfx::keyboard:
neogfx::hid_device< i_keyboard > neolib::reference_counted< Base, DeallocateOnRelease >

Public Member Functions

 define_declared_event (KeyPressed, key_pressed, scan_code_e, key_code_e, key_modifiers_e) define_declared_event(KeyReleased
 
key_modifiers_e define_declared_event (TextInput, text_input, std::string const &) define_declared_event(SysTextInput
 
 keyboard (const i_string &aName=string{ "Generic Keyboard" })
 
key_modifiers_e event_modifiers () const override
 
void set_event_modifiers (key_modifiers_e aModifiers) override
 
void clear_event_modifiers () override
 
bool is_keyboard_grabbed () const override
 
bool is_keyboard_grabbed_by (i_keyboard_handler &aKeyboardHandler) const override
 
bool is_front_grabber (i_keyboard_handler &aKeyboardHandler) const override
 
void grab_keyboard (i_keyboard_handler &aKeyboardHandler) override
 
void ungrab_keyboard (i_keyboard_handler &aKeyboardHandler) override
 
i_keyboard_handlergrabber () const override
 
- Public Member Functions inherited from neogfx::hid_device< i_keyboard >
 define_declared_event (Enabled, enabled) define_declared_event(Disabled
 
 hid_device (hid_device_type aType, hid_device_class aClass, hid_device_subclass aSubclass, const hid_device_uuid &aProductId={}, const hid_device_uuid &aInstanceId={})
 
hid_device_type device_type () const override
 
hid_device_class device_class () const override
 
hid_device_subclass device_subclass () const override
 
hid_device_uuid product_id () const override
 
hid_device_uuid instance_id () const override
 
bool is_enabled () const override
 
void enable () override
 
void disable () override
 
const i_stringproduct_name () const override
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Public Attributes

 key_released
 
 scan_code_e
 
 key_code_e
 
key_modifiers_e sys_text_input
 

Additional Inherited Members

- Public Types inherited from neogfx::hid_device< i_keyboard >
typedef i_keyboard abstract_type
 

Detailed Description

Definition at line 44 of file keyboard.hpp.

Constructor & Destructor Documentation

◆ keyboard()

neogfx::keyboard::keyboard ( const i_string aName = string{ "Generic Keyboard" })

Member Function Documentation

◆ clear_event_modifiers()

void neogfx::keyboard::clear_event_modifiers ( )
override

◆ define_declared_event() [1/2]

neogfx::keyboard::define_declared_event ( KeyPressed  ,
key_pressed  ,
scan_code_e  ,
key_code_e  ,
key_modifiers_e   
)

◆ define_declared_event() [2/2]

key_modifiers_e neogfx::keyboard::define_declared_event ( TextInput  ,
text_input  ,
std::string const &   
)

◆ event_modifiers()

key_modifiers_e neogfx::keyboard::event_modifiers ( ) const
override

◆ grab_keyboard()

void neogfx::keyboard::grab_keyboard ( i_keyboard_handler aKeyboardHandler)
override

◆ grabber()

i_keyboard_handler & neogfx::keyboard::grabber ( ) const
override

◆ is_front_grabber()

bool neogfx::keyboard::is_front_grabber ( i_keyboard_handler aKeyboardHandler) const
override

◆ is_keyboard_grabbed()

bool neogfx::keyboard::is_keyboard_grabbed ( ) const
override

◆ is_keyboard_grabbed_by()

bool neogfx::keyboard::is_keyboard_grabbed_by ( i_keyboard_handler aKeyboardHandler) const
override

◆ set_event_modifiers()

void neogfx::keyboard::set_event_modifiers ( key_modifiers_e  aModifiers)
override

◆ ungrab_keyboard()

void neogfx::keyboard::ungrab_keyboard ( i_keyboard_handler aKeyboardHandler)
override

Member Data Documentation

◆ key_code_e

neogfx::keyboard::key_code_e

Definition at line 48 of file keyboard.hpp.

◆ key_released

neogfx::keyboard::key_released

Definition at line 48 of file keyboard.hpp.

◆ scan_code_e

neogfx::keyboard::scan_code_e

Definition at line 48 of file keyboard.hpp.

◆ sys_text_input

key_modifiers_e neogfx::keyboard::sys_text_input

Definition at line 50 of file keyboard.hpp.


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