summaryrefslogtreecommitdiff
path: root/csrc
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2021-05-13 21:03:06 +0800
committerIru Cai <mytbk920423@gmail.com>2021-05-13 21:03:06 +0800
commite77e983754542a8b02ac7319655d7658284d6953 (patch)
treed17817613b954ebc6bcf3c47956400c9e833a1bb /csrc
parentbd375c48c12361120ef8891c24a0f804f693cfd3 (diff)
downloadrich4-e77e983754542a8b02ac7319655d7658284d6953.tar.xz
use window_util.c
Diffstat (limited to 'csrc')
-rw-r--r--csrc/window_util.c34
-rw-r--r--csrc/window_util.h14
2 files changed, 0 insertions, 48 deletions
diff --git a/csrc/window_util.c b/csrc/window_util.c
deleted file mode 100644
index 41c857a..0000000
--- a/csrc/window_util.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2018 Iru Cai <mytbk920423@gmail.com>
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#include "window_util.h"
-
-wProc windowCallbacks[100]; // 48a010
-int cb_top = 0; // 0x46cad8
-
-extern HWND gwindowHandle;
-
-int register_wait_callback(wProc a1, int a2)
-{
- cb_top++;
- windowCallbacks[cb_top] = a1;
- PostMessageA(gwindowHandle, 0x401, 0, a2);
- while (1) {
- MSG msg;
- if (PeekMessageA(&msg, 0, 0, 0, 1) == 0)
- continue;
- if (msg.message == 0x402) {
- cb_top--;
- return msg.lParam;
- }
- TranslateMessage(&msg);
- DispatchMessageA(&msg);
- }
-}
-
-void Post_0402_Message(LPARAM lp)
-{
- PostMessageA(gwindowHandle, 0x402, 0, lp);
-}
diff --git a/csrc/window_util.h b/csrc/window_util.h
deleted file mode 100644
index af4dbd9..0000000
--- a/csrc/window_util.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (C) 2018 Iru Cai <mytbk920423@gmail.com>
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#include <windows.h>
-
-extern int cb_top;
-
-typedef LRESULT (CALLBACK *wProc)(HWND, UINT, WPARAM, LPARAM);
-extern wProc windowCallbacks[100]; // 48a010
-
-int register_wait_callback(wProc a1, int a2);
-void Post_0402_Message(LPARAM lp);