--- Daodan/src/Patches/Input.h 2015/03/23 23:29:19 1017 +++ Daodan/src/Patches/Input.h 2021/10/24 02:50:48 1163 @@ -3,17 +3,21 @@ #include "../Daodan.h" -typedef uint32_t CustomActionCallbackArgument; - -typedef void (*CustomActionCallback_t) (CustomActionCallbackArgument argument); +typedef void (*DDtCustomActionCallback)(intptr_t ctx); typedef enum { - EVENT_KEYPRESS, - EVENT_KEYDOWN, -} ActionEventType_t; - -void Input_PatchCode (); - -void Input_RegisterCustomAction (const char* actionname, ActionEventType_t eventType, uint32_t keydownTimeoutTicks, CustomActionCallback_t callback, CustomActionCallbackArgument callbackArgument); + DDcEventType_KeyPress, + DDcEventType_KeyDown, +} DDtActionEventType; + +void DDrInput_RegisterCustomAction(const char *name, DDtActionEventType type, + DDtCustomActionCallback callback, + intptr_t ctx); +bool DDrInput_WindowProc(HWND window, UINT msg, WPARAM wparam, LPARAM lparam, + LRESULT* res); + +void DDrInput_PatchUtilityInput(void); +void DDrInput_PatchCustomActions(void); +void DDrInput_PatchDaodanInput(void); #endif