micetools/src/micetools/dll/hooks/gui.h

59 lines
2.4 KiB
C
Raw Normal View History

2022-07-02 15:07:54 +00:00
#pragma once
#include "common.h"
2022-12-24 03:04:04 +00:00
static HWND(WINAPI* TrueCreateWindowExA)(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName,
DWORD dwStyle, int X, int Y, int nWidth, int nHeight,
HWND hWndParent, HMENU hMenu, HINSTANCE hInstance,
LPVOID lpParam);
static HWND(WINAPI* TrueCreateWindowExW)(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName,
DWORD dwStyle, int X, int Y, int nWidth, int nHeight,
HWND hWndParent, HMENU hMenu, HINSTANCE hInstance,
LPVOID lpParam);
static BOOL(WINAPI* TrueSetSystemCursor)(HCURSOR hcur, DWORD id);
static IDirect3D9*(WINAPI* TrueDirect3DCreate9)(UINT SDKVersion);
static int(WINAPI* TrueGetSystemMetrics)(int nIndex);
2023-03-20 03:09:27 +00:00
HCURSOR(WINAPI* TrueSetCursor)(HCURSOR hCursor);
#define _SetCursor (TrueSetCursor ? TrueSetCursor : SetCursor)
2023-02-14 07:46:24 +00:00
static void (__stdcall* True_glutFullScreen)(void);
static void (__stdcall* True_glutSwapBuffers)(void);
static void (__stdcall* True_glutPositionWindow)(int x, int y);
static void (__stdcall* True_glutReshapeWindow)(int width, int height);
static void (__stdcall* True_glutInitDisplayMode)(unsigned int mode);
static LONG (WINAPI* TrueChangeDisplaySettingsExW)(LPCWSTR lpszDeviceName, DEVMODEW* lpDevMode,
2023-02-14 07:09:08 +00:00
HWND hwnd, DWORD dwflags, LPVOID lParam);
#define _GetSystemMetrics (TrueGetSystemMetrics ? TrueGetSystemMetrics : GetSystemMetrics)
2022-07-02 15:07:54 +00:00
2022-12-24 03:04:04 +00:00
void draw_rect(IDirect3DDevice9* dev, int x, int y, int w, int h, unsigned char r, unsigned char g,
unsigned char b);
2022-07-02 15:07:54 +00:00
2023-02-14 07:09:08 +00:00
typedef VOID(__stdcall FnEndScene)(unsigned int hookType, IDirect3DDevice9* dev);
2022-07-02 15:07:54 +00:00
typedef struct end_scene_hook {
FnEndScene* hook;
struct end_scene_hook* next;
} end_scene_hook_t;
end_scene_hook_t* end_scene_hook_list;
2023-02-14 07:09:08 +00:00
#define UI_HOOK_DX9 0
#define UI_HOOK_GLUT 1
2022-07-02 15:07:54 +00:00
void register_gui_hook(FnEndScene* end_scene);
void hook_gui();
2022-12-24 03:04:04 +00:00
void setup_hud_gui();
2023-02-10 04:22:16 +00:00
typedef struct {
UINT m_Id;
INT m_X;
INT m_Y;
} ACTIVE_TOUCH;
2023-07-14 19:00:52 +00:00
// extern DWORD nActiveTouches;
// extern ACTIVE_TOUCH* activeTouches;
extern PMICE_DA g_activeTouches;
2023-07-07 11:58:55 +00:00
BOOL UnadjustWindowRect(LPRECT prc, DWORD dwStyle, BOOL fMenu);
2023-02-10 04:22:16 +00:00
extern HWND mainWindow;
2023-03-20 03:09:27 +00:00
extern DWORD changeCursorState;