Compare commits

...

1 Commits

Author SHA1 Message Date
coah
6df9b94c43 Generate hardware keyboard vtable from C++ declarations 2026-10-01 19:57:48 -05:00
2 changed files with 3 additions and 24 deletions

View File

@@ -15,7 +15,7 @@ namespace textinput {
#endif
public:
HWKeyboard(Manager *);
#ifdef TIMANAGER_IMPLEMENTATION
#if defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
inline ~HWKeyboard();
#else
~HWKeyboard();
@@ -29,7 +29,7 @@ namespace textinput {
wchar_t convertWCCode(wchar_t code) const;
#endif
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
void updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
#else
virtual void updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);

View File

@@ -5,15 +5,7 @@
#include "keyboard/tiHKBManager.h"
#include "keyboard/tiLayoutGather.h"
extern "C" bool updateInput__Q49textinput8keyboard5hwkey10HWKeyboardFRQ39textinput5input10HKBManager();
extern "C" void __dt__Q49textinput8keyboard5hwkey10HWKeyboardFv();
extern "C" void create__Q29textinput4BaseFP12MEMAllocator();
extern "C" void init__Q49textinput8keyboard5hwkey10HWKeyboardFv();
extern "C" void setCommandReceiver__Q29textinput13CommandSenderFPQ29textinput15CommandReceiver();
extern "C" void sendCommand__Q29textinput13CommandSenderFUlPv();
extern "C" void updateFromReceiver__Q29textinput13CommandSenderFUlPv();
typedef void (*KeyboardDataFunction)();
namespace textinput {
@@ -481,20 +473,7 @@ const u8 controlKeys[] = {
return code;
}
#pragma push
#pragma section const_type ".data"
extern "C" KeyboardDataFunction const __vt__Q49textinput8keyboard5hwkey10HWKeyboard[9] = {
NULL,
NULL,
__dt__Q49textinput8keyboard5hwkey10HWKeyboardFv,
create__Q29textinput4BaseFP12MEMAllocator,
init__Q49textinput8keyboard5hwkey10HWKeyboardFv,
setCommandReceiver__Q29textinput13CommandSenderFPQ29textinput15CommandReceiver,
sendCommand__Q29textinput13CommandSenderFUlPv,
updateFromReceiver__Q29textinput13CommandSenderFUlPv,
reinterpret_cast<KeyboardDataFunction>(updateInput__Q49textinput8keyboard5hwkey10HWKeyboardFRQ39textinput5input10HKBManager)
};
#pragma pop
void HWKeyboard::setLanguage(Destination destination, Language language) {
if (destination == DST_EU) {