| 3 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 4 |  | #include "../Daodan.h" | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 5 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 6 | < | typedef uint32_t CustomActionCallbackArgument; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 7 | < |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 8 | < | typedef void (*CustomActionCallback_t) (CustomActionCallbackArgument argument); | 
 
 
 
 
 
 
 
 
 | 6 | > | typedef void (*DDtCustomActionCallback)(intptr_t ctx); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 7 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 8 |  | typedef enum { | 
 
 
 
 
 
 
 
 
 
 
 | 9 | < | EVENT_KEYPRESS, | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 10 | < | EVENT_KEYDOWN, | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 11 | < | } ActionEventType_t; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 12 | < |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 13 | < | void Input_PatchCode (); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 14 | < |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 15 | < | void Input_RegisterCustomAction (const char* actionname, ActionEventType_t eventType, uint32_t keydownTimeoutTicks, CustomActionCallback_t callback, CustomActionCallbackArgument callbackArgument); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 9 | > | DDcEventType_KeyPress, | 
 
 
 
 
 | 10 | > | DDcEventType_KeyDown, | 
 
 
 
 
 | 11 | > | } DDtActionEventType; | 
 
 
 
 
 | 12 | > |  | 
 
 
 
 
 | 13 | > | void DDrInput_RegisterCustomAction(const char *name, DDtActionEventType type, | 
 
 
 
 
 | 14 | > | DDtCustomActionCallback callback, | 
 
 
 
 
 | 15 | > | intptr_t ctx); | 
 
 
 
 
 | 16 | > | bool DDrInput_WindowProc(HWND window, UINT msg, WPARAM wparam, LPARAM lparam, | 
 
 
 
 
 | 17 | > | LRESULT* res); | 
 
 
 
 
 | 18 | > |  | 
 
 
 
 
 | 19 | > | void DDrInput_PatchUtilityInput(void); | 
 
 
 
 
 | 20 | > | void DDrInput_PatchCustomActions(void); | 
 
 
 
 
 | 21 | > | void DDrInput_PatchDaodanInput(void); | 
 
 
 
 
 
 
 
 
 
 
 | 22 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 23 |  | #endif |