wut  v1.7.0
Wii U Toolchain
nsyskbd.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wut.h>
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 typedef struct WUT_PACKED KBDAttachEvent {
10  uint8_t channel;
11  WUT_PADDING_BYTES(3);
13 WUT_CHECK_OFFSET(KBDAttachEvent, 0x00, channel);
14 WUT_CHECK_SIZE(KBDAttachEvent, 0x04);
15 
16 typedef struct WUT_PACKED KBDKeyEvent {
17  uint8_t channel;
18  uint8_t hidCode;
19  WUT_PADDING_BYTES(2);
21  WUT_UNKNOWN_BYTES(4);
22  uint16_t asUTF16Character;
23  WUT_PADDING_BYTES(2);
25 WUT_CHECK_OFFSET(KBDKeyEvent, 0x00, channel);
26 WUT_CHECK_OFFSET(KBDKeyEvent, 0x01, hidCode);
27 WUT_CHECK_OFFSET(KBDKeyEvent, 0x04, isPressedDown);
28 WUT_CHECK_OFFSET(KBDKeyEvent, 0x0C, asUTF16Character);
29 WUT_CHECK_SIZE(KBDKeyEvent, 0x10);
30 
31 typedef void (*KDBAttachCallback)(KBDAttachEvent *channel);
32 
33 typedef void (*KDBKeyCallback)(KBDKeyEvent *event);
34 
35 typedef enum KDBCountry {
56 
57 typedef enum KDBError {
63 
65 KBDInit(uint32_t unused,
66  KDBAttachCallback attachCallback,
67  KDBAttachCallback detachCallback,
68  KDBKeyCallback keyCallback);
69 
71 KBDSetup(KDBAttachCallback attachCallback,
72  KDBAttachCallback detachCallback,
73  KDBKeyCallback keyCallback);
74 
77 
79 KBDSetCountry(uint8_t channel,
80  KDBCountry country);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
KDBError KBDSetup(KDBAttachCallback attachCallback, KDBAttachCallback detachCallback, KDBKeyCallback keyCallback)
KDBError KBDTeardown()
void(* KDBKeyCallback)(KBDKeyEvent *event)
Definition: nsyskbd.h:33
void(* KDBAttachCallback)(KBDAttachEvent *channel)
Definition: nsyskbd.h:31
KDBError
Definition: nsyskbd.h:57
@ KDB_ERROR_NONE
Definition: nsyskbd.h:58
@ KDB_ERROR_NOT_INITIALIZED
Definition: nsyskbd.h:59
@ KDB_ERROR_INVALID_COUNTRY
Definition: nsyskbd.h:61
@ KDB_ERROR_ALREADY_INITIALIZED
Definition: nsyskbd.h:60
KDBError KBDInit(uint32_t unused, KDBAttachCallback attachCallback, KDBAttachCallback detachCallback, KDBKeyCallback keyCallback)
uint8_t channel
Definition: nsyskbd.h:10
struct KBDAttachEvent KBDAttachEvent
struct KBDKeyEvent KBDKeyEvent
uint8_t hidCode
Definition: nsyskbd.h:18
KDBError KBDSetCountry(uint8_t channel, KDBCountry country)
uint16_t asUTF16Character
Definition: nsyskbd.h:21
BOOL isPressedDown
Definition: nsyskbd.h:19
KDBCountry
Definition: nsyskbd.h:35
@ KDB_COUNTRY_UNKNOWN_11
Definition: nsyskbd.h:47
@ KDB_COUNTRY_UNKNOWN_17
Definition: nsyskbd.h:53
@ KDB_COUNTRY_UNKNOWN_7
Definition: nsyskbd.h:43
@ KDB_COUNTRY_UNKNOWN_9
Definition: nsyskbd.h:45
@ KDB_COUNTRY_UNKNOWN_6
Definition: nsyskbd.h:42
@ KDB_COUNTRY_UNKNOWN_8
Definition: nsyskbd.h:44
@ KDB_COUNTRY_UNKNOWN_14
Definition: nsyskbd.h:50
@ KDB_COUNTRY_UNKNOWN_16
Definition: nsyskbd.h:52
@ KDB_COUNTRY_UNKNOWN_15
Definition: nsyskbd.h:51
@ KDB_COUNTRY_UNKNOWN_3
Definition: nsyskbd.h:39
@ KDB_COUNTRY_UNKNOWN_4
Definition: nsyskbd.h:40
@ KDB_COUNTRY_UNKNOWN_12
Definition: nsyskbd.h:48
@ KDB_COUNTRY_UNKNOWN_1
Definition: nsyskbd.h:37
@ KDB_COUNTRY_UNKNOWN_5
Definition: nsyskbd.h:41
@ KDB_COUNTRY_UNKNOWN_13
Definition: nsyskbd.h:49
@ KDB_COUNTRY_UNKNOWN_10
Definition: nsyskbd.h:46
@ KDB_COUNTRY_UNKNOWN_0
Definition: nsyskbd.h:36
@ KDB_COUNTRY_UNKNOWN_2
Definition: nsyskbd.h:38
@ KDB_COUNTRY_UNKNOWN_18
Definition: nsyskbd.h:54
int32_t BOOL
Definition: wut_types.h:7