rodecomp/Source/Client/Browser/WebBrowser.h
ragnarok-clanker e168b4e4a6 Restore translation-unit ownership and publish verified source corrections
Owner-authorized source migration: 31 helper-only translation units were merged into their callers or existing inline headers; both build manifests updated. Includes the preserved source payload, Lua configuration matching wowdecomp, and exact malloca expansion without diagnostic pragmas.

449 native units compiled locally and 449 staged units compiled by the pinned server toolchain. No previously byte-matched function regressed. Compiler mapping diagnostics remain recorded as needs_cleanup, not accepted or peer-confirmed. Existing independent review records are preserved. README.md is intentionally unchanged.
2026-10-25 15:42:21 +00:00

78 lines
2.1 KiB
C++

#ifndef RAGNAROK_SOURCE_CLIENT_BROWSER_WEBBROWSER_H
#define RAGNAROK_SOURCE_CLIENT_BROWSER_WEBBROWSER_H
#include <windows.h>
#include <ole2.h>
#include <exdisp.h>
#include <string>
#include <cstddef>
class BrowserClientSite;
class CMouse;
class CRenderSystemBase;
struct ServiceOptions;
struct BrowserRegistry;
struct BrowserFactory;
struct ApplicationActivation;
struct WebBrowserContext {
HWND const& applicationWindow;
HINSTANCE const& instance;
const char* const& title;
CMouse& mouse;
CRenderSystemBase& renderSystem;
ServiceOptions& service;
ApplicationActivation& activation;
BrowserFactory& popupFactory;
const int& renderWidth;
const int& renderHeight;
WNDPROC hostProcedure;
WNDPROC editProcedure;
WNDPROC& previousEditProcedure;
};
class CWebBrowser {
public:
explicit CWebBrowser(WebBrowserContext& context);
~CWebBrowser();
CWebBrowser(const CWebBrowser&) = delete;
CWebBrowser& operator=(const CWebBrowser&) = delete;
bool Create(int width, int height);
bool Close();
bool AttachExternalEvents(BrowserRegistry& registry);
void Resize(int width, int height);
void Poll();
bool Navigate(std::string address);
void ShowAuxiliary(unsigned char value);
bool MatchesWindow(HWND window) const;
/* 0000 */ IWebBrowser2* browser;
/* 0004 */ IUnknown* externalEvents;
/* 0008 */ BrowserClientSite* site;
/* 000C */ HWND host;
/* 0010 */ HWND browserWindow;
/* 0014 */ int cursorState;
/* 0018 */ unsigned char auxiliaryVisible;
unsigned char unknown_0019[3];
/* 001C */ int screenWidth;
/* 0020 */ int screenHeight;
/* 0024 */ DWORD cookie;
/* 0028 */ HWND rebar;
/* 002C */ HWND combo;
/* 0030 */ int barHeight;
/* 0034 */ int width;
/* 0038 */ int height;
/* 003C */ unsigned char restoreOption;
unsigned char unknown_003D[3];
WebBrowserContext* context;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(CWebBrowser, host) == 0xC);
static_assert(offsetof(CWebBrowser, cookie) == 0x24);
static_assert(offsetof(CWebBrowser, restoreOption) == 0x3C);
static_assert(offsetof(CWebBrowser, context) == 0x40);
#endif
#endif