Files
wii-ipl/include/keyboard/tiTextInputBase.h
Devin AI 94e9a06c27 keyboard: tiHKBManager decomp iteration + header fixes
SetModifierState: evaluate LED-change as (old-new)|(new-old) value
GetVCode: compute state pointer inside switch cases, fold +0x14 into field offsets
SetLedCB: bit kept in callee reg, stack-layout residual tie
GetWChar: wchar_t local (u16 re-masking regressed)
Remaining diffs are count-equal register/scheduling ties

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-09-29 12:50:17 +00:00

94 lines
2.1 KiB
C++

#ifndef TEXTINPUT_BASE_H
#define TEXTINPUT_BASE_H
#include <revolution/types.h>
#include <revolution/mem/allocator.h>
#include <nw4r/ut/list.h>
namespace textinput {
typedef enum Language {
JP = 0,
USA,
UK,
FR,
DE,
IT,
SP,
NL,
CN,
KR,
LanguageEnd
} Language;
typedef enum Destination {
DST_JP = 0,
DST_US,
DST_EU,
DST_CN,
DST_KR,
DST_Last
} Destination;
typedef struct Scroll {
bool absY; // 0x00
f32 x; // 0x04
f32 y; // 0x08
} Scroll;
class Base {
public :
virtual ~Base() {}
virtual void create(MEMAllocator* allocator);
virtual void init();
};
class CommandSender;
class CommandReceiver : public Base {
public:
typedef enum INPUT_COMMAND {
IC_TRANSLATE_MODE = 6,
INPUT_COMMAND_0 = 0,
INPUT_COMMAND_37 = 37,
} INPUT_COMMAND;
typedef struct Scroll {
bool absY; // 0x00
f32 x; // 0x04
f32 y; // 0x08
} Scroll;
typedef struct ChangePredictMode {
u32 muLanguage; // 0x00
u8 mbPredictOn; // 0x04
} ChangePredictMode;
virtual void clearSender();
virtual void onCommand(INPUT_COMMAND command, void* data);
virtual void addSender(CommandSender* cmdSend);
private:
nw4r::ut::List mSenderList; // 0x04
};
class CommandSender : public Base {
public:
CommandSender() : mpCommandReceiver(NULL) {}
virtual void setCommandReceiver(CommandReceiver* cmdRecv);
virtual void sendCommand(u32, void*);
virtual void updateFromReceiver(u32, void*) {}
nw4r::ut::Link mLink; // 0x00
private:
CommandReceiver* mpCommandReceiver; // 0x08
};
}
#endif // TEXTINPUT_BASE_H