wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
im.h
Go to the documentation of this file.
1#pragma once
2#include <wut.h>
3#include <coreinit/ios.h>
4
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct IMRequest IMRequest;
20typedef uint32_t IMEventMask;
21
30
40
41struct WUT_PACKED IMRequest
42{
43 uint8_t args[0x80];
44 IOSVec ioctlVecs[2];
46 int32_t request;
49 void *copySrc;
50 void *copyDst;
51 uint32_t copySize;
52};
53WUT_CHECK_OFFSET(IMRequest, 0x80, ioctlVecs);
54WUT_CHECK_OFFSET(IMRequest, 0x98, handle);
55WUT_CHECK_OFFSET(IMRequest, 0x9C, request);
56WUT_CHECK_OFFSET(IMRequest, 0xA0, asyncCallback);
57WUT_CHECK_OFFSET(IMRequest, 0xA4, asyncCallbackContext);
58WUT_CHECK_OFFSET(IMRequest, 0xA8, copySrc);
59WUT_CHECK_OFFSET(IMRequest, 0xAC, copyDst);
60WUT_CHECK_OFFSET(IMRequest, 0xB0, copySize);
61WUT_CHECK_SIZE(IMRequest, 0xB4);
62
64{
68 int32_t index;
69};
70WUT_CHECK_OFFSET(IMHomeButtonParams, 0x0, type);
71WUT_CHECK_OFFSET(IMHomeButtonParams, 0x4, index);
72WUT_CHECK_SIZE(IMHomeButtonParams, 0x8);
73
75{
76 uint32_t resetEnabled;
77 uint32_t dimEnabled;
78 uint32_t dimPeriod;
79 uint32_t apdEnabled;
80 uint32_t apdPeriod;
81};
82WUT_CHECK_OFFSET(IMParameters, 0x00, resetEnabled);
83WUT_CHECK_OFFSET(IMParameters, 0x04, dimEnabled);
84WUT_CHECK_OFFSET(IMParameters, 0x08, dimPeriod);
85WUT_CHECK_OFFSET(IMParameters, 0x0C, apdEnabled);
86WUT_CHECK_OFFSET(IMParameters, 0x10, apdPeriod);
87WUT_CHECK_SIZE(IMParameters, 0x14);
88
94WUT_CHECK_OFFSET(IMDeviceStateEx, 0x0, state);
95WUT_CHECK_OFFSET(IMDeviceStateEx, 0x4, params);
96WUT_CHECK_SIZE(IMDeviceStateEx, 0xC);
97
113
119
138
141
144
147 IMRequest *request,
148 IMHomeButtonParams *output,
149 IOSAsyncCallbackFn asyncCallback,
150 void *asyncCallbackContext);
151
154 IMRequest *request,
155 IMParameter parameter,
156 uint32_t *output,
157 IOSAsyncCallbackFn asyncCallback,
158 void *asyncCallbackContext);
159
162
165 IMRequest *request,
166 IMParameter parameter,
167 uint32_t *output,
168 IOSAsyncCallbackFn asyncCallback,
169 void *asyncCallbackContext);
170
173 uint32_t *outValue);
174
177 uint32_t *outValue);
178
181 IMRequest *request,
182 IMTimer timer,
183 uint32_t *output,
184 IOSAsyncCallbackFn asyncCallback,
185 void *asyncCallbackContext);
186
189 uint32_t *outSeconds);
190
193 IMRequest *request,
194 IMParameter parameter,
195 uint32_t value,
196 IOSAsyncCallbackFn asyncCallback,
197 void *asyncCallbackContext);
198
201 uint32_t value);
202
205 IMRequest *request,
206 IMEventMask *event,
207 IOSAsyncCallbackFn asyncCallback,
208 void *asyncCallbackContext);
209
212 IMRequest *request,
213 IOSAsyncCallbackFn asyncCallback,
214 void *asyncCallbackContext);
215
218 IMRequest *request,
219 IMDeviceState state,
220 IOSAsyncCallbackFn asyncCallback,
221 void *asyncCallbackContext);
222
225 IMRequest *request,
226 IMDeviceStateEx *state,
227 IOSAsyncCallbackFn asyncCallback,
228 void *asyncCallbackContext);
229
230#ifdef __cplusplus
231}
232#endif
233
uint32_t apdPeriod
Definition im.h:80
void * copySrc
Definition im.h:49
uint32_t dimEnabled
Definition im.h:77
IOSAsyncCallbackFn asyncCallback
Definition im.h:47
void * asyncCallbackContext
Definition im.h:48
void * copyDst
Definition im.h:50
uint32_t dimPeriod
Definition im.h:78
IMHomeButtonParams params
Definition im.h:92
uint32_t copySize
Definition im.h:51
IMDeviceState state
Definition im.h:91
IOSHandle handle
Definition im.h:45
uint32_t apdEnabled
Definition im.h:79
IMPadType type
The controller type which pressed the home button.
Definition im.h:66
int32_t index
The controller index which pressed the home button.
Definition im.h:68
int32_t request
Definition im.h:46
uint32_t resetEnabled
Definition im.h:76
IOSError IM_SetRuntimeParameter(IMParameter parameter, uint32_t value)
IOSError IM_GetNvParameter(IOSHandle handle, IMRequest *request, IMParameter parameter, uint32_t *output, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IOSError IM_GetHomeButtonParams(IOSHandle handle, IMRequest *request, IMHomeButtonParams *output, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IOSError IM_SetDeviceStateEx(IOSHandle handle, IMRequest *request, IMDeviceStateEx *state, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IMTimer
Definition im.h:115
IOSError IM_GetNvParameterWithoutHandleAndItb(IMParameter parameter, uint32_t *outValue)
IOSHandle IM_Open(void)
IOSError IM_GetParameters(IMParameters *parameters)
IOSError IM_GetRuntimeParameter(IMParameter parameter, uint32_t *outValue)
IOSError IM_SetParameter(IOSHandle handle, IMRequest *request, IMParameter parameter, uint32_t value, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IOSError IM_CancelGetEventNotify(IOSHandle handle, IMRequest *request, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
uint32_t IMEventMask
Definition im.h:20
IOSError IM_GetTimerRemainingSeconds(IMTimer timer, uint32_t *outSeconds)
IOSError IM_GetParameter(IOSHandle handle, IMRequest *request, IMParameter parameter, uint32_t *output, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IOSError IM_SetDeviceState(IOSHandle handle, IMRequest *request, IMDeviceState state, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IMPadType
Definition im.h:23
IMParameter
Definition im.h:99
IOSError IM_GetTimerRemaining(IOSHandle handle, IMRequest *request, IMTimer timer, uint32_t *output, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IMEvent
Definition im.h:121
IMDeviceState
Definition im.h:32
IOSError IM_GetEventNotify(IOSHandle handle, IMRequest *request, IMEventMask *event, IOSAsyncCallbackFn asyncCallback, void *asyncCallbackContext)
IOSError IM_Close(IOSHandle handle)
@ IM_TIMER_APD
Definition im.h:117
@ IM_TIMER_DIM
Definition im.h:116
@ IM_PAD_TYPE_WII_REMOTE
Definition im.h:25
@ IM_PAD_TYPE_WIIU_PRO_CONTROLLER
Definition im.h:26
@ IM_PAD_TYPE_NONE
Definition im.h:24
@ IM_PAD_TYPE_WII_REMOTE_EXTENSION
Definition im.h:27
@ IM_PAD_TYPE_WIIU_GAMEPAD
Definition im.h:28
@ IM_PARAMETER_APD_OCCURED
Definition im.h:108
@ IM_PARAMETER_APD_PERIOD
Definition im.h:104
@ IM_PARAMETER_DIM_ENABLE_TV
Definition im.h:109
@ IM_PARAMETER_INACTIVE_SECONDS
Definition im.h:100
@ IM_PARAMETER_DIM_PERIOD
Definition im.h:102
@ IM_PARAMETER_DIM_ENABLE_DRC
Definition im.h:110
@ IM_PARAMETER_APD_ENABLED
Definition im.h:103
@ IM_PARAMETER_POWER_OFF_ENABLE
Definition im.h:107
@ IM_PARAMETER_MAX
Definition im.h:111
@ IM_PARAMETER_RESET_SECONDS
Definition im.h:106
@ IM_PARAMETER_DIM_ENABLED
Definition im.h:101
@ IM_PARAMETER_RESET_ENABLE
Definition im.h:105
@ IM_EVENT_CANCELLED
Event notify was cancelled.
Definition im.h:136
@ IM_EVENT_POWER
Controller power button was pressed.
Definition im.h:129
@ IM_EVENT_DIM
Definition im.h:124
@ IM_EVENT_SYNC
Console sync button was pressed.
Definition im.h:133
@ IM_EVENT_APD
Automatic power down.
Definition im.h:127
@ IM_EVENT_UNDIM
Definition im.h:125
@ IM_EVENT_HOME
Home button was pressed.
Definition im.h:131
@ IM_EVENT_RESET
Definition im.h:134
@ IM_EVENT_INACTIVE
Definition im.h:123
@ IM_EVENT_ACTIVE
Definition im.h:122
@ IM_DEVICE_STATE_POWER
Definition im.h:37
@ IM_DEVICE_STATE_SYNC
Definition im.h:38
@ IM_DEVICE_STATE_HOME
Definition im.h:36
@ IM_DEVICE_STATE_CLEAR
Definition im.h:33
@ IM_DEVICE_STATE_INACTIVE
Definition im.h:34
@ IM_DEVICE_STATE_ACTIVE
Definition im.h:35
Definition im.h:42
IOSError
Definition ios.h:25
void(* IOSAsyncCallbackFn)(IOSError, void *)
Definition ios.h:87
int32_t IOSHandle
Definition ios.h:15
Definition ios.h:72