diff --git a/.github/workflows/backup.yml b/.github/workflows/backup.yml new file mode 100644 index 000000000..366f4682b --- /dev/null +++ b/.github/workflows/backup.yml @@ -0,0 +1,32 @@ +name: Back up code to other forges + +on: + schedule: + - cron: '0 2 * * *' # Run every day at 2 AM + workflow_dispatch: # Allow manual trigger + +jobs: + push-to-forges: + runs-on: ubuntu-latest + if: github.repository == 'goatcorp/Dalamud' + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd #v0.9.1 + with: + ssh-private-key: | + ${{ secrets.MIRROR_GITLAB_SYNC_KEY }} + ${{ secrets.MIRROR_CODEBERG_SYNC_KEY }} + + - name: Add remotes & push + env: + GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=accept-new" + run: | + git remote add gitlab git@gitlab.com:goatcorp/Dalamud.git + git push gitlab --all --force + git remote add codeberg git@codeberg.org:goatcorp/Dalamud.git + git push codeberg --all --force diff --git a/Dalamud.Boot/Dalamud.Boot.rc b/Dalamud.Boot/Dalamud.Boot.rc index b46e81caf..655df27e1 100644 --- a/Dalamud.Boot/Dalamud.Boot.rc +++ b/Dalamud.Boot/Dalamud.Boot.rc @@ -26,6 +26,38 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US RT_MANIFEST_THEMES RT_MANIFEST "themes.manifest" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APPNAME "Dalamud Boot" + IDS_MSVCRT_ACTION_OPENDOWNLOAD + "Download Microsoft Visual C++ Redistributable 2022\nExit the game and download the latest setup file from Microsoft." + IDS_MSVCRT_ACTION_IGNORE + "Ignore and Continue\nAttempt to continue with the currently installed version.\nDalamud or plugins may fail to load." + IDS_MSVCRT_DIALOG_MAININSTRUCTION + "Outdated Microsoft Visual C++ Redistributable" + IDS_MSVCRT_DIALOG_CONTENT + "The Microsoft Visual C++ Redistributable version detected on this computer (v{0}.{1}.{2}.{3}) is out of date and may not work with Dalamud." + IDS_MSVCRT_DOWNLOADURL "https://aka.ms/vs/17/release/vc_redist.x64.exe" + IDS_INITIALIZEFAIL_ACTION_ABORT "Abort\nExit the game." + IDS_INITIALIZEFAIL_ACTION_CONTINUE + "Load game without Dalamud\nThe game will launch without Dalamud enabled." + IDS_INITIALIZEFAIL_DIALOG_MAININSTRUCTION "Failed to load Dalamud." + IDS_INITIALIZEFAIL_DIALOG_CONTENT + "An error is preventing Dalamud from being loaded along with the game." +END + +STRINGTABLE +BEGIN + IDS_INITIALIZEFAIL_DIALOG_FOOTER + "Last operation: {0}\nHRESULT: 0x{1:08X}\nDescription: {2}" +END + #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/Dalamud.Boot/Dalamud.Boot.vcxproj b/Dalamud.Boot/Dalamud.Boot.vcxproj index a15601af4..0a4a9c563 100644 --- a/Dalamud.Boot/Dalamud.Boot.vcxproj +++ b/Dalamud.Boot/Dalamud.Boot.vcxproj @@ -48,7 +48,7 @@ Level3 true true - stdcpp20 + stdcpp23 pch.h ProgramDatabase CPPDLLTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) @@ -65,7 +65,7 @@ true false - MultiThreadedDebugDLL + MultiThreadedDebugDLL _DEBUG;%(PreprocessorDefinitions) Use 26812 @@ -80,7 +80,7 @@ true true - MultiThreadedDLL + MultiThreadedDLL NDEBUG;%(PreprocessorDefinitions) Use 26812 @@ -133,6 +133,10 @@ NotUsing + + NotUsing + NotUsing + NotUsing @@ -176,6 +180,7 @@ + @@ -206,4 +211,4 @@ - + \ No newline at end of file diff --git a/Dalamud.Boot/Dalamud.Boot.vcxproj.filters b/Dalamud.Boot/Dalamud.Boot.vcxproj.filters index 7c26b28ff..15e3eb8b3 100644 --- a/Dalamud.Boot/Dalamud.Boot.vcxproj.filters +++ b/Dalamud.Boot/Dalamud.Boot.vcxproj.filters @@ -76,6 +76,9 @@ Dalamud.Boot DLL + + Common Boot + @@ -146,6 +149,9 @@ Dalamud.Boot DLL + + Common Boot + diff --git a/Dalamud.Boot/dllmain.cpp b/Dalamud.Boot/dllmain.cpp index 5e73962ec..80a16f89a 100644 --- a/Dalamud.Boot/dllmain.cpp +++ b/Dalamud.Boot/dllmain.cpp @@ -9,10 +9,125 @@ #include "utils.h" #include "veh.h" #include "xivfixes.h" +#include "resource.h" HMODULE g_hModule; HINSTANCE g_hGameInstance = GetModuleHandleW(nullptr); +static void CheckMsvcrtVersion() { + // Commit introducing inline mutex ctor: tagged vs-2022-17.14 (2024-06-18) + // - https://github.com/microsoft/STL/commit/22a88260db4d754bbc067e2002430144d6ec5391 + // MSVC Redist versions: + // - https://github.com/abbodi1406/vcredist/blob/master/source_links/README.md + // - 14.40.33810.0 dsig 2024-04-28 + // - 14.40.33816.0 dsig 2024-09-11 + + constexpr WORD RequiredMsvcrtVersionComponents[] = {14, 40, 33816, 0}; + constexpr auto RequiredMsvcrtVersion = 0ULL + | (static_cast(RequiredMsvcrtVersionComponents[0]) << 48) + | (static_cast(RequiredMsvcrtVersionComponents[1]) << 32) + | (static_cast(RequiredMsvcrtVersionComponents[2]) << 16) + | (static_cast(RequiredMsvcrtVersionComponents[3]) << 0); + + constexpr const wchar_t* RuntimeDllNames[] = { +#ifdef _DEBUG + L"msvcp140d.dll", + L"vcruntime140d.dll", + L"vcruntime140_1d.dll", +#else + L"msvcp140.dll", + L"vcruntime140.dll", + L"vcruntime140_1.dll", +#endif + }; + + uint64_t lowestVersion = 0; + for (const auto& runtimeDllName : RuntimeDllNames) { + const utils::loaded_module mod(GetModuleHandleW(runtimeDllName)); + if (!mod) { + logging::E("MSVCRT DLL not found: {}", runtimeDllName); + continue; + } + + const auto path = mod.path() + .transform([](const auto& p) { return p.wstring(); }) + .value_or(runtimeDllName); + + if (const auto versionResult = mod.get_file_version()) { + const auto& versionFull = versionResult->get(); + logging::I("MSVCRT DLL {} has version {}.", path, utils::format_file_version(versionFull)); + + const auto version = 0ULL | + (static_cast(versionFull.dwFileVersionMS) << 32) | + (static_cast(versionFull.dwFileVersionLS) << 0); + + if (version < RequiredMsvcrtVersion && (lowestVersion == 0 || lowestVersion > version)) + lowestVersion = version; + } else { + logging::E("Failed to detect MSVCRT DLL version for {}: {}", path, versionResult.error().describe()); + } + } + + if (!lowestVersion) + return; + + enum IdTaskDialogAction { + IdTaskDialogActionOpenDownload = 101, + IdTaskDialogActionIgnore, + }; + + const TASKDIALOG_BUTTON buttons[]{ + {IdTaskDialogActionOpenDownload, MAKEINTRESOURCEW(IDS_MSVCRT_ACTION_OPENDOWNLOAD)}, + {IdTaskDialogActionIgnore, MAKEINTRESOURCEW(IDS_MSVCRT_ACTION_IGNORE)}, + }; + + const WORD lowestVersionComponents[]{ + static_cast(lowestVersion >> 48), + static_cast(lowestVersion >> 32), + static_cast(lowestVersion >> 16), + static_cast(lowestVersion >> 0), + }; + + const auto dialogContent = std::vformat( + utils::get_string_resource(IDS_MSVCRT_DIALOG_CONTENT), + std::make_wformat_args( + lowestVersionComponents[0], + lowestVersionComponents[1], + lowestVersionComponents[2], + lowestVersionComponents[3])); + + const TASKDIALOGCONFIG config{ + .cbSize = sizeof config, + .hInstance = g_hModule, + .dwFlags = TDF_CAN_BE_MINIMIZED | TDF_ALLOW_DIALOG_CANCELLATION | TDF_USE_COMMAND_LINKS, + .pszWindowTitle = MAKEINTRESOURCEW(IDS_APPNAME), + .pszMainIcon = MAKEINTRESOURCEW(IDI_ICON1), + .pszMainInstruction = MAKEINTRESOURCEW(IDS_MSVCRT_DIALOG_MAININSTRUCTION), + .pszContent = dialogContent.c_str(), + .cButtons = _countof(buttons), + .pButtons = buttons, + .nDefaultButton = IdTaskDialogActionOpenDownload, + }; + + int buttonPressed; + if (utils::scoped_dpi_awareness_context ctx; + FAILED(TaskDialogIndirect(&config, &buttonPressed, nullptr, nullptr))) + buttonPressed = IdTaskDialogActionOpenDownload; + + switch (buttonPressed) { + case IdTaskDialogActionOpenDownload: + ShellExecuteW( + nullptr, + L"open", + utils::get_string_resource(IDS_MSVCRT_DOWNLOADURL).c_str(), + nullptr, + nullptr, + SW_SHOW); + ExitProcess(0); + break; + } +} + HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) { g_startInfo.from_envvars(); @@ -24,7 +139,7 @@ HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) { } if (g_startInfo.BootShowConsole) - ConsoleSetup(L"Dalamud Boot"); + ConsoleSetup(utils::get_string_resource(IDS_APPNAME).c_str()); logging::update_dll_load_status(true); @@ -94,6 +209,8 @@ HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) { if ((g_startInfo.BootWaitMessageBox & DalamudStartInfo::WaitMessageboxFlags::BeforeInitialize) != DalamudStartInfo::WaitMessageboxFlags::None) MessageBoxW(nullptr, L"Press OK to continue (BeforeInitialize)", L"Dalamud Boot", MB_OK); + CheckMsvcrtVersion(); + if (g_startInfo.BootDebugDirectX) { logging::I("Enabling DirectX Debugging."); @@ -159,7 +276,7 @@ HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) { if (minHookLoaded) { logging::I("Applying fixes..."); - xivfixes::apply_all(true); + std::thread([] { xivfixes::apply_all(true); }).join(); logging::I("Fixes OK"); } else { logging::W("Skipping fixes, as MinHook has failed to load."); @@ -170,11 +287,14 @@ HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) { while (!IsDebuggerPresent()) Sleep(100); logging::I("Debugger attached."); + __debugbreak(); } - const auto fs_module_path = utils::get_module_path(g_hModule); - const auto runtimeconfig_path = std::filesystem::path(fs_module_path).replace_filename(L"Dalamud.runtimeconfig.json").wstring(); - const auto module_path = std::filesystem::path(fs_module_path).replace_filename(L"Dalamud.dll").wstring(); + const auto fs_module_path = utils::loaded_module(g_hModule).path(); + if (!fs_module_path) + return fs_module_path.error(); + const auto runtimeconfig_path = std::filesystem::path(*fs_module_path).replace_filename(L"Dalamud.runtimeconfig.json").wstring(); + const auto module_path = std::filesystem::path(*fs_module_path).replace_filename(L"Dalamud.dll").wstring(); // ============================== CLR ========================================= // diff --git a/Dalamud.Boot/error_info.cpp b/Dalamud.Boot/error_info.cpp new file mode 100644 index 000000000..02356b730 --- /dev/null +++ b/Dalamud.Boot/error_info.cpp @@ -0,0 +1,26 @@ +#include "error_info.h" + +#define WIN32_LEAN_AND_MEAN +#include + +DalamudBootError::DalamudBootError(DalamudBootErrorDescription dalamudErrorDescription, long hresult) noexcept + : m_dalamudErrorDescription(dalamudErrorDescription) + , m_hresult(hresult) { +} + +DalamudBootError::DalamudBootError(DalamudBootErrorDescription dalamudErrorDescription) noexcept + : DalamudBootError(dalamudErrorDescription, E_FAIL) { +} + +const char* DalamudBootError::describe() const { + switch (m_dalamudErrorDescription) { + case DalamudBootErrorDescription::ModuleResourceLoadFail: + return "Failed to load resource."; + case DalamudBootErrorDescription::ModuleResourceVersionReadFail: + return "Failed to query version information."; + case DalamudBootErrorDescription::ModuleResourceVersionSignatureFail: + return "Invalid version info found."; + default: + return "(unavailable)"; + } +} diff --git a/Dalamud.Boot/error_info.h b/Dalamud.Boot/error_info.h new file mode 100644 index 000000000..b5862d0dd --- /dev/null +++ b/Dalamud.Boot/error_info.h @@ -0,0 +1,42 @@ +#pragma once + +#include +#include + +typedef unsigned long DWORD; +typedef _Return_type_success_(return >= 0) long HRESULT; + +enum class DalamudBootErrorDescription { + None, + ModulePathResolutionFail, + ModuleResourceLoadFail, + ModuleResourceVersionReadFail, + ModuleResourceVersionSignatureFail, +}; + +class DalamudBootError { + DalamudBootErrorDescription m_dalamudErrorDescription; + long m_hresult; + +public: + DalamudBootError(DalamudBootErrorDescription dalamudErrorDescription, long hresult) noexcept; + DalamudBootError(DalamudBootErrorDescription dalamudErrorDescription) noexcept; + + const char* describe() const; + + operator HRESULT() const { + return m_hresult; + } +}; + +template +using DalamudExpected = std::expected< + std::conditional_t< + std::is_reference_v, + std::reference_wrapper>, + T + >, + DalamudBootError +>; + +using DalamudUnexpected = std::unexpected; diff --git a/Dalamud.Boot/hooks.cpp b/Dalamud.Boot/hooks.cpp index 295d427ae..3443a5f8a 100644 --- a/Dalamud.Boot/hooks.cpp +++ b/Dalamud.Boot/hooks.cpp @@ -84,19 +84,13 @@ void hooks::getprocaddress_singleton_import_hook::initialize() { const auto dllName = unicode::convert(pData->Loaded.FullDllName->Buffer); utils::loaded_module mod(pData->Loaded.DllBase); - std::wstring version, description; - try { - version = utils::format_file_version(mod.get_file_version()); - } catch (...) { - version = L""; - } - - try { - description = mod.get_description(); - } catch (...) { - description = L""; - } - + const auto version = mod.get_file_version() + .transform([](const auto& v) { return utils::format_file_version(v.get()); }) + .value_or(L""); + + const auto description = mod.get_description() + .value_or(L""); + logging::I(R"({} "{}" ("{}" ver {}) has been loaded at 0x{:X} ~ 0x{:X} (0x{:X}); finding import table items to hook.)", LogTag, dllName, description, version, reinterpret_cast(pData->Loaded.DllBase), @@ -125,7 +119,9 @@ void hooks::getprocaddress_singleton_import_hook::hook_module(const utils::loade if (mod.is_current_process()) return; - const auto path = unicode::convert(mod.path().wstring()); + const auto path = mod.path() + .transform([](const auto& p) { return unicode::convert(p.wstring()); }) + .value_or(""); for (const auto& [hModule, targetFns] : m_targetFns) { for (const auto& [targetFn, pfnThunk] : targetFns) { @@ -133,7 +129,7 @@ void hooks::getprocaddress_singleton_import_hook::hook_module(const utils::loade if (void* pGetProcAddressImport; mod.find_imported_function_pointer(dllName.c_str(), targetFn.c_str(), 0, pGetProcAddressImport)) { auto& hook = m_hooks[hModule][targetFn][mod]; if (!hook) { - logging::I("{} Hooking {}!{} imported by {}", LogTag, dllName, targetFn, unicode::convert(mod.path().wstring())); + logging::I("{} Hooking {}!{} imported by {}", LogTag, dllName, targetFn, path); hook.emplace(std::format("getprocaddress_singleton_import_hook::hook_module({}!{})", dllName, targetFn), static_cast(pGetProcAddressImport), pfnThunk); } diff --git a/Dalamud.Boot/pch.h b/Dalamud.Boot/pch.h index c2194c157..ac1394e57 100644 --- a/Dalamud.Boot/pch.h +++ b/Dalamud.Boot/pch.h @@ -11,6 +11,9 @@ #define WIN32_LEAN_AND_MEAN #define NOMINMAX +// https://developercommunity.visualstudio.com/t/Access-violation-with-std::mutex::lock-a/10664660 +#define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR + // Windows Header Files (1) #include @@ -21,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +55,7 @@ #include #include #include +#include #include // https://www.akenotsuki.com/misc/srell/en/ diff --git a/Dalamud.Boot/resource.h b/Dalamud.Boot/resource.h index 51acf37df..2a1cde6e2 100644 --- a/Dalamud.Boot/resource.h +++ b/Dalamud.Boot/resource.h @@ -3,12 +3,23 @@ // Used by Dalamud.Boot.rc // #define IDI_ICON1 101 +#define IDS_APPNAME 102 +#define IDS_MSVCRT_ACTION_OPENDOWNLOAD 103 +#define IDS_MSVCRT_ACTION_IGNORE 104 +#define IDS_MSVCRT_DIALOG_MAININSTRUCTION 105 +#define IDS_MSVCRT_DIALOG_CONTENT 106 +#define IDS_MSVCRT_DOWNLOADURL 107 +#define IDS_INITIALIZEFAIL_ACTION_ABORT 108 +#define IDS_INITIALIZEFAIL_ACTION_CONTINUE 109 +#define IDS_INITIALIZEFAIL_DIALOG_MAININSTRUCTION 110 +#define IDS_INITIALIZEFAIL_DIALOG_CONTENT 111 +#define IDS_INITIALIZEFAIL_DIALOG_FOOTER 112 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_RESOURCE_VALUE 103 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/Dalamud.Boot/rewrite_entrypoint.cpp b/Dalamud.Boot/rewrite_entrypoint.cpp index 3a1672af7..69a4ec818 100644 --- a/Dalamud.Boot/rewrite_entrypoint.cpp +++ b/Dalamud.Boot/rewrite_entrypoint.cpp @@ -2,6 +2,7 @@ #include "logging.h" #include "utils.h" +#include "resource.h" HRESULT WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue); @@ -379,12 +380,50 @@ extern "C" void WINAPI RewrittenEntryPoint_AdjustedStack(RewrittenEntryPointPara auto desc = err.Description(); if (desc.length() == 0) desc = err.ErrorMessage(); - if (MessageBoxW(nullptr, std::format( - L"Failed to load Dalamud. Load game without Dalamud(yes) or abort(no)?\n\n{}\n{}", - last_operation, - desc.GetBSTR()).c_str(), - L"Dalamud.Boot", MB_OK | MB_YESNO) == IDNO) - ExitProcess(-1); + + enum IdTaskDialogAction { + IdTaskDialogActionAbort = 101, + IdTaskDialogActionContinue, + }; + + const TASKDIALOG_BUTTON buttons[]{ + {IdTaskDialogActionAbort, MAKEINTRESOURCEW(IDS_INITIALIZEFAIL_ACTION_ABORT)}, + {IdTaskDialogActionContinue, MAKEINTRESOURCEW(IDS_INITIALIZEFAIL_ACTION_CONTINUE)}, + }; + + const auto hru32 = static_cast(hr); + const auto footer = std::vformat( + utils::get_string_resource(IDS_INITIALIZEFAIL_DIALOG_FOOTER), + std::make_wformat_args( + last_operation, + hru32, + desc.GetBSTR())); + + const TASKDIALOGCONFIG config{ + .cbSize = sizeof config, + .hInstance = g_hModule, + .dwFlags = TDF_CAN_BE_MINIMIZED | TDF_ALLOW_DIALOG_CANCELLATION | TDF_USE_COMMAND_LINKS | TDF_EXPAND_FOOTER_AREA, + .pszWindowTitle = MAKEINTRESOURCEW(IDS_APPNAME), + .pszMainIcon = MAKEINTRESOURCEW(IDI_ICON1), + .pszMainInstruction = MAKEINTRESOURCEW(IDS_INITIALIZEFAIL_DIALOG_MAININSTRUCTION), + .pszContent = MAKEINTRESOURCEW(IDS_INITIALIZEFAIL_DIALOG_CONTENT), + .cButtons = _countof(buttons), + .pButtons = buttons, + .nDefaultButton = IdTaskDialogActionAbort, + .pszFooter = footer.c_str(), + }; + + int buttonPressed; + if (utils::scoped_dpi_awareness_context ctx; + FAILED(TaskDialogIndirect(&config, &buttonPressed, nullptr, nullptr))) + buttonPressed = IdTaskDialogActionAbort; + + switch (buttonPressed) { + case IdTaskDialogActionAbort: + ExitProcess(-1); + break; + } + if (hMainThreadContinue) { CloseHandle(hMainThreadContinue); hMainThreadContinue = nullptr; diff --git a/Dalamud.Boot/utils.cpp b/Dalamud.Boot/utils.cpp index dbfcf39ee..9820e5b7f 100644 --- a/Dalamud.Boot/utils.cpp +++ b/Dalamud.Boot/utils.cpp @@ -3,22 +3,27 @@ #include "utils.h" -std::filesystem::path utils::loaded_module::path() const { - std::wstring buf(MAX_PATH, L'\0'); - for (;;) { - if (const auto len = GetModuleFileNameExW(GetCurrentProcess(), m_hModule, &buf[0], static_cast(buf.size())); len != buf.size()) { - if (buf.empty()) - throw std::runtime_error(std::format("Failed to resolve module path: Win32 error {}", GetLastError())); +DalamudExpected utils::loaded_module::path() const { + for (std::wstring buf(MAX_PATH, L'\0');; buf.resize(buf.size() * 2)) { + if (const auto len = GetModuleFileNameW(m_hModule, &buf[0], static_cast(buf.size())); + len != buf.size()) { + if (!len) { + return DalamudUnexpected( + std::in_place, + DalamudBootErrorDescription::ModulePathResolutionFail, + HRESULT_FROM_WIN32(GetLastError())); + } + buf.resize(len); return buf; } - if (buf.size() * 2 < PATHCCH_MAX_CCH) - buf.resize(buf.size() * 2); - else if (auto p = std::filesystem::path(buf); exists(p)) - return p; - else - throw std::runtime_error("Failed to resolve module path: no amount of buffer size would fit the data"); + if (buf.size() > PATHCCH_MAX_CCH) { + return DalamudUnexpected( + std::in_place, + DalamudBootErrorDescription::ModulePathResolutionFail, + E_OUTOFMEMORY); + } } } @@ -144,66 +149,90 @@ void* utils::loaded_module::get_imported_function_pointer(const char* pcszDllNam throw std::runtime_error(std::format("Failed to find import for {}!{} ({}).", pcszDllName, pcszFunctionName ? pcszFunctionName : "", hintOrOrdinal)); } -std::unique_ptr, decltype(&FreeResource)> utils::loaded_module::get_resource(LPCWSTR lpName, LPCWSTR lpType) const { +DalamudExpected, decltype(&FreeResource)>> utils::loaded_module::get_resource(LPCWSTR lpName, LPCWSTR lpType) const { const auto hres = FindResourceW(m_hModule, lpName, lpType); if (!hres) - throw std::runtime_error("No such resource"); - + return DalamudUnexpected(std::in_place, DalamudBootErrorDescription::ModuleResourceLoadFail, GetLastError()); + const auto hRes = LoadResource(m_hModule, hres); if (!hRes) - throw std::runtime_error("LoadResource failure"); + return DalamudUnexpected(std::in_place, DalamudBootErrorDescription::ModuleResourceLoadFail, GetLastError()); - return {hRes, &FreeResource}; + return std::unique_ptr, decltype(&FreeResource)>(hRes, &FreeResource); } -std::wstring utils::loaded_module::get_description() const { - const auto rsrc = get_resource(MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION); - const auto pBlock = LockResource(rsrc.get()); - +DalamudExpected utils::loaded_module::get_description() const { + auto rsrc = get_resource(MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION); + if (!rsrc) + return DalamudUnexpected(std::move(rsrc.error())); + + const auto pBlock = LockResource(rsrc->get()); + struct LANGANDCODEPAGE { WORD wLanguage; WORD wCodePage; } * lpTranslate; UINT cbTranslate; if (!VerQueryValueW(pBlock, - TEXT("\\VarFileInfo\\Translation"), + L"\\VarFileInfo\\Translation", reinterpret_cast(&lpTranslate), &cbTranslate)) { - throw std::runtime_error("Invalid version information (1)"); + return DalamudUnexpected( + std::in_place, + DalamudBootErrorDescription::ModuleResourceVersionReadFail, + HRESULT_FROM_WIN32(GetLastError())); } for (size_t i = 0; i < (cbTranslate / sizeof(LANGANDCODEPAGE)); i++) { + wchar_t subblockNameBuf[64]; + *std::format_to_n( + subblockNameBuf, + _countof(subblockNameBuf), + L"\\StringFileInfo\\{:04x}{:04x}\\FileDescription", + lpTranslate[i].wLanguage, + lpTranslate[i].wCodePage).out = 0;; + wchar_t* buf = nullptr; UINT size = 0; - if (!VerQueryValueW(pBlock, - std::format(L"\\StringFileInfo\\{:04x}{:04x}\\FileDescription", - lpTranslate[i].wLanguage, - lpTranslate[i].wCodePage).c_str(), - reinterpret_cast(&buf), - &size)) { + if (!VerQueryValueW(pBlock, subblockNameBuf, reinterpret_cast(&buf), &size)) continue; - } + auto currName = std::wstring_view(buf, size); - while (!currName.empty() && currName.back() == L'\0') - currName = currName.substr(0, currName.size() - 1); + if (const auto p = currName.find(L'\0'); p != std::string::npos) + currName = currName.substr(0, p); if (currName.empty()) continue; return std::wstring(currName); } - - throw std::runtime_error("Invalid version information (2)"); + + return DalamudUnexpected( + std::in_place, + DalamudBootErrorDescription::ModuleResourceVersionReadFail, + HRESULT_FROM_WIN32(ERROR_NOT_FOUND)); } -VS_FIXEDFILEINFO utils::loaded_module::get_file_version() const { - const auto rsrc = get_resource(MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION); - const auto pBlock = LockResource(rsrc.get()); +std::expected, DalamudBootError> utils::loaded_module::get_file_version() const { + auto rsrc = get_resource(MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION); + if (!rsrc) + return DalamudUnexpected(std::move(rsrc.error())); + + const auto pBlock = LockResource(rsrc->get()); UINT size = 0; LPVOID lpBuffer = nullptr; - if (!VerQueryValueW(pBlock, L"\\", &lpBuffer, &size)) - throw std::runtime_error("Failed to query version information."); + if (!VerQueryValueW(pBlock, L"\\", &lpBuffer, &size)) { + return std::unexpected( + std::in_place, + DalamudBootErrorDescription::ModuleResourceVersionReadFail, + HRESULT_FROM_WIN32(GetLastError())); + } + const VS_FIXEDFILEINFO& versionInfo = *static_cast(lpBuffer); - if (versionInfo.dwSignature != 0xfeef04bd) - throw std::runtime_error("Invalid version info found."); + if (versionInfo.dwSignature != 0xfeef04bd) { + return std::unexpected( + std::in_place, + DalamudBootErrorDescription::ModuleResourceVersionSignatureFail); + } + return versionInfo; } @@ -353,7 +382,7 @@ const char* utils::signature_finder::result::resolve_jump_target(size_t instruct nmd_x86_instruction instruction{}; if (!nmd_x86_decode(&Match[instructionOffset], NMD_X86_MAXIMUM_INSTRUCTION_LENGTH, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) throw std::runtime_error("Matched address does not have a valid assembly instruction"); - + size_t numExplicitOperands = 0; for (size_t i = 0; i < instruction.num_operands; i++) numExplicitOperands += instruction.operands[i].is_implicit ? 0 : 1; @@ -589,17 +618,10 @@ bool utils::is_running_on_wine() { return g_startInfo.Platform != "WINDOWS"; } -std::filesystem::path utils::get_module_path(HMODULE hModule) { - std::wstring buf(MAX_PATH, L'\0'); - while (true) { - if (const auto res = GetModuleFileNameW(hModule, &buf[0], static_cast(buf.size())); !res) - throw std::runtime_error(std::format("GetModuleFileName failure: 0x{:X}", GetLastError())); - else if (res < buf.size()) { - buf.resize(res); - return buf; - } else - buf.resize(buf.size() * 2); - } +std::wstring utils::get_string_resource(uint32_t resId) { + LPCWSTR pstr; + const auto len = LoadStringW(g_hModule, resId, reinterpret_cast(&pstr), 0); + return std::wstring(pstr, len); } HWND utils::try_find_game_window() { @@ -625,7 +647,7 @@ void utils::wait_for_game_window() { std::wstring utils::escape_shell_arg(const std::wstring& arg) { // https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way - + std::wstring res; if (!arg.empty() && arg.find_first_of(L" \t\n\v\"") == std::wstring::npos) { res.append(arg); @@ -677,3 +699,22 @@ std::wstring utils::format_win32_error(DWORD err) { return std::format(L"Win32 error ({}=0x{:X})", err, err); } + +utils::scoped_dpi_awareness_context::scoped_dpi_awareness_context() + : scoped_dpi_awareness_context(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) { +} + +utils::scoped_dpi_awareness_context::scoped_dpi_awareness_context(DPI_AWARENESS_CONTEXT context) { + const auto user32 = GetModuleHandleW(L"user32.dll"); + m_setThreadDpiAwarenessContext = + user32 + ? reinterpret_cast( + GetProcAddress(user32, "SetThreadDpiAwarenessContext")) + : nullptr; + m_old = m_setThreadDpiAwarenessContext ? m_setThreadDpiAwarenessContext(context) : DPI_AWARENESS_CONTEXT_UNAWARE; +} + +utils::scoped_dpi_awareness_context::~scoped_dpi_awareness_context() { + if (m_setThreadDpiAwarenessContext) + m_setThreadDpiAwarenessContext(m_old); +} diff --git a/Dalamud.Boot/utils.h b/Dalamud.Boot/utils.h index 2cdaf60a7..c5833722b 100644 --- a/Dalamud.Boot/utils.h +++ b/Dalamud.Boot/utils.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -7,6 +8,7 @@ #include #include +#include "error_info.h" #include "unicode.h" namespace utils { @@ -18,14 +20,13 @@ namespace utils { loaded_module(void* hModule) : m_hModule(reinterpret_cast(hModule)) {} loaded_module(size_t hModule) : m_hModule(reinterpret_cast(hModule)) {} - std::filesystem::path path() const; + DalamudExpected path() const; bool is_current_process() const { return m_hModule == GetModuleHandleW(nullptr); } bool owns_address(const void* pAddress) const; - operator HMODULE() const { - return m_hModule; - } + operator HMODULE() const { return m_hModule; } + operator bool() const { return m_hModule; } size_t address_int() const { return reinterpret_cast(m_hModule); } size_t image_size() const { return is_pe64() ? nt_header64().OptionalHeader.SizeOfImage : nt_header32().OptionalHeader.SizeOfImage; } @@ -58,9 +59,9 @@ namespace utils { void* get_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal) const; template TFn** get_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal) { return reinterpret_cast(get_imported_function_pointer(pcszDllName, pcszFunctionName, hintOrOrdinal)); } - [[nodiscard]] std::unique_ptr, decltype(&FreeResource)> get_resource(LPCWSTR lpName, LPCWSTR lpType) const; - [[nodiscard]] std::wstring get_description() const; - [[nodiscard]] VS_FIXEDFILEINFO get_file_version() const; + [[nodiscard]] DalamudExpected, decltype(&FreeResource)>> get_resource(LPCWSTR lpName, LPCWSTR lpType) const; + [[nodiscard]] DalamudExpected get_description() const; + [[nodiscard]] DalamudExpected get_file_version() const; static loaded_module current_process(); static std::vector all_modules(); @@ -269,7 +270,7 @@ namespace utils { bool is_running_on_wine(); - std::filesystem::path get_module_path(HMODULE hModule); + std::wstring get_string_resource(uint32_t resId); /// @brief Find the game main window. /// @return Handle to the game main window, or nullptr if it doesn't exist (yet). @@ -280,4 +281,18 @@ namespace utils { std::wstring escape_shell_arg(const std::wstring& arg); std::wstring format_win32_error(DWORD err); + + class scoped_dpi_awareness_context { + DPI_AWARENESS_CONTEXT m_old; + decltype(&SetThreadDpiAwarenessContext) m_setThreadDpiAwarenessContext; + + public: + scoped_dpi_awareness_context(); + scoped_dpi_awareness_context(DPI_AWARENESS_CONTEXT); + ~scoped_dpi_awareness_context(); + scoped_dpi_awareness_context(const scoped_dpi_awareness_context&) = delete; + scoped_dpi_awareness_context(scoped_dpi_awareness_context&&) = delete; + scoped_dpi_awareness_context& operator=(const scoped_dpi_awareness_context&) = delete; + scoped_dpi_awareness_context& operator=(scoped_dpi_awareness_context&&) = delete; + }; } diff --git a/Dalamud.Boot/veh.cpp b/Dalamud.Boot/veh.cpp index 85d58eb9d..b0ec1cefa 100644 --- a/Dalamud.Boot/veh.cpp +++ b/Dalamud.Boot/veh.cpp @@ -102,9 +102,13 @@ bool is_ffxiv_address(const wchar_t* module_name, const DWORD64 address) return false; } -static void append_injector_launch_args(std::vector& args) +static DalamudExpected append_injector_launch_args(std::vector& args) { - args.emplace_back(L"--game=\"" + utils::loaded_module::current_process().path().wstring() + L"\""); + if (auto path = utils::loaded_module::current_process().path()) + args.emplace_back(L"--game=\"" + path->wstring() + L"\""); + else + return DalamudUnexpected(std::in_place, std::move(path.error())); + switch (g_startInfo.DalamudLoadMethod) { case DalamudStartInfo::LoadMethod::Entrypoint: args.emplace_back(L"--mode=entrypoint"); @@ -155,6 +159,8 @@ static void append_injector_launch_args(std::vector& args) args.emplace_back(szArgList[i]); LocalFree(szArgList); } + + return {}; } LONG exception_handler(EXCEPTION_POINTERS* ex) @@ -358,11 +364,20 @@ bool veh::add_handler(bool doFullDump, const std::string& workingDirectory) args.emplace_back(std::format(L"--process-handle={}", reinterpret_cast(hInheritableCurrentProcess))); args.emplace_back(std::format(L"--exception-info-pipe-read-handle={}", reinterpret_cast(hReadPipeInheritable->get()))); args.emplace_back(std::format(L"--asset-directory={}", unicode::convert(g_startInfo.AssetDirectory))); - args.emplace_back(std::format(L"--log-directory={}", g_startInfo.BootLogPath.empty() - ? utils::loaded_module(g_hModule).path().parent_path().wstring() - : std::filesystem::path(unicode::convert(g_startInfo.BootLogPath)).parent_path().wstring())); + if (const auto path = utils::loaded_module(g_hModule).path()) { + args.emplace_back(std::format(L"--log-directory={}", g_startInfo.BootLogPath.empty() + ? path->parent_path().wstring() + : std::filesystem::path(unicode::convert(g_startInfo.BootLogPath)).parent_path().wstring())); + } else { + logging::W("Failed to read path of the Dalamud Boot module: {}", path.error().describe()); + return false; + } + args.emplace_back(L"--"); - append_injector_launch_args(args); + if (auto r = append_injector_launch_args(args); !r) { + logging::W("Failed to generate injector launch args: {}", r.error().describe()); + return false; + } for (const auto& arg : args) { diff --git a/Dalamud.Boot/xivfixes.cpp b/Dalamud.Boot/xivfixes.cpp index eb0f7df56..7f9e92225 100644 --- a/Dalamud.Boot/xivfixes.cpp +++ b/Dalamud.Boot/xivfixes.cpp @@ -8,12 +8,6 @@ #include "ntdll.h" #include "utils.h" -template -static std::span assume_nonempty_span(std::span t, const char* descr) { - if (t.empty()) - throw std::runtime_error(std::format("Unexpected empty span found: {}", descr)); - return t; -} void xivfixes::unhook_dll(bool bApply) { static const auto LogTag = "[xivfixes:unhook_dll]"; static const auto LogTagW = L"[xivfixes:unhook_dll]"; @@ -23,77 +17,90 @@ void xivfixes::unhook_dll(bool bApply) { const auto mods = utils::loaded_module::all_modules(); - const auto test_module = [&](size_t i, const utils::loaded_module & mod) { - std::filesystem::path path; - try { - path = mod.path(); - std::wstring version, description; - try { - version = utils::format_file_version(mod.get_file_version()); - } catch (...) { - version = L""; - } - - try { - description = mod.get_description(); - } catch (...) { - description = L""; - } - - logging::I(R"({} [{}/{}] Module 0x{:X} ~ 0x{:X} (0x{:X}): "{}" ("{}" ver {}))", LogTagW, i + 1, mods.size(), mod.address_int(), mod.address_int() + mod.image_size(), mod.image_size(), path.wstring(), description, version); - } catch (const std::exception& e) { - logging::W("{} [{}/{}] Module 0x{:X}: Failed to resolve path: {}", LogTag, i + 1, mods.size(), mod.address_int(), e.what()); + for (size_t i = 0; i < mods.size(); i++) { + const auto& mod = mods[i]; + const auto path = mod.path(); + if (!path) { + logging::W( + "{} [{}/{}] Module 0x{:X}: Failed to resolve path: {}", + LogTag, + i + 1, + mods.size(), + mod.address_int(), + path.error().describe()); return; } - const auto moduleName = unicode::convert(path.filename().wstring()); + const auto version = mod.get_file_version() + .transform([](const auto& v) { return utils::format_file_version(v.get()); }) + .value_or(L""); - std::vector buf; - std::string formatBuf; + const auto description = mod.get_description() + .value_or(L""); + + logging::I( + R"({} [{}/{}] Module 0x{:X} ~ 0x{:X} (0x{:X}): "{}" ("{}" ver {}))", + LogTagW, + i + 1, + mods.size(), + mod.address_int(), + mod.address_int() + mod.image_size(), + mod.image_size(), + path->wstring(), + description, + version); + + const auto moduleName = unicode::convert(path->filename().wstring()); + + const auto& sectionHeader = mod.section_header(".text"); + const auto section = mod.span_as(sectionHeader.VirtualAddress, sectionHeader.Misc.VirtualSize); + if (section.empty()) { + logging::W("{} Error: .text[VA:VA + VS] is empty", LogTag); + return; + } + + auto hFsDllRaw = CreateFileW(path->c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); + if (hFsDllRaw == INVALID_HANDLE_VALUE) { + logging::W("{} Module loaded in current process but could not open file: Win32 error {}", LogTag, GetLastError()); + return; + } + + auto hFsDll = std::unique_ptr(hFsDllRaw, &CloseHandle); + std::vector buf(section.size()); + SetFilePointer(hFsDll.get(), sectionHeader.PointerToRawData, nullptr, FILE_CURRENT); + if (DWORD read{}; ReadFile(hFsDll.get(), &buf[0], static_cast(buf.size()), &read, nullptr)) { + if (read < section.size_bytes()) { + logging::W("{} ReadFile: read {} bytes < requested {} bytes", LogTagW, read, section.size_bytes()); + return; + } + } else { + logging::I("{} ReadFile: Win32 error {}", LogTagW, GetLastError()); + return; + } + + const auto doRestore = g_startInfo.BootUnhookDlls.contains(unicode::convert(path->filename().u8string())); try { - const auto& sectionHeader = mod.section_header(".text"); - const auto section = assume_nonempty_span(mod.span_as(sectionHeader.VirtualAddress, sectionHeader.Misc.VirtualSize), ".text[VA:VA+VS]"); - auto hFsDllRaw = CreateFileW(path.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); - if (hFsDllRaw == INVALID_HANDLE_VALUE) { - logging::W("{} Module loaded in current process but could not open file: Win32 error {}", LogTag, GetLastError()); - return; - } - auto hFsDll = std::unique_ptr(hFsDllRaw, &CloseHandle); - - buf.resize(section.size()); - SetFilePointer(hFsDll.get(), sectionHeader.PointerToRawData, nullptr, FILE_CURRENT); - if (DWORD read{}; ReadFile(hFsDll.get(), &buf[0], static_cast(buf.size()), &read, nullptr)) { - if (read < section.size_bytes()) { - logging::W("{} ReadFile: read {} bytes < requested {} bytes", LogTagW, read, section.size_bytes()); - return; - } - } else { - logging::I("{} ReadFile: Win32 error {}", LogTagW, GetLastError()); - return; - } - - const auto doRestore = g_startInfo.BootUnhookDlls.contains(unicode::convert(path.filename().u8string())); - std::optional tenderizer; - for (size_t i = 0, instructionLength = 1, printed = 0; i < buf.size(); i += instructionLength) { - if (section[i] == buf[i]) { + std::string formatBuf; + for (size_t inst = 0, instructionLength = 1, printed = 0; inst < buf.size(); inst += instructionLength) { + if (section[inst] == buf[inst]) { instructionLength = 1; continue; } - const auto rva = sectionHeader.VirtualAddress + i; + const auto rva = sectionHeader.VirtualAddress + inst; nmd_x86_instruction instruction{}; - if (!nmd_x86_decode(§ion[i], section.size() - i, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) { + if (!nmd_x86_decode(§ion[inst], section.size() - inst, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) { instructionLength = 1; if (printed < 64) { - logging::W("{} {}+0x{:0X}: dd {:02X}", LogTag, moduleName, rva, static_cast(section[i])); + logging::W("{} {}+0x{:0X}: dd {:02X}", LogTag, moduleName, rva, static_cast(section[inst])); printed++; } } else { instructionLength = instruction.length; if (printed < 64) { formatBuf.resize(128); - nmd_x86_format(&instruction, &formatBuf[0], reinterpret_cast(§ion[i]), NMD_X86_FORMAT_FLAGS_DEFAULT | NMD_X86_FORMAT_FLAGS_BYTES); + nmd_x86_format(&instruction, &formatBuf[0], reinterpret_cast(§ion[inst]), NMD_X86_FORMAT_FLAGS_DEFAULT | NMD_X86_FORMAT_FLAGS_BYTES); formatBuf.resize(strnlen(&formatBuf[0], formatBuf.size())); const auto& directory = mod.data_directory(IMAGE_DIRECTORY_ENTRY_EXPORT); @@ -103,25 +110,25 @@ void xivfixes::unhook_dll(bool bApply) { const auto functions = mod.span_as(exportDirectory.AddressOfFunctions, exportDirectory.NumberOfFunctions); std::string resolvedExportName; - for (size_t j = 0; j < names.size(); ++j) { + for (size_t nameIndex = 0; nameIndex < names.size(); ++nameIndex) { std::string_view name; - if (const char* pcszName = mod.address_as(names[j]); pcszName < mod.address() || pcszName >= mod.address() + mod.image_size()) { + if (const char* pcszName = mod.address_as(names[nameIndex]); pcszName < mod.address() || pcszName >= mod.address() + mod.image_size()) { if (IsBadReadPtr(pcszName, 256)) { - logging::W("{} Name #{} points to an invalid address outside the executable. Skipping.", LogTag, j); + logging::W("{} Name #{} points to an invalid address outside the executable. Skipping.", LogTag, nameIndex); continue; } name = std::string_view(pcszName, strnlen(pcszName, 256)); - logging::W("{} Name #{} points to a seemingly valid address outside the executable: {}", LogTag, j, name); + logging::W("{} Name #{} points to a seemingly valid address outside the executable: {}", LogTag, nameIndex, name); } - if (ordinals[j] >= functions.size()) { - logging::W("{} Ordinal #{} points to function index #{} >= #{}. Skipping.", LogTag, j, ordinals[j], functions.size()); + if (ordinals[nameIndex] >= functions.size()) { + logging::W("{} Ordinal #{} points to function index #{} >= #{}. Skipping.", LogTag, nameIndex, ordinals[nameIndex], functions.size()); continue; } - const auto rva = functions[ordinals[j]]; - if (rva == §ion[i] - mod.address()) { + const auto rva = functions[ordinals[nameIndex]]; + if (rva == §ion[inst] - mod.address()) { resolvedExportName = std::format("[export:{}]", name); break; } @@ -135,7 +142,7 @@ void xivfixes::unhook_dll(bool bApply) { if (doRestore) { if (!tenderizer) tenderizer.emplace(section, PAGE_EXECUTE_READWRITE); - memcpy(§ion[i], &buf[i], instructionLength); + memcpy(§ion[inst], &buf[inst], instructionLength); } } @@ -147,21 +154,7 @@ void xivfixes::unhook_dll(bool bApply) { } catch (const std::exception& e) { logging::W("{} Error: {}", LogTag, e.what()); } - }; - - // This is needed since try and __try cannot be used in the same function. Lambdas circumvent the limitation. - const auto windows_exception_handler = [&]() { - for (size_t i = 0; i < mods.size(); i++) { - const auto& mod = mods[i]; - __try { - test_module(i, mod); - } __except (EXCEPTION_EXECUTE_HANDLER) { - logging::W("{} Error: Access Violation", LogTag); - } - } - }; - - windows_exception_handler(); + } } using TFnGetInputDeviceManager = void* (); @@ -294,13 +287,11 @@ static bool is_xivalex(const std::filesystem::path& dllPath) { static bool is_openprocess_already_dealt_with() { static const auto s_value = [] { for (const auto& mod : utils::loaded_module::all_modules()) { - try { - if (is_xivalex(mod.path())) - return true; - - } catch (...) { - // pass - } + const auto path = mod.path().value_or({}); + if (path.empty()) + continue; + if (is_xivalex(path)) + return true; } return false; }(); @@ -650,43 +641,22 @@ void xivfixes::symbol_load_patches(bool bApply) { void xivfixes::disable_game_debugging_protection(bool bApply) { static const char* LogTag = "[xivfixes:disable_game_debugging_protection]"; - static const std::vector patchBytes = { - 0x31, 0xC0, // XOR EAX, EAX - 0x90, // NOP - 0x90, // NOP - 0x90, // NOP - 0x90 // NOP - }; + static std::optional> s_hookIsDebuggerPresent; - if (!bApply) - return; + if (bApply) { + if (!g_startInfo.BootEnabledGameFixes.contains("disable_game_debugging_protection")) { + logging::I("{} Turned off via environment variable.", LogTag); + return; + } - if (!g_startInfo.BootEnabledGameFixes.contains("disable_game_debugging_protection")) { - logging::I("{} Turned off via environment variable.", LogTag); - return; - } - - // Find IsDebuggerPresent in Framework.Tick() - const char* matchPtr = utils::signature_finder() - .look_in(utils::loaded_module(g_hGameInstance), ".text") - .look_for_hex("FF 15 ?? ?? ?? ?? 85 C0 74 13 41") - .find_one() - .Match.data(); - - if (!matchPtr) { - logging::E("{} Failed to find signature.", LogTag); - return; - } - - void* address = const_cast(static_cast(matchPtr)); - - DWORD oldProtect; - if (VirtualProtect(address, patchBytes.size(), PAGE_EXECUTE_READWRITE, &oldProtect)) { - memcpy(address, patchBytes.data(), patchBytes.size()); - VirtualProtect(address, patchBytes.size(), oldProtect, &oldProtect); - logging::I("{} Patch applied at address 0x{:X}.", LogTag, reinterpret_cast(address)); + s_hookIsDebuggerPresent.emplace("kernel32.dll!IsDebuggerPresent", "kernel32.dll", "IsDebuggerPresent", 0); + s_hookIsDebuggerPresent->set_detour([]() { return false; }); + logging::I("{} Enable", LogTag); } else { - logging::E("{} Failed to change memory protection.", LogTag); + if (s_hookIsDebuggerPresent) { + logging::I("{} Disable", LogTag); + s_hookIsDebuggerPresent.reset(); + } } } diff --git a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj index 1c89f4ff7..7f8de3843 100644 --- a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj +++ b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj @@ -38,7 +38,7 @@ Level3 true true - stdcpplatest + stdcpp23 pch.h ProgramDatabase CPPDLLTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) @@ -55,7 +55,7 @@ true false - MultiThreadedDebugDLL + MultiThreadedDebugDLL _DEBUG;%(PreprocessorDefinitions) @@ -67,7 +67,7 @@ true true - MultiThreadedDLL + MultiThreadedDLL NDEBUG;%(PreprocessorDefinitions) @@ -108,4 +108,4 @@ - + \ No newline at end of file diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index 76e84e779..01eb1a2ec 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -6,7 +6,7 @@ XIV Launcher addon framework - 13.0.0.0 + 13.0.0.3 $(DalamudVersion) $(DalamudVersion) $(DalamudVersion) @@ -68,7 +68,7 @@ - + all diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs index 8a97f5cc2..c008db08f 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs @@ -38,7 +38,7 @@ public abstract unsafe class AddonArgs /// /// The name to check. /// Whether it is the case. - internal bool IsAddon(ReadOnlySpan name) + internal bool IsAddon(string name) { if (this.Addon.IsNull) return false; @@ -46,12 +46,10 @@ public abstract unsafe class AddonArgs if (name.Length is 0 or > 32) return false; - var addonName = this.Addon.Name; - - if (string.IsNullOrEmpty(addonName)) + if (string.IsNullOrEmpty(this.Addon.Name)) return false; - return name == addonName; + return name == this.Addon.Name; } /// diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 4c32873c6..407b54060 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -38,7 +38,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState private readonly ClientStateAddressResolver address; private readonly Hook setupTerritoryTypeHook; private readonly Hook uiModuleHandlePacketHook; - private readonly Hook onLogoutHook; + private Hook onLogoutHook; [ServiceManager.ServiceDependency] private readonly Framework framework = Service.Get(); @@ -64,14 +64,14 @@ internal sealed class ClientState : IInternalDisposableService, IClientState this.setupTerritoryTypeHook = Hook.FromAddress(setTerritoryTypeAddr, this.SetupTerritoryTypeDetour); this.uiModuleHandlePacketHook = Hook.FromAddress((nint)UIModule.StaticVirtualTablePointer->HandlePacket, this.UIModuleHandlePacketDetour); - this.onLogoutHook = Hook.FromAddress((nint)LogoutCallbackInterface.StaticVirtualTablePointer->OnLogout, this.OnLogoutDetour); this.framework.Update += this.FrameworkOnOnUpdateEvent; this.networkHandlers.CfPop += this.NetworkHandlersOnCfPop; this.setupTerritoryTypeHook.Enable(); this.uiModuleHandlePacketHook.Enable(); - this.onLogoutHook.Enable(); + + this.framework.RunOnTick(this.Setup); } private unsafe delegate void ProcessPacketPlayerSetupDelegate(nint a1, nint packet); @@ -180,8 +180,25 @@ internal sealed class ClientState : IInternalDisposableService, IClientState this.networkHandlers.CfPop -= this.NetworkHandlersOnCfPop; } + private unsafe void Setup() + { + this.onLogoutHook = Hook.FromAddress((nint)AgentLobby.Instance()->LogoutCallbackInterface.VirtualTable->OnLogout, this.OnLogoutDetour); + this.onLogoutHook.Enable(); + + this.TerritoryType = (ushort)GameMain.Instance()->CurrentTerritoryTypeId; + } + private unsafe void SetupTerritoryTypeDetour(EventFramework* eventFramework, ushort territoryType) { + this.SetTerritoryType(territoryType); + this.setupTerritoryTypeHook.Original(eventFramework, territoryType); + } + + private unsafe void SetTerritoryType(ushort territoryType) + { + if (this.TerritoryType == territoryType) + return; + Log.Debug("TerritoryType changed: {0}", territoryType); this.TerritoryType = territoryType; @@ -207,8 +224,6 @@ internal sealed class ClientState : IInternalDisposableService, IClientState } } } - - this.setupTerritoryTypeHook.Original(eventFramework, territoryType); } private unsafe void UIModuleHandlePacketDetour( diff --git a/Dalamud/Game/Config/SystemConfigOption.cs b/Dalamud/Game/Config/SystemConfigOption.cs index 154992637..dcfe16751 100644 --- a/Dalamud/Game/Config/SystemConfigOption.cs +++ b/Dalamud/Game/Config/SystemConfigOption.cs @@ -1031,6 +1031,13 @@ public enum SystemConfigOption [GameConfigOption("TitleScreenType", ConfigType.UInt)] TitleScreenType, + /// + /// System option with the internal name DisplayObjectLimitType2. + /// This option is a UInt. + /// + [GameConfigOption("DisplayObjectLimitType2", ConfigType.UInt)] + DisplayObjectLimitType2, + /// /// System option with the internal name AccessibilitySoundVisualEnable. /// This option is a UInt. @@ -1115,6 +1122,13 @@ public enum SystemConfigOption [GameConfigOption("CameraZoom", ConfigType.UInt)] CameraZoom, + /// + /// System option with the internal name DynamicAroundRangeMode. + /// This option is a UInt. + /// + [GameConfigOption("DynamicAroundRangeMode", ConfigType.UInt)] + DynamicAroundRangeMode, + /// /// System option with the internal name DynamicRezoType. /// This option is a UInt. diff --git a/Dalamud/Game/Config/UiConfigOption.cs b/Dalamud/Game/Config/UiConfigOption.cs index 1a59b8945..f6a9aaa21 100644 --- a/Dalamud/Game/Config/UiConfigOption.cs +++ b/Dalamud/Game/Config/UiConfigOption.cs @@ -2032,6 +2032,13 @@ public enum UiConfigOption [GameConfigOption("NamePlateDispJobIconInInstanceOther", ConfigType.UInt)] NamePlateDispJobIconInInstanceOther, + /// + /// UiConfig option with the internal name LogNamePlateDispEnemyCast. + /// This option is a UInt. + /// + [GameConfigOption("LogNamePlateDispEnemyCast", ConfigType.UInt)] + LogNamePlateDispEnemyCast, + /// /// UiConfig option with the internal name ActiveInfo. /// This option is a UInt. @@ -2690,6 +2697,594 @@ public enum UiConfigOption [GameConfigOption("LogColorOtherClass", ConfigType.UInt)] LogColorOtherClass, + /// + /// UiConfig option with the internal name LogChatBubbleEnableChatBubble. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleEnableChatBubble", ConfigType.UInt)] + LogChatBubbleEnableChatBubble, + + /// + /// UiConfig option with the internal name LogChatBubbleShowMax. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShowMax", ConfigType.UInt)] + LogChatBubbleShowMax, + + /// + /// UiConfig option with the internal name LogChatBubbleShowOwnMessage. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShowOwnMessage", ConfigType.UInt)] + LogChatBubbleShowOwnMessage, + + /// + /// UiConfig option with the internal name LogChatBubbleShowDuringBattle. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShowDuringBattle", ConfigType.UInt)] + LogChatBubbleShowDuringBattle, + + /// + /// UiConfig option with the internal name LogChatBubbleSizeType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleSizeType", ConfigType.UInt)] + LogChatBubbleSizeType, + + /// + /// UiConfig option with the internal name LogChatBubbleShowLargePvP. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShowLargePvP", ConfigType.UInt)] + LogChatBubbleShowLargePvP, + + /// + /// UiConfig option with the internal name LogChatBubbleShowQuickChat. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShowQuickChat", ConfigType.UInt)] + LogChatBubbleShowQuickChat, + + /// + /// UiConfig option with the internal name LogChatBubbleDispRowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleDispRowType", ConfigType.UInt)] + LogChatBubbleDispRowType, + + /// + /// UiConfig option with the internal name LogChatBubbleSayShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleSayShowType", ConfigType.UInt)] + LogChatBubbleSayShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleSayFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleSayFontColor", ConfigType.UInt)] + LogChatBubbleSayFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleSayWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleSayWindowColor", ConfigType.UInt)] + LogChatBubbleSayWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleYellShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleYellShowType", ConfigType.UInt)] + LogChatBubbleYellShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleYellFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleYellFontColor", ConfigType.UInt)] + LogChatBubbleYellFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleYellWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleYellWindowColor", ConfigType.UInt)] + LogChatBubbleYellWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleShoutShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShoutShowType", ConfigType.UInt)] + LogChatBubbleShoutShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleShoutFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShoutFontColor", ConfigType.UInt)] + LogChatBubbleShoutFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleShoutWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleShoutWindowColor", ConfigType.UInt)] + LogChatBubbleShoutWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleTellShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleTellShowType", ConfigType.UInt)] + LogChatBubbleTellShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleTellFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleTellFontColor", ConfigType.UInt)] + LogChatBubbleTellFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleTellWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleTellWindowColor", ConfigType.UInt)] + LogChatBubbleTellWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubblePartyShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePartyShowType", ConfigType.UInt)] + LogChatBubblePartyShowType, + + /// + /// UiConfig option with the internal name LogChatBubblePartyFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePartyFontColor", ConfigType.UInt)] + LogChatBubblePartyFontColor, + + /// + /// UiConfig option with the internal name LogChatBubblePartyWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePartyWindowColor", ConfigType.UInt)] + LogChatBubblePartyWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleAllianceShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleAllianceShowType", ConfigType.UInt)] + LogChatBubbleAllianceShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleAllianceFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleAllianceFontColor", ConfigType.UInt)] + LogChatBubbleAllianceFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleAllianceWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleAllianceWindowColor", ConfigType.UInt)] + LogChatBubbleAllianceWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleFcShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleFcShowType", ConfigType.UInt)] + LogChatBubbleFcShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleFcFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleFcFontColor", ConfigType.UInt)] + LogChatBubbleFcFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleFcWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleFcWindowColor", ConfigType.UInt)] + LogChatBubbleFcWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleBeginnerShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleBeginnerShowType", ConfigType.UInt)] + LogChatBubbleBeginnerShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleBeginnerFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleBeginnerFontColor", ConfigType.UInt)] + LogChatBubbleBeginnerFontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleBeginnerWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleBeginnerWindowColor", ConfigType.UInt)] + LogChatBubbleBeginnerWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubblePvpteamShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePvpteamShowType", ConfigType.UInt)] + LogChatBubblePvpteamShowType, + + /// + /// UiConfig option with the internal name LogChatBubblePvpteamFontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePvpteamFontColor", ConfigType.UInt)] + LogChatBubblePvpteamFontColor, + + /// + /// UiConfig option with the internal name LogChatBubblePvpteamWindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubblePvpteamWindowColor", ConfigType.UInt)] + LogChatBubblePvpteamWindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs1ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs1ShowType", ConfigType.UInt)] + LogChatBubbleLs1ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs1FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs1FontColor", ConfigType.UInt)] + LogChatBubbleLs1FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs1WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs1WindowColor", ConfigType.UInt)] + LogChatBubbleLs1WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs2ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs2ShowType", ConfigType.UInt)] + LogChatBubbleLs2ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs2FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs2FontColor", ConfigType.UInt)] + LogChatBubbleLs2FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs2WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs2WindowColor", ConfigType.UInt)] + LogChatBubbleLs2WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs3ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs3ShowType", ConfigType.UInt)] + LogChatBubbleLs3ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs3FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs3FontColor", ConfigType.UInt)] + LogChatBubbleLs3FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs3WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs3WindowColor", ConfigType.UInt)] + LogChatBubbleLs3WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs4ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs4ShowType", ConfigType.UInt)] + LogChatBubbleLs4ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs4FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs4FontColor", ConfigType.UInt)] + LogChatBubbleLs4FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs4WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs4WindowColor", ConfigType.UInt)] + LogChatBubbleLs4WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs5ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs5ShowType", ConfigType.UInt)] + LogChatBubbleLs5ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs5FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs5FontColor", ConfigType.UInt)] + LogChatBubbleLs5FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs5WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs5WindowColor", ConfigType.UInt)] + LogChatBubbleLs5WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs6ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs6ShowType", ConfigType.UInt)] + LogChatBubbleLs6ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs6FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs6FontColor", ConfigType.UInt)] + LogChatBubbleLs6FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs6WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs6WindowColor", ConfigType.UInt)] + LogChatBubbleLs6WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs7ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs7ShowType", ConfigType.UInt)] + LogChatBubbleLs7ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs7FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs7FontColor", ConfigType.UInt)] + LogChatBubbleLs7FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs7WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs7WindowColor", ConfigType.UInt)] + LogChatBubbleLs7WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs8ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs8ShowType", ConfigType.UInt)] + LogChatBubbleLs8ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleLs8FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs8FontColor", ConfigType.UInt)] + LogChatBubbleLs8FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleLs8WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleLs8WindowColor", ConfigType.UInt)] + LogChatBubbleLs8WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls1ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls1ShowType", ConfigType.UInt)] + LogChatBubbleCwls1ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls1FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls1FontColor", ConfigType.UInt)] + LogChatBubbleCwls1FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls1WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls1WindowColor", ConfigType.UInt)] + LogChatBubbleCwls1WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls2ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls2ShowType", ConfigType.UInt)] + LogChatBubbleCwls2ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls2FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls2FontColor", ConfigType.UInt)] + LogChatBubbleCwls2FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls2WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls2WindowColor", ConfigType.UInt)] + LogChatBubbleCwls2WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls3ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls3ShowType", ConfigType.UInt)] + LogChatBubbleCwls3ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls3FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls3FontColor", ConfigType.UInt)] + LogChatBubbleCwls3FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls3WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls3WindowColor", ConfigType.UInt)] + LogChatBubbleCwls3WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls4ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls4ShowType", ConfigType.UInt)] + LogChatBubbleCwls4ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls4FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls4FontColor", ConfigType.UInt)] + LogChatBubbleCwls4FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls4WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls4WindowColor", ConfigType.UInt)] + LogChatBubbleCwls4WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls5ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls5ShowType", ConfigType.UInt)] + LogChatBubbleCwls5ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls5FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls5FontColor", ConfigType.UInt)] + LogChatBubbleCwls5FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls5WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls5WindowColor", ConfigType.UInt)] + LogChatBubbleCwls5WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls6ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls6ShowType", ConfigType.UInt)] + LogChatBubbleCwls6ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls6FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls6FontColor", ConfigType.UInt)] + LogChatBubbleCwls6FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls6WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls6WindowColor", ConfigType.UInt)] + LogChatBubbleCwls6WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls7ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls7ShowType", ConfigType.UInt)] + LogChatBubbleCwls7ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls7FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls7FontColor", ConfigType.UInt)] + LogChatBubbleCwls7FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls7WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls7WindowColor", ConfigType.UInt)] + LogChatBubbleCwls7WindowColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls8ShowType. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls8ShowType", ConfigType.UInt)] + LogChatBubbleCwls8ShowType, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls8FontColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls8FontColor", ConfigType.UInt)] + LogChatBubbleCwls8FontColor, + + /// + /// UiConfig option with the internal name LogChatBubbleCwls8WindowColor. + /// This option is a UInt. + /// + [GameConfigOption("LogChatBubbleCwls8WindowColor", ConfigType.UInt)] + LogChatBubbleCwls8WindowColor, + + /// + /// UiConfig option with the internal name LogPermeationRateInput. + /// This option is a UInt. + /// + [GameConfigOption("LogPermeationRateInput", ConfigType.UInt)] + LogPermeationRateInput, + /// /// UiConfig option with the internal name ChatType. /// This option is a UInt. @@ -3453,6 +4048,27 @@ public enum UiConfigOption [GameConfigOption("GPoseMotionFilterAction", ConfigType.UInt)] GPoseMotionFilterAction, + /// + /// UiConfig option with the internal name GPoseRollRotationCameraCorrection. + /// This option is a UInt. + /// + [GameConfigOption("GPoseRollRotationCameraCorrection", ConfigType.UInt)] + GPoseRollRotationCameraCorrection, + + /// + /// UiConfig option with the internal name GPoseInitCameraFocus. + /// This option is a UInt. + /// + [GameConfigOption("GPoseInitCameraFocus", ConfigType.UInt)] + GPoseInitCameraFocus, + + /// + /// UiConfig option with the internal name GposePortraitRotateType. + /// This option is a UInt. + /// + [GameConfigOption("GposePortraitRotateType", ConfigType.UInt)] + GposePortraitRotateType, + /// /// UiConfig option with the internal name LsListSortPriority. /// This option is a UInt. diff --git a/Dalamud/Game/Gui/ChatGui.cs b/Dalamud/Game/Gui/ChatGui.cs index 6de4e3c3f..d7303c4ce 100644 --- a/Dalamud/Game/Gui/ChatGui.cs +++ b/Dalamud/Game/Gui/ChatGui.cs @@ -41,7 +41,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui private static readonly ModuleLog Log = new("ChatGui"); private readonly Queue chatQueue = new(); - private readonly Dictionary<(string PluginName, Guid CommandId), Action> dalamudLinkHandlers = new(); + private readonly Dictionary<(string PluginName, uint CommandId), Action> dalamudLinkHandlers = new(); private readonly Hook printMessageHook; private readonly Hook inventoryItemCopyHook; @@ -50,7 +50,8 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui [ServiceManager.ServiceDependency] private readonly DalamudConfiguration configuration = Service.Get(); - private ImmutableDictionary<(string PluginName, Guid CommandId), Action>? dalamudLinkHandlersCopy; + private ImmutableDictionary<(string PluginName, uint CommandId), Action>? dalamudLinkHandlersCopy; + private uint dalamudChatHandlerId = 1000; [ServiceManager.ServiceConstructor] private ChatGui() @@ -86,7 +87,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui public byte LastLinkedItemFlags { get; private set; } /// - public IReadOnlyDictionary<(string PluginName, Guid CommandId), Action> RegisteredLinkHandlers + public IReadOnlyDictionary<(string PluginName, uint CommandId), Action> RegisteredLinkHandlers { get { @@ -164,19 +165,33 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui #region Chat Links - /// - public DalamudLinkPayload AddChatLinkHandler(Action commandAction) + /// + /// Register a chat link handler. + /// + /// Internal use only. + /// The action to be executed. + /// Returns an SeString payload for the link. + public DalamudLinkPayload AddChatLinkHandler(Action commandAction) { - return this.AddChatLinkHandler("Dalamud", commandAction); + return this.AddChatLinkHandler("Dalamud", this.dalamudChatHandlerId++, commandAction); } /// - public void RemoveChatLinkHandler(Guid commandId) + /// Internal use only. + public DalamudLinkPayload AddChatLinkHandler(uint commandId, Action commandAction) + { + return this.AddChatLinkHandler("Dalamud", commandId, commandAction); + } + + /// + /// Internal use only. + public void RemoveChatLinkHandler(uint commandId) { this.RemoveChatLinkHandler("Dalamud", commandId); } /// + /// Internal use only. public void RemoveChatLinkHandler() { this.RemoveChatLinkHandler("Dalamud"); @@ -240,11 +255,11 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui /// Create a link handler. /// /// The name of the plugin handling the link. + /// The ID of the command to run. /// The command action itself. /// A payload for handling. - internal DalamudLinkPayload AddChatLinkHandler(string pluginName, Action commandAction) + internal DalamudLinkPayload AddChatLinkHandler(string pluginName, uint commandId, Action commandAction) { - var commandId = Guid.CreateVersion7(); var payload = new DalamudLinkPayload { Plugin = pluginName, CommandId = commandId }; lock (this.dalamudLinkHandlers) { @@ -277,7 +292,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui /// /// The name of the plugin handling the link. /// The ID of the command to be removed. - internal void RemoveChatLinkHandler(string pluginName, Guid commandId) + internal void RemoveChatLinkHandler(string pluginName, uint commandId) { lock (this.dalamudLinkHandlers) { @@ -400,13 +415,13 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui if (!terminatedSender.SequenceEqual(possiblyModifiedSenderData)) { - Log.Verbose($"HandlePrintMessageDetour Sender modified: {SeString.Parse(terminatedSender)} -> {parsedSender}"); + Log.Verbose($"HandlePrintMessageDetour Sender modified: {new ReadOnlySeStringSpan(terminatedSender).ToMacroString()} -> {new ReadOnlySeStringSpan(possiblyModifiedSenderData).ToMacroString()}"); sender->SetString(possiblyModifiedSenderData); } if (!terminatedMessage.SequenceEqual(possiblyModifiedMessageData)) { - Log.Verbose($"HandlePrintMessageDetour Message modified: {SeString.Parse(terminatedMessage)} -> {parsedMessage}"); + Log.Verbose($"HandlePrintMessageDetour Message modified: {new ReadOnlySeStringSpan(terminatedMessage).ToMacroString()} -> {new ReadOnlySeStringSpan(possiblyModifiedMessageData).ToMacroString()}"); message->SetString(possiblyModifiedMessageData); } @@ -534,7 +549,7 @@ internal class ChatGuiPluginScoped : IInternalDisposableService, IChatGui public byte LastLinkedItemFlags => this.chatGuiService.LastLinkedItemFlags; /// - public IReadOnlyDictionary<(string PluginName, Guid CommandId), Action> RegisteredLinkHandlers => this.chatGuiService.RegisteredLinkHandlers; + public IReadOnlyDictionary<(string PluginName, uint CommandId), Action> RegisteredLinkHandlers => this.chatGuiService.RegisteredLinkHandlers; /// void IInternalDisposableService.DisposeService() @@ -551,11 +566,11 @@ internal class ChatGuiPluginScoped : IInternalDisposableService, IChatGui } /// - public DalamudLinkPayload AddChatLinkHandler(Action commandAction) - => this.chatGuiService.AddChatLinkHandler(this.plugin.InternalName, commandAction); + public DalamudLinkPayload AddChatLinkHandler(uint commandId, Action commandAction) + => this.chatGuiService.AddChatLinkHandler(this.plugin.InternalName, commandId, commandAction); /// - public void RemoveChatLinkHandler(Guid commandId) + public void RemoveChatLinkHandler(uint commandId) => this.chatGuiService.RemoveChatLinkHandler(this.plugin.InternalName, commandId); /// diff --git a/Dalamud/Game/Gui/Dtr/DtrBar.cs b/Dalamud/Game/Gui/Dtr/DtrBar.cs index 8a8a4787a..bd8d8e1d7 100644 --- a/Dalamud/Game/Gui/Dtr/DtrBar.cs +++ b/Dalamud/Game/Gui/Dtr/DtrBar.cs @@ -586,8 +586,7 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar newTextNode->LineSpacing = 12; newTextNode->AlignmentFontType = 5; newTextNode->FontSize = 14; - newTextNode->TextFlags = (byte)TextFlags.Edge; - newTextNode->TextFlags2 = 0; + newTextNode->TextFlags = TextFlags.Edge; if (this.emptyString == null) this.emptyString = Utf8String.FromString(" "); @@ -642,7 +641,7 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar break; case AddonEventType.MouseClick: - dtrBarEntry.OnClick?.Invoke(new AddonMouseEventData(eventData)); + dtrBarEntry.OnClick?.Invoke(DtrInteractionEvent.FromMouseEvent(new AddonMouseEventData(eventData))); break; } } diff --git a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs index 54847705d..6fdc504ca 100644 --- a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs +++ b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs @@ -43,6 +43,11 @@ public interface IReadOnlyDtrBarEntry /// Gets a value indicating whether the user has hidden this entry from view through the Dalamud settings. /// public bool UserHidden { get; } + + /// + /// Gets an action to be invoked when the user clicks on the dtr entry. + /// + public Action? OnClick { get; } } /// @@ -68,7 +73,7 @@ public interface IDtrBarEntry : IReadOnlyDtrBarEntry /// /// Gets or sets an action to be invoked when the user clicks on the dtr entry. /// - public Action? OnClick { get; set; } + public new Action? OnClick { get; set; } /// /// Remove this entry from the bar. @@ -118,7 +123,7 @@ internal sealed unsafe class DtrBarEntry : IDisposable, IDtrBarEntry public SeString? Tooltip { get; set; } /// - public Action? OnClick { get; set; } + public Action? OnClick { get; set; } /// public bool HasClickAction => this.OnClick != null; diff --git a/Dalamud/Game/Gui/Dtr/DtrInteractionEvent.cs b/Dalamud/Game/Gui/Dtr/DtrInteractionEvent.cs new file mode 100644 index 000000000..8b2bd8a7d --- /dev/null +++ b/Dalamud/Game/Gui/Dtr/DtrInteractionEvent.cs @@ -0,0 +1,59 @@ +using System.Numerics; + +using Dalamud.Game.Addon.Events.EventDataTypes; + +namespace Dalamud.Game.Gui.Dtr; + +/// +/// Represents an interaction event from the DTR system. +/// +public class DtrInteractionEvent +{ + /// + /// Gets the type of mouse click (left or right). + /// + public MouseClickType ClickType { get; init; } + + /// + /// Gets the modifier keys that were held during the click. + /// + public ClickModifierKeys ModifierKeys { get; init; } + + /// + /// Gets the scroll direction of the mouse wheel, if applicable. + /// + public MouseScrollDirection ScrollDirection { get; init; } + + /// + /// Gets lower-level mouse data, if this event came from native UI. + /// + /// Can only be set by Dalamud. If null, this event was manually created. + /// + public AddonMouseEventData? AtkEventSource { get; private init; } + + /// + /// Gets the position of the mouse cursor when the event occurred. + /// + public Vector2 Position { get; init; } + + /// + /// Helper to create a from an . + /// + /// The event. + /// A better event. + public static DtrInteractionEvent FromMouseEvent(AddonMouseEventData ev) + { + return new DtrInteractionEvent + { + AtkEventSource = ev, + ClickType = ev.IsLeftClick ? MouseClickType.Left : MouseClickType.Right, + ModifierKeys = (ev.IsAltHeld ? ClickModifierKeys.Alt : 0) | + (ev.IsControlHeld ? ClickModifierKeys.Ctrl : 0) | + (ev.IsShiftHeld ? ClickModifierKeys.Shift : 0), + ScrollDirection = ev.IsScrollUp ? MouseScrollDirection.Up : + ev.IsScrollDown ? MouseScrollDirection.Down : + MouseScrollDirection.None, + Position = ev.Position, + }; + } +} diff --git a/Dalamud/Game/Gui/Dtr/DtrInteractionTypes.cs b/Dalamud/Game/Gui/Dtr/DtrInteractionTypes.cs new file mode 100644 index 000000000..7c498dc94 --- /dev/null +++ b/Dalamud/Game/Gui/Dtr/DtrInteractionTypes.cs @@ -0,0 +1,65 @@ +namespace Dalamud.Game.Gui.Dtr; + +/// +/// An enum representing the mouse click types. +/// +public enum MouseClickType +{ + /// + /// A left click. + /// + Left, + + /// + /// A right click. + /// + Right, +} + +/// +/// Modifier keys that can be held during a mouse click event. +/// +[Flags] +public enum ClickModifierKeys +{ + /// + /// No modifiers were present. + /// + None = 0, + + /// + /// The CTRL key was held. + /// + Ctrl = 1 << 0, + + /// + /// The ALT key was held. + /// + Alt = 1 << 1, + + /// + /// The SHIFT key was held. + /// + Shift = 1 << 2, +} + +/// +/// Possible directions for scroll wheel events. +/// +public enum MouseScrollDirection +{ + /// + /// No scrolling. + /// + None = 0, + + /// + /// A scroll up event. + /// + Up = 1, + + /// + /// A scroll down event. + /// + Down = -1, +} diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs index dc1e54e77..67f4f563e 100644 --- a/Dalamud/Game/SigScanner.cs +++ b/Dalamud/Game/SigScanner.cs @@ -343,11 +343,11 @@ public class SigScanner : IDisposable, ISigScanner break; var scanRet = mBase + index; + mBase = scanRet + 1; if (this.IsCopy) scanRet -= this.moduleCopyOffset; yield return scanRet; - mBase = scanRet + 1; } } diff --git a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs index 9e2466df4..8b6a2bed8 100644 --- a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs +++ b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs @@ -121,6 +121,15 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator return this.Evaluate(ReadOnlySeString.FromMacroString(macroString).AsSpan(), localParameters, language); } + /// + public ReadOnlySeString EvaluateMacroString( + ReadOnlySpan macroString, + Span localParameters = default, + ClientLanguage? language = null) + { + return this.Evaluate(ReadOnlySeString.FromMacroString(macroString).AsSpan(), localParameters, language); + } + /// public ReadOnlySeString EvaluateFromAddon( uint addonId, @@ -247,6 +256,9 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator case MacroCode.Switch: return this.TryResolveSwitch(in context, payload); + case MacroCode.SwitchPlatform: + return this.TryResolveSwitchPlatform(in context, payload); + case MacroCode.PcName: return this.TryResolvePcName(in context, payload); @@ -450,6 +462,29 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator return false; } + private bool TryResolveSwitchPlatform(in SeStringContext context, in ReadOnlySePayloadSpan payload) + { + if (!payload.TryGetExpression(out var expr1)) + return false; + + if (!expr1.TryGetInt(out var intVal)) + return false; + + // Our version of the game uses IsMacClient() here and the + // Xbox version seems to always return 7 for the platform. + var platform = Util.IsWine() ? 5 : 3; + + // The sheet is seeminly split into first 20 rows for wired controllers + // and the last 20 rows for wireless controllers. + var rowId = (uint)((20 * ((intVal - 1) / 20)) + (platform - 4 < 2 ? 2 : 1)); + + if (!this.dataManager.GetExcelSheet().TryGetRow(rowId, out var platformRow)) + return false; + + context.Builder.Append(platformRow.Name); + return true; + } + private unsafe bool TryResolvePcName(in SeStringContext context, in ReadOnlySePayloadSpan payload) { if (!payload.TryGetExpression(out var eEntityId)) diff --git a/Dalamud/Game/Text/Evaluator/SeStringParameter.cs b/Dalamud/Game/Text/Evaluator/SeStringParameter.cs index 7201179ea..1c6dd96cb 100644 --- a/Dalamud/Game/Text/Evaluator/SeStringParameter.cs +++ b/Dalamud/Game/Text/Evaluator/SeStringParameter.cs @@ -77,4 +77,6 @@ public readonly struct SeStringParameter public static implicit operator SeStringParameter(DSeString value) => new(new ReadOnlySeString(value.Encode())); public static implicit operator SeStringParameter(string value) => new(value); + + public static implicit operator SeStringParameter(ReadOnlySpan value) => new(value); } diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs index ee06172b4..8b020b111 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs @@ -16,7 +16,7 @@ public class DalamudLinkPayload : Payload public override PayloadType Type => PayloadType.DalamudLink; /// Gets the plugin command ID to be linked. - public Guid CommandId { get; internal set; } + public uint CommandId { get; internal set; } /// Gets an optional extra integer value 1. public int Extra1 { get; internal set; } @@ -40,7 +40,7 @@ public class DalamudLinkPayload : Payload var ssb = Lumina.Text.SeStringBuilder.SharedPool.Get(); var res = ssb.BeginMacro(MacroCode.Link) .AppendIntExpression((int)EmbeddedInfoType.DalamudLink - 1) - .AppendStringExpression(this.CommandId.ToString()) + .AppendUIntExpression(this.CommandId) .AppendIntExpression(this.Extra1) .AppendIntExpression(this.Extra2) .BeginStringExpression() @@ -72,15 +72,15 @@ public class DalamudLinkPayload : Payload if (!pluginExpression.TryGetString(out var pluginString)) return; - if (!commandIdExpression.TryGetString(out var commandId)) + if (!commandIdExpression.TryGetUInt(out var commandId)) return; this.Plugin = pluginString.ExtractText(); - this.CommandId = Guid.Parse(commandId.ExtractText()); + this.CommandId = commandId; } else { - if (!commandIdExpression.TryGetString(out var commandId)) + if (!commandIdExpression.TryGetUInt(out var commandId)) return; if (!extra1Expression.TryGetInt(out var extra1)) @@ -102,7 +102,7 @@ public class DalamudLinkPayload : Payload return; } - this.CommandId = Guid.Parse(commandId.ExtractText()); + this.CommandId = commandId; this.Extra1 = extra1; this.Extra2 = extra2; this.Plugin = extraData[0]; diff --git a/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiBuildUiDelegate.cs b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiBuildUiDelegate.cs new file mode 100644 index 000000000..6ebab55c6 --- /dev/null +++ b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiBuildUiDelegate.cs @@ -0,0 +1,4 @@ +namespace Dalamud.Interface.ImGuiBackend.Delegates; + +/// Delegate to be called when ImGui should be used to layout now. +public delegate void ImGuiBuildUiDelegate(); diff --git a/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewInputFrameDelegate.cs b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewInputFrameDelegate.cs new file mode 100644 index 000000000..7397d8d7f --- /dev/null +++ b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewInputFrameDelegate.cs @@ -0,0 +1,4 @@ +namespace Dalamud.Interface.ImGuiBackend.Delegates; + +/// Delegate to be called on new input frame. +public delegate void ImGuiNewInputFrameDelegate(); diff --git a/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewRenderFrameDelegate.cs b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewRenderFrameDelegate.cs new file mode 100644 index 000000000..4a4b38b71 --- /dev/null +++ b/Dalamud/Interface/ImGuiBackend/Delegates/ImGuiNewRenderFrameDelegate.cs @@ -0,0 +1,4 @@ +namespace Dalamud.Interface.ImGuiBackend.Delegates; + +/// Delegate to be called on new render frame. +public delegate void ImGuiNewRenderFrameDelegate(); diff --git a/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs b/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs index ebb8e67e2..ea609828d 100644 --- a/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs +++ b/Dalamud/Interface/ImGuiBackend/Dx11Win32Backend.cs @@ -8,6 +8,7 @@ using System.Runtime.InteropServices; using Dalamud.Bindings.ImGui; using Dalamud.Bindings.ImGuizmo; using Dalamud.Bindings.ImPlot; +using Dalamud.Interface.ImGuiBackend.Delegates; using Dalamud.Interface.ImGuiBackend.Helpers; using Dalamud.Interface.ImGuiBackend.InputHandler; using Dalamud.Interface.ImGuiBackend.Renderers; @@ -93,13 +94,13 @@ internal sealed unsafe class Dx11Win32Backend : IWin32Backend ~Dx11Win32Backend() => this.ReleaseUnmanagedResources(); /// - public event IImGuiBackend.BuildUiDelegate? BuildUi; + public event ImGuiBuildUiDelegate? BuildUi; /// - public event IImGuiBackend.NewInputFrameDelegate? NewInputFrame; + public event ImGuiNewInputFrameDelegate? NewInputFrame; /// - public event IImGuiBackend.NewRenderFrameDelegate? NewRenderFrame; + public event ImGuiNewRenderFrameDelegate? NewRenderFrame; /// public bool UpdateCursor diff --git a/Dalamud/Interface/ImGuiBackend/IImGuiBackend.cs b/Dalamud/Interface/ImGuiBackend/IImGuiBackend.cs index 9248b4b5a..4a41191b5 100644 --- a/Dalamud/Interface/ImGuiBackend/IImGuiBackend.cs +++ b/Dalamud/Interface/ImGuiBackend/IImGuiBackend.cs @@ -1,4 +1,5 @@ -using Dalamud.Interface.ImGuiBackend.InputHandler; +using Dalamud.Interface.ImGuiBackend.Delegates; +using Dalamud.Interface.ImGuiBackend.InputHandler; using Dalamud.Interface.ImGuiBackend.Renderers; namespace Dalamud.Interface.ImGuiBackend; @@ -6,23 +7,14 @@ namespace Dalamud.Interface.ImGuiBackend; /// Backend for ImGui. internal interface IImGuiBackend : IDisposable { - /// Delegate to be called when ImGui should be used to layout now. - public delegate void BuildUiDelegate(); - - /// Delegate to be called on new input frame. - public delegate void NewInputFrameDelegate(); - - /// Delegaet to be called on new render frame. - public delegate void NewRenderFrameDelegate(); - /// User methods invoked every ImGui frame to construct custom UIs. - event BuildUiDelegate? BuildUi; + event ImGuiBuildUiDelegate? BuildUi; /// User methods invoked every ImGui frame on handling inputs. - event NewInputFrameDelegate? NewInputFrame; + event ImGuiNewInputFrameDelegate? NewInputFrame; /// User methods invoked every ImGui frame on handling renders. - event NewRenderFrameDelegate? NewRenderFrame; + event ImGuiNewRenderFrameDelegate? NewRenderFrame; /// Gets or sets a value indicating whether the cursor should be overridden with the ImGui cursor. /// @@ -36,7 +28,7 @@ internal interface IImGuiBackend : IDisposable /// Gets the input handler. IImGuiInputHandler InputHandler { get; } - + /// Gets the renderer. IImGuiRenderer Renderer { get; } @@ -45,7 +37,7 @@ internal interface IImGuiBackend : IDisposable /// Handles stuff before resizing happens. void OnPreResize(); - + /// Handles stuff after resizing happens. /// The new width. /// The new height. diff --git a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs index 1842028e2..596df4c67 100644 --- a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs +++ b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs @@ -1,19 +1,18 @@ -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using Dalamud.Bindings.ImGui; +using Dalamud.Memory; using Serilog; using TerraFX.Interop.Windows; -using static Dalamud.Interface.ImGuiBackend.Helpers.ImGuiViewportHelpers; - using static TerraFX.Interop.Windows.Windows; using ERROR = TerraFX.Interop.Windows.ERROR; @@ -245,6 +244,9 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler return default(LRESULT); } + if (!ImGui.IsWindowHovered(ImGuiHoveredFlags.AnyWindow)) + ImGui.ClearWindowFocus(); + break; } @@ -371,6 +373,14 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler case WM.WM_DISPLAYCHANGE: this.viewportHandler.UpdateMonitors(); break; + + case WM.WM_KILLFOCUS when hWndCurrent == this.hWnd: + if (!ImGui.IsAnyMouseDown() && GetCapture() == hWndCurrent) + ReleaseCapture(); + + ImGui.GetIO().WantCaptureMouse = false; + ImGui.ClearWindowFocus(); + break; } return null; @@ -531,7 +541,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // We still want to return MA_NOACTIVATE // https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mouseactivate - return 0x3; + return MA.MA_NOACTIVATE; case WM.WM_NCHITTEST: // Let mouse pass-through the window. This will allow the backend to set io.MouseHoveredViewport properly (which is OPTIONAL). // The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging. @@ -539,8 +549,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system. if (viewport.Flags.HasFlag(ImGuiViewportFlags.NoInputs)) { - // https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest - return -1; + return HTTRANSPARENT; } break; @@ -575,51 +584,50 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler private struct ViewportHandler : IDisposable { - [SuppressMessage("ReSharper", "CollectionNeverQueried.Local", Justification = "Keeping references alive")] - private readonly List delegateReferences = new(); + private static readonly string WindowClassName = typeof(ViewportHandler).FullName!; private Win32InputHandler input; - private nint classNamePtr; private bool wantUpdateMonitors = true; public ViewportHandler(Win32InputHandler input) { this.input = input; - this.classNamePtr = Marshal.StringToHGlobalUni("ImGui Platform"); var pio = ImGui.GetPlatformIO(); - pio.PlatformCreateWindow = this.RegisterFunctionPointer(this.OnCreateWindow); - pio.PlatformDestroyWindow = this.RegisterFunctionPointer(this.OnDestroyWindow); - pio.PlatformShowWindow = this.RegisterFunctionPointer(this.OnShowWindow); - pio.PlatformSetWindowPos = this.RegisterFunctionPointer(this.OnSetWindowPos); - pio.PlatformGetWindowPos = this.RegisterFunctionPointer(this.OnGetWindowPos); - pio.PlatformSetWindowSize = this.RegisterFunctionPointer(this.OnSetWindowSize); - pio.PlatformGetWindowSize = this.RegisterFunctionPointer(this.OnGetWindowSize); - pio.PlatformSetWindowFocus = this.RegisterFunctionPointer(this.OnSetWindowFocus); - pio.PlatformGetWindowFocus = this.RegisterFunctionPointer(this.OnGetWindowFocus); - pio.PlatformGetWindowMinimized = - this.RegisterFunctionPointer(this.OnGetWindowMinimized); - pio.PlatformSetWindowTitle = this.RegisterFunctionPointer(this.OnSetWindowTitle); - pio.PlatformSetWindowAlpha = this.RegisterFunctionPointer(this.OnSetWindowAlpha); - pio.PlatformUpdateWindow = this.RegisterFunctionPointer(this.OnUpdateWindow); + pio.PlatformCreateWindow = (delegate* unmanaged[Cdecl])&OnCreateWindow; + pio.PlatformDestroyWindow = (delegate* unmanaged[Cdecl])&OnDestroyWindow; + pio.PlatformShowWindow = (delegate* unmanaged[Cdecl])&OnShowWindow; + pio.PlatformSetWindowPos = (delegate* unmanaged[Cdecl])&OnSetWindowPos; + pio.PlatformGetWindowPos = (delegate* unmanaged[Cdecl])&OnGetWindowPos; + pio.PlatformSetWindowSize = (delegate* unmanaged[Cdecl])&OnSetWindowSize; + pio.PlatformGetWindowSize = (delegate* unmanaged[Cdecl])&OnGetWindowSize; + pio.PlatformSetWindowFocus = (delegate* unmanaged[Cdecl])&OnSetWindowFocus; + pio.PlatformGetWindowFocus = (delegate* unmanaged[Cdecl])&OnGetWindowFocus; + pio.PlatformGetWindowMinimized = (delegate* unmanaged[Cdecl])&OnGetWindowMinimized; + pio.PlatformSetWindowTitle = (delegate* unmanaged[Cdecl])&OnSetWindowTitle; + pio.PlatformSetWindowAlpha = (delegate* unmanaged[Cdecl])&OnSetWindowAlpha; + pio.PlatformUpdateWindow = (delegate* unmanaged[Cdecl])&OnUpdateWindow; // pio.Platform_SetImeInputPos = this.RegisterFunctionPointer(this.OnSetImeInputPos); // pio.Platform_GetWindowDpiScale = this.RegisterFunctionPointer(this.OnGetWindowDpiScale); // pio.Platform_ChangedViewport = this.RegisterFunctionPointer(this.OnChangedViewport); - var wcex = new WNDCLASSEXW + fixed (char* windowClassNamePtr = WindowClassName) { - cbSize = (uint)sizeof(WNDCLASSEXW), - style = CS.CS_HREDRAW | CS.CS_VREDRAW, - hInstance = GetModuleHandleW(null), - hbrBackground = (HBRUSH)(1 + COLOR.COLOR_BACKGROUND), - lpfnWndProc = (delegate* unmanaged)Marshal - .GetFunctionPointerForDelegate(this.input.wndProcDelegate), - lpszClassName = (ushort*)this.classNamePtr, - }; + var wcex = new WNDCLASSEXW + { + cbSize = (uint)sizeof(WNDCLASSEXW), + style = CS.CS_HREDRAW | CS.CS_VREDRAW, + hInstance = (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module), + hbrBackground = (HBRUSH)(1 + COLOR.COLOR_BACKGROUND), + lpfnWndProc = (delegate* unmanaged)Marshal + .GetFunctionPointerForDelegate(this.input.wndProcDelegate), + lpszClassName = (ushort*)windowClassNamePtr, + }; - if (RegisterClassExW(&wcex) == 0) - throw Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()) ?? new("RegisterClassEx Fail"); + if (RegisterClassExW(&wcex) == 0) + throw Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()) ?? new("RegisterClassEx Fail"); + } // Register main window handle (which is owned by the main application, not by us) // This is mostly for simplicity and consistency, so that our code (e.g. mouse handling etc.) can use same logic for main and secondary viewports. @@ -647,11 +655,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler ImGui.GetPlatformIO().Handle->Monitors = default; } - if (this.classNamePtr != 0) + fixed (char* windowClassNamePtr = WindowClassName) { - UnregisterClassW((ushort*)this.classNamePtr, GetModuleHandleW(null)); - Marshal.FreeHGlobal(this.classNamePtr); - this.classNamePtr = 0; + UnregisterClassW( + (ushort*)windowClassNamePtr, + (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module)); } pio.PlatformCreateWindow = null; @@ -740,13 +748,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler } } - private void* RegisterFunctionPointer(T obj) - { - this.delegateReferences.Add(obj); - return Marshal.GetFunctionPointerForDelegate(obj).ToPointer(); - } - - private void OnCreateWindow(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnCreateWindow(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)Marshal.AllocHGlobal(Marshal.SizeOf()); viewport.PlatformUserData = data; @@ -774,12 +777,12 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler }; AdjustWindowRectEx(&rect, (uint)data->DwStyle, false, (uint)data->DwExStyle); - fixed (char* pwszWindowTitle = "Untitled") + fixed (char* windowClassNamePtr = WindowClassName) { data->Hwnd = CreateWindowExW( (uint)data->DwExStyle, - (ushort*)this.classNamePtr, - (ushort*)pwszWindowTitle, + (ushort*)windowClassNamePtr, + (ushort*)windowClassNamePtr, (uint)data->DwStyle, rect.left, rect.top, @@ -787,8 +790,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler rect.bottom - rect.top, parentWindow, default, - GetModuleHandleW(null), - default); + (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module), + null); } data->HwndOwned = true; @@ -796,7 +799,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler viewport.PlatformHandle = viewport.PlatformHandleRaw = data->Hwnd; } - private void OnDestroyWindow(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnDestroyWindow(ImGuiViewportPtr viewport) { // This is also called on the main viewport for some reason, and we never set that viewport's PlatformUserData if (viewport.PlatformUserData == null) return; @@ -807,7 +811,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler { // Transfer capture so if we started dragging from a window that later disappears, we'll still receive the MOUSEUP event. ReleaseCapture(); - SetCapture(this.input.hWnd); + if (viewport.ParentViewportId != 0) + { + var parentViewport = ImGui.FindViewportByID(viewport.ParentViewportId); + SetCapture((HWND)parentViewport.PlatformHandle); + } } if (data->Hwnd != nint.Zero && data->HwndOwned) @@ -826,7 +834,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler viewport.PlatformUserData = viewport.PlatformHandle = null; } - private void OnShowWindow(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnShowWindow(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; @@ -836,7 +845,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler ShowWindow(data->Hwnd, SW.SW_SHOW); } - private void OnUpdateWindow(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnUpdateWindow(ImGuiViewportPtr viewport) { // (Optional) Update Win32 style if it changed _after_ creation. // Generally they won't change unless configuration flags are changed, but advanced uses (such as manually rewriting viewport flags) make this useful. @@ -897,17 +907,18 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler } } - private Vector2* OnGetWindowPos(Vector2* returnStorage, ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Vector2* OnGetWindowPos(Vector2* returnValueStorage, ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var pt = new POINT { x = 0, y = 0 }; ClientToScreen(data->Hwnd, &pt); - returnStorage->X = pt.x; - returnStorage->Y = pt.y; - return returnStorage; + *returnValueStorage = new(pt.x, pt.y); + return returnValueStorage; } - private void OnSetWindowPos(ImGuiViewportPtr viewport, Vector2 pos) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSetWindowPos(ImGuiViewportPtr viewport, Vector2 pos) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var rect = new RECT((int)pos.X, (int)pos.Y, (int)pos.X, (int)pos.Y); @@ -924,17 +935,18 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler SWP.SWP_NOACTIVATE); } - private Vector2* OnGetWindowSize(Vector2* returnStorage, ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Vector2* OnGetWindowSize(Vector2* returnValueStorage, ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; RECT rect; GetClientRect(data->Hwnd, &rect); - returnStorage->X = rect.right - rect.left; - returnStorage->Y = rect.bottom - rect.top; - return returnStorage; + *returnValueStorage = new(rect.right - rect.left, rect.bottom - rect.top); + return returnValueStorage; } - private void OnSetWindowSize(ImGuiViewportPtr viewport, Vector2 size) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSetWindowSize(ImGuiViewportPtr viewport, Vector2 size) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; @@ -952,7 +964,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler SWP.SWP_NOACTIVATE); } - private void OnSetWindowFocus(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSetWindowFocus(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; @@ -961,26 +974,30 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler SetFocus(data->Hwnd); } - private bool OnGetWindowFocus(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static byte OnGetWindowFocus(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; - return GetForegroundWindow() == data->Hwnd; + return GetForegroundWindow() == data->Hwnd ? (byte)1 : (byte)0; } - private bool OnGetWindowMinimized(ImGuiViewportPtr viewport) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static byte OnGetWindowMinimized(ImGuiViewportPtr viewport) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; - return IsIconic(data->Hwnd); + return IsIconic(data->Hwnd) ? (byte)1 : (byte)0; } - private void OnSetWindowTitle(ImGuiViewportPtr viewport, string title) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSetWindowTitle(ImGuiViewportPtr viewport, byte* title) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; - fixed (char* pwszTitle = title) + fixed (char* pwszTitle = MemoryHelper.ReadStringNullTerminated((nint)title)) SetWindowTextW(data->Hwnd, (ushort*)pwszTitle); } - private void OnSetWindowAlpha(ImGuiViewportPtr viewport, float alpha) + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSetWindowAlpha(ImGuiViewportPtr viewport, float alpha) { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; var style = GetWindowLongW(data->Hwnd, GWL.GWL_EXSTYLE); diff --git a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs index 9e97a11b8..3f6fc46de 100644 --- a/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs +++ b/Dalamud/Interface/ImGuiBackend/Renderers/Dx11Renderer.cs @@ -223,15 +223,15 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer ImDrawDataPtr drawData, bool clearRenderTarget) { + // Do nothing when there's nothing to draw + if (drawData.IsNull || !drawData.Valid) + return; + // Avoid rendering when minimized if (drawData.DisplaySize.X <= 0 || drawData.DisplaySize.Y <= 0) return; - using var oldState = new D3D11DeviceContextStateBackup(this.featureLevel, this.context.Get()); - - // Setup desired DX state - this.SetupRenderState(drawData); - + // Set up render target this.context.Get()->OMSetRenderTargets(1, &renderTargetView, null); if (clearRenderTarget) { @@ -239,17 +239,17 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.context.Get()->ClearRenderTargetView(renderTargetView, (float*)&color); } - if (!drawData.Valid || drawData.CmdListsCount == 0) - return; - + // Stop if there's nothing to draw var cmdLists = new Span(drawData.Handle->CmdLists, drawData.Handle->CmdListsCount); + if (cmdLists.IsEmpty) + return; // Create and grow vertex/index buffers if needed if (this.vertexBufferSize < drawData.TotalVtxCount) this.vertexBuffer.Dispose(); if (this.vertexBuffer.Get() is null) { - this.vertexBufferSize = drawData.TotalVtxCount + 5000; + this.vertexBufferSize = drawData.TotalVtxCount + 8192; var desc = new D3D11_BUFFER_DESC( (uint)(sizeof(ImDrawVert) * this.vertexBufferSize), (uint)D3D11_BIND_FLAG.D3D11_BIND_VERTEX_BUFFER, @@ -264,7 +264,7 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.indexBuffer.Dispose(); if (this.indexBuffer.Get() is null) { - this.indexBufferSize = drawData.TotalIdxCount + 5000; + this.indexBufferSize = drawData.TotalIdxCount + 16384; var desc = new D3D11_BUFFER_DESC( (uint)(sizeof(ushort) * this.indexBufferSize), (uint)D3D11_BIND_FLAG.D3D11_BIND_INDEX_BUFFER, @@ -275,9 +275,14 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer this.indexBuffer.Attach(buffer); } - // Upload vertex/index data into a single contiguous GPU buffer + using var oldState = new D3D11DeviceContextStateBackup(this.featureLevel, this.context.Get()); + + // Setup desired DX state + this.SetupRenderState(drawData); + try { + // Upload vertex/index data into a single contiguous GPU buffer. var vertexData = default(D3D11_MAPPED_SUBRESOURCE); var indexData = default(D3D11_MAPPED_SUBRESOURCE); this.context.Get()->Map( @@ -306,26 +311,18 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer targetVertices = targetVertices[vertices.Length..]; targetIndices = targetIndices[indices.Length..]; } - } - finally - { - this.context.Get()->Unmap((ID3D11Resource*)this.vertexBuffer.Get(), 0); - this.context.Get()->Unmap((ID3D11Resource*)this.indexBuffer.Get(), 0); - } - // Setup orthographic projection matrix into our constant buffer. - // Our visible imgui space lies from DisplayPos (LT) to DisplayPos+DisplaySize (RB). - // DisplayPos is (0,0) for single viewport apps. - try - { - var data = default(D3D11_MAPPED_SUBRESOURCE); + // Setup orthographic projection matrix into our constant buffer. + // Our visible imgui space lies from DisplayPos (LT) to DisplayPos+DisplaySize (RB). + // DisplayPos is (0,0) for single viewport apps. + var constantBufferData = default(D3D11_MAPPED_SUBRESOURCE); this.context.Get()->Map( (ID3D11Resource*)this.vertexConstantBuffer.Get(), 0, D3D11_MAP.D3D11_MAP_WRITE_DISCARD, 0, - &data).ThrowOnError(); - *(Matrix4x4*)data.pData = Matrix4x4.CreateOrthographicOffCenter( + &constantBufferData).ThrowOnError(); + *(Matrix4x4*)constantBufferData.pData = Matrix4x4.CreateOrthographicOffCenter( drawData.DisplayPos.X, drawData.DisplayPos.X + drawData.DisplaySize.X, drawData.DisplayPos.Y + drawData.DisplaySize.Y, @@ -335,6 +332,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer } finally { + this.context.Get()->Unmap((ID3D11Resource*)this.vertexBuffer.Get(), 0); + this.context.Get()->Unmap((ID3D11Resource*)this.indexBuffer.Get(), 0); this.context.Get()->Unmap((ID3D11Resource*)this.vertexConstantBuffer.Get(), 0); } @@ -343,8 +342,6 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer var vertexOffset = 0; var indexOffset = 0; var clipOff = new Vector4(drawData.DisplayPos, drawData.DisplayPos.X, drawData.DisplayPos.Y); - this.context.Get()->PSSetShader(this.pixelShader, null, 0); - this.context.Get()->PSSetSamplers(0, 1, this.sampler.GetAddressOf()); foreach (ref var cmdList in cmdLists) { var cmds = new ImVectorWrapper(cmdList.Handle->CmdBuffer.ToUntyped()); @@ -467,7 +464,8 @@ internal unsafe partial class Dx11Renderer : IImGuiRenderer buffer = this.vertexConstantBuffer.Get(); ctx->VSSetConstantBuffers(0, 1, &buffer); - // PS handled later + ctx->PSSetShader(this.pixelShader, null, 0); + ctx->PSSetSamplers(0, 1, this.sampler.GetAddressOf()); ctx->GSSetShader(null, null, 0); ctx->HSSetShader(null, null, 0); diff --git a/Dalamud/Interface/Internal/DalamudIme.cs b/Dalamud/Interface/Internal/DalamudIme.cs index 99f769f79..cdb976333 100644 --- a/Dalamud/Interface/Internal/DalamudIme.cs +++ b/Dalamud/Interface/Internal/DalamudIme.cs @@ -2,11 +2,9 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Text.Unicode; @@ -46,24 +44,24 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService .ToDictionary(x => x.Item1, x => x.Name); private static readonly UnicodeRange[] HanRange = - { + [ UnicodeRanges.CjkRadicalsSupplement, UnicodeRanges.CjkSymbolsandPunctuation, UnicodeRanges.CjkUnifiedIdeographsExtensionA, UnicodeRanges.CjkUnifiedIdeographs, UnicodeRanges.CjkCompatibilityIdeographs, - UnicodeRanges.CjkCompatibilityForms, + UnicodeRanges.CjkCompatibilityForms // No more; Extension B~ are outside BMP range - }; + ]; private static readonly UnicodeRange[] HangulRange = - { + [ UnicodeRanges.HangulJamo, UnicodeRanges.HangulSyllables, UnicodeRanges.HangulCompatibilityJamo, UnicodeRanges.HangulJamoExtendedA, - UnicodeRanges.HangulJamoExtendedB, - }; + UnicodeRanges.HangulJamoExtendedB + ]; [ServiceManager.ServiceDependency] private readonly DalamudConfiguration dalamudConfiguration = Service.Get(); @@ -109,24 +107,6 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService private bool updateInputLanguage = true; private bool updateImeStatusAgain; - [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1003:Symbols should be spaced correctly", Justification = ".")] - static DalamudIme() - { - nint cimgui; - try - { - _ = ImGui.GetCurrentContext(); - - cimgui = Process.GetCurrentProcess().Modules.Cast() - .First(x => x.ModuleName == "cimgui.dll") - .BaseAddress; - } - catch - { - return; - } - } - [ServiceManager.ServiceConstructor] private DalamudIme(InterfaceManager.InterfaceManagerWithScene imws) { @@ -170,11 +150,11 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService if (!ImGui.GetIO().ConfigInputTextCursorBlink) return true; var textState = GetInputTextState(); - if (textState->Id == 0 || (textState->Flags & ImGuiInputTextFlags.ReadOnly) != 0) + if (textState.ID == 0 || (textState.Flags & ImGuiInputTextFlags.ReadOnly) != 0) return true; - if (textState->CursorAnim <= 0) + if (textState.CursorAnim <= 0) return true; - return textState->CursorAnim % 1.2f <= 0.8f; + return textState.CursorAnim % 1.2f <= 0.8f; } } @@ -227,11 +207,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService } } - private static ImGuiInputTextStateWrapper* GetInputTextState() - { - var ctx = ImGui.GetCurrentContext(); - return (ImGuiInputTextStateWrapper*)&ctx.Handle->InputTextState; - } + private static ImGuiInputTextStatePtr GetInputTextState() => new(&ImGui.GetCurrentContext().Handle->InputTextState); private static (string String, bool Supported) ToUcs2(char* data, int nc = -1) { @@ -332,7 +308,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService try { var textState = GetInputTextState(); - var invalidTarget = textState->Id == 0 || (textState->Flags & ImGuiInputTextFlags.ReadOnly) != 0; + var invalidTarget = textState.ID == 0 || (textState.Flags & ImGuiInputTextFlags.ReadOnly) != 0; #if IMEDEBUG switch (args.Message) @@ -564,17 +540,17 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService var textState = GetInputTextState(); if (this.temporaryUndoSelection is not null) { - textState->Undo(); - textState->SelectionTuple = this.temporaryUndoSelection.Value; + textState.Undo(); + textState.SetSelectionTuple(this.temporaryUndoSelection.Value); this.temporaryUndoSelection = null; } - textState->SanitizeSelectionRange(); - if (textState->ReplaceSelectionAndPushUndo(newString)) - this.temporaryUndoSelection = textState->SelectionTuple; + textState.SanitizeSelectionRange(); + if (textState.ReplaceSelectionAndPushUndo(newString)) + this.temporaryUndoSelection = textState.GetSelectionTuple(); // Put the cursor at the beginning, so that the candidate window appears aligned with the text. - textState->SetSelectionRange(textState->SelectionTuple.Start, newString.Length, 0); + textState.SetSelectionRange(textState.GetSelectionTuple().Start, newString.Length, 0); if (finalCommit) { @@ -621,7 +597,7 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService this.temporaryUndoSelection = null; var textState = GetInputTextState(); - textState->Stb.SelectStart = textState->Stb.Cursor = textState->Stb.SelectEnd; + textState.Stb.SelectStart = textState.Stb.Cursor = textState.Stb.SelectEnd; this.candidateStrings.Clear(); this.immCandNative = default; @@ -931,185 +907,6 @@ internal sealed unsafe class DalamudIme : IInternalDisposableService } } - /// - /// Ported from imstb_textedit.h. - /// - [StructLayout(LayoutKind.Sequential, Size = 0xE2C)] - private struct StbTextEditState - { - /// - /// Position of the text cursor within the string. - /// - public int Cursor; - - /// - /// Selection start point. - /// - public int SelectStart; - - /// - /// selection start and end point in characters; if equal, no selection. - /// - /// - /// Note that start may be less than or greater than end (e.g. when dragging the mouse, - /// start is where the initial click was, and you can drag in either direction.) - /// - public int SelectEnd; - - /// - /// Each text field keeps its own insert mode state. - /// To keep an app-wide insert mode, copy this value in/out of the app state. - /// - public byte InsertMode; - - /// - /// Page size in number of row. - /// This value MUST be set to >0 for pageup or pagedown in multilines documents. - /// - public int RowCountPerPage; - - // Remainder is stb-private data. - } - - [StructLayout(LayoutKind.Sequential)] - private struct ImGuiInputTextStateWrapper - { - public uint Id; - public int CurLenW; - public int CurLenA; - public ImVector TextWRaw; - public ImVector TextARaw; - public ImVector InitialTextARaw; - public bool TextAIsValid; - public int BufCapacityA; - public float ScrollX; - public StbTextEditState Stb; - public float CursorAnim; - public bool CursorFollow; - public bool SelectedAllMouseLock; - public bool Edited; - public ImGuiInputTextFlags Flags; - - public ImVectorWrapper TextW => new((ImVector*)&this.ThisWrapperPtr->TextWRaw); - - public (int Start, int End, int Cursor) SelectionTuple - { - get => (this.Stb.SelectStart, this.Stb.SelectEnd, this.Stb.Cursor); - set => (this.Stb.SelectStart, this.Stb.SelectEnd, this.Stb.Cursor) = value; - } - - private ImGuiInputTextStateWrapper* ThisWrapperPtr => (ImGuiInputTextStateWrapper*)Unsafe.AsPointer(ref this); - - private ImGuiInputTextState* ThisPtr => (ImGuiInputTextState*)Unsafe.AsPointer(ref this); - - public void SetSelectionRange(int offset, int length, int relativeCursorOffset) - { - this.Stb.SelectStart = offset; - this.Stb.SelectEnd = offset + length; - if (relativeCursorOffset >= 0) - this.Stb.Cursor = this.Stb.SelectStart + relativeCursorOffset; - else - this.Stb.Cursor = this.Stb.SelectEnd + 1 + relativeCursorOffset; - this.SanitizeSelectionRange(); - } - - public void SanitizeSelectionRange() - { - ref var s = ref this.Stb.SelectStart; - ref var e = ref this.Stb.SelectEnd; - ref var c = ref this.Stb.Cursor; - s = Math.Clamp(s, 0, this.CurLenW); - e = Math.Clamp(e, 0, this.CurLenW); - c = Math.Clamp(c, 0, this.CurLenW); - if (s == e) - s = e = c; - if (s > e) - (s, e) = (e, s); - } - - public void Undo() => ImGuiP.Custom_StbTextUndo(this.ThisPtr); - - public bool MakeUndoReplace(int offset, int oldLength, int newLength) - { - if (oldLength == 0 && newLength == 0) - return false; - - ImGuiP.Custom_StbTextMakeUndoReplace(this.ThisPtr, offset, oldLength, newLength); - return true; - } - - public bool ReplaceSelectionAndPushUndo(ReadOnlySpan newText) - { - var off = this.Stb.SelectStart; - var len = this.Stb.SelectEnd - this.Stb.SelectStart; - return this.MakeUndoReplace(off, len, newText.Length) && this.ReplaceChars(off, len, newText); - } - - public bool ReplaceChars(int pos, int len, ReadOnlySpan newText) - { - this.DeleteChars(pos, len); - return this.InsertChars(pos, newText); - } - - // See imgui_widgets.cpp: STB_TEXTEDIT_DELETECHARS - public void DeleteChars(int pos, int n) - { - if (n == 0) - return; - - var dst = this.TextW.Data + pos; - - // We maintain our buffer length in both UTF-8 and wchar formats - this.Edited = true; - this.CurLenA -= Encoding.UTF8.GetByteCount(dst, n); - this.CurLenW -= n; - - // Offset remaining text (FIXME-OPT: Use memmove) - var src = this.TextW.Data + pos + n; - int i; - for (i = 0; src[i] != 0; i++) - dst[i] = src[i]; - dst[i] = '\0'; - } - - // See imgui_widgets.cpp: STB_TEXTEDIT_INSERTCHARS - public bool InsertChars(int pos, ReadOnlySpan newText) - { - if (newText.Length == 0) - return true; - - var isResizable = (this.Flags & ImGuiInputTextFlags.CallbackResize) != 0; - var textLen = this.CurLenW; - Debug.Assert(pos <= textLen, "pos <= text_len"); - - var newTextLenUtf8 = Encoding.UTF8.GetByteCount(newText); - if (!isResizable && newTextLenUtf8 + this.CurLenA + 1 > this.BufCapacityA) - return false; - - // Grow internal buffer if needed - if (newText.Length + textLen + 1 > this.TextW.Length) - { - if (!isResizable) - return false; - - Debug.Assert(textLen < this.TextW.Length, "text_len < this.TextW.Length"); - this.TextW.Resize(textLen + Math.Clamp(newText.Length * 4, 32, Math.Max(256, newText.Length)) + 1); - } - - var text = this.TextW.DataSpan; - if (pos != textLen) - text.Slice(pos, textLen - pos).CopyTo(text[(pos + newText.Length)..]); - newText.CopyTo(text[pos..]); - - this.Edited = true; - this.CurLenW += newText.Length; - this.CurLenA += newTextLenUtf8; - this.TextW[this.CurLenW] = '\0'; - - return true; - } - } - #if IMEDEBUG private static class ImeDebug { diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index d475d36bc..7b105b914 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -575,16 +575,6 @@ internal class DalamudInterface : IInternalDisposableService if (this.isCreditsDarkening) this.DrawCreditsDarkeningAnimation(); - - // Release focus of any ImGui window if we click into the game. - var io = ImGui.GetIO(); - if (!io.WantCaptureMouse && (global::Windows.Win32.PInvoke.GetKeyState((int)VirtualKey.LBUTTON) & 0x8000) != 0) - { - unsafe - { - ImGui.SetWindowFocus((byte*)null); - } - } } catch (Exception ex) { @@ -856,9 +846,9 @@ internal class DalamudInterface : IInternalDisposableService this.OpenBranchSwitcher(); } - ImGui.MenuItem(this.dalamud.StartInfo.GameVersion?.ToString() ?? "Unknown version", false); - ImGui.MenuItem($"D: {Util.GetScmVersion()} CS: {Util.GetGitHashClientStructs()}[{FFXIVClientStructs.ThisAssembly.Git.Commits}]", false); - ImGui.MenuItem($"CLR: {Environment.Version}", false); + ImGui.MenuItem(this.dalamud.StartInfo.GameVersion?.ToString() ?? "Unknown version", false, false); + ImGui.MenuItem($"D: {Util.GetScmVersion()} CS: {Util.GetGitHashClientStructs()}[{FFXIVClientStructs.ThisAssembly.Git.Commits}]", false, false); + ImGui.MenuItem($"CLR: {Environment.Version}", false, false); ImGui.EndMenu(); } @@ -1021,8 +1011,8 @@ internal class DalamudInterface : IInternalDisposableService } ImGui.Separator(); - ImGui.MenuItem("API Level:" + PluginManager.DalamudApiLevel, false); - ImGui.MenuItem("Loaded plugins:" + pluginManager.InstalledPlugins.Count(), false); + ImGui.MenuItem("API Level:" + PluginManager.DalamudApiLevel, false, false); + ImGui.MenuItem("Loaded plugins:" + pluginManager.InstalledPlugins.Count(), false, false); ImGui.EndMenu(); } diff --git a/Dalamud/Interface/Internal/ImGuiInputTextStatePtrExtensions.cs b/Dalamud/Interface/Internal/ImGuiInputTextStatePtrExtensions.cs new file mode 100644 index 000000000..ab5fdaac8 --- /dev/null +++ b/Dalamud/Interface/Internal/ImGuiInputTextStatePtrExtensions.cs @@ -0,0 +1,123 @@ +using System.Diagnostics; +using System.Text; + +using Dalamud.Bindings.ImGui; + +namespace Dalamud.Interface.Internal; + +#pragma warning disable SA1600 +internal static unsafe class ImGuiInputTextStatePtrExtensions +{ + public static (int Start, int End, int Cursor) GetSelectionTuple(this ImGuiInputTextStatePtr self) => + (self.Stb.SelectStart, self.Stb.SelectEnd, self.Stb.Cursor); + + public static void SetSelectionTuple(this ImGuiInputTextStatePtr self, (int Start, int End, int Cursor) value) => + (self.Stb.SelectStart, self.Stb.SelectEnd, self.Stb.Cursor) = value; + + public static void SetSelectionRange(this ImGuiInputTextStatePtr self, int offset, int length, int relativeCursorOffset) + { + self.Stb.SelectStart = offset; + self.Stb.SelectEnd = offset + length; + if (relativeCursorOffset >= 0) + self.Stb.Cursor = self.Stb.SelectStart + relativeCursorOffset; + else + self.Stb.Cursor = self.Stb.SelectEnd + 1 + relativeCursorOffset; + self.SanitizeSelectionRange(); + } + + public static void SanitizeSelectionRange(this ImGuiInputTextStatePtr self) + { + ref var s = ref self.Stb.SelectStart; + ref var e = ref self.Stb.SelectEnd; + ref var c = ref self.Stb.Cursor; + s = Math.Clamp(s, 0, self.CurLenW); + e = Math.Clamp(e, 0, self.CurLenW); + c = Math.Clamp(c, 0, self.CurLenW); + if (s == e) + s = e = c; + if (s > e) + (s, e) = (e, s); + } + + public static void Undo(this ImGuiInputTextStatePtr self) => ImGuiP.Custom_StbTextUndo(self); + + public static bool MakeUndoReplace(this ImGuiInputTextStatePtr self, int offset, int oldLength, int newLength) + { + if (oldLength == 0 && newLength == 0) + return false; + + ImGuiP.Custom_StbTextMakeUndoReplace(self, offset, oldLength, newLength); + return true; + } + + public static bool ReplaceSelectionAndPushUndo(this ImGuiInputTextStatePtr self, ReadOnlySpan newText) + { + var off = self.Stb.SelectStart; + var len = self.Stb.SelectEnd - self.Stb.SelectStart; + return self.MakeUndoReplace(off, len, newText.Length) && self.ReplaceChars(off, len, newText); + } + + public static bool ReplaceChars(this ImGuiInputTextStatePtr self, int pos, int len, ReadOnlySpan newText) + { + self.DeleteChars(pos, len); + return self.InsertChars(pos, newText); + } + + // See imgui_widgets.cpp: STB_TEXTEDIT_DELETECHARS + public static void DeleteChars(this ImGuiInputTextStatePtr self, int pos, int n) + { + if (n == 0) + return; + + var dst = (char*)self.TextW.Data + pos; + + // We maintain our buffer length in both UTF-8 and wchar formats + self.Edited = true; + self.CurLenA -= Encoding.UTF8.GetByteCount(dst, n); + self.CurLenW -= n; + + // Offset remaining text (FIXME-OPT: Use memmove) + var src = (char*)self.TextW.Data + pos + n; + int i; + for (i = 0; src[i] != 0; i++) + dst[i] = src[i]; + dst[i] = '\0'; + } + + // See imgui_widgets.cpp: STB_TEXTEDIT_INSERTCHARS + public static bool InsertChars(this ImGuiInputTextStatePtr self, int pos, ReadOnlySpan newText) + { + if (newText.Length == 0) + return true; + + var isResizable = (self.Flags & ImGuiInputTextFlags.CallbackResize) != 0; + var textLen = self.CurLenW; + Debug.Assert(pos <= textLen, "pos <= text_len"); + + var newTextLenUtf8 = Encoding.UTF8.GetByteCount(newText); + if (!isResizable && newTextLenUtf8 + self.CurLenA + 1 > self.BufCapacityA) + return false; + + // Grow internal buffer if needed + if (newText.Length + textLen + 1 > self.TextW.Size) + { + if (!isResizable) + return false; + + Debug.Assert(textLen < self.TextW.Size, "text_len < self.TextW.Length"); + self.TextW.Resize(textLen + Math.Clamp(newText.Length * 4, 32, Math.Max(256, newText.Length)) + 1); + } + + var text = new Span(self.TextW.Data, self.TextW.Size); + if (pos != textLen) + text.Slice(pos, textLen - pos).CopyTo(text[(pos + newText.Length)..]); + newText.CopyTo(text[pos..]); + + self.Edited = true; + self.CurLenW += newText.Length; + self.CurLenA += newTextLenUtf8; + self.TextW[self.CurLenW] = '\0'; + + return true; + } +} diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 72c964062..d68bc8bef 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -18,6 +18,7 @@ using Dalamud.Hooking; using Dalamud.Hooking.Internal; using Dalamud.Hooking.WndProcHook; using Dalamud.Interface.ImGuiBackend; +using Dalamud.Interface.ImGuiBackend.Delegates; using Dalamud.Interface.ImGuiNotification; using Dalamud.Interface.ImGuiNotification.Internal; using Dalamud.Interface.Internal.Asserts; @@ -128,7 +129,7 @@ internal partial class InterfaceManager : IInternalDisposableService /// /// This event gets called each frame to facilitate ImGui drawing. /// - public event IImGuiBackend.BuildUiDelegate? Draw; + public event ImGuiBuildUiDelegate? Draw; /// /// This event gets called when ResizeBuffers is called. @@ -634,29 +635,6 @@ internal partial class InterfaceManager : IInternalDisposableService Service.ProvideException(ex); Log.Error(ex, "Could not load ImGui dependencies."); - fixed (void* lpText = - "Dalamud plugins require the Microsoft Visual C++ Redistributable to be installed.\nPlease install the runtime from the official Microsoft website or disable Dalamud.\n\nDo you want to download the redistributable now?") - { - fixed (void* lpCaption = "Dalamud Error") - { - var res = MessageBoxW( - default, - (ushort*)lpText, - (ushort*)lpCaption, - MB.MB_YESNO | MB.MB_TOPMOST | MB.MB_ICONERROR); - - if (res == IDYES) - { - var psi = new ProcessStartInfo - { - FileName = "https://aka.ms/vs/16/release/vc_redist.x64.exe", - UseShellExecute = true, - }; - Process.Start(psi); - } - } - } - Environment.Exit(-1); // Doesn't reach here, but to make the compiler not complain diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs index a7c73165c..82aec5c41 100644 --- a/Dalamud/Interface/Internal/UiDebug.cs +++ b/Dalamud/Interface/Internal/UiDebug.cs @@ -243,8 +243,6 @@ internal unsafe class UiDebug ImGui.Text($"BGColor: #{textNode->BackgroundColor.R:X2}{textNode->BackgroundColor.G:X2}{textNode->BackgroundColor.B:X2}{textNode->BackgroundColor.A:X2}"); ImGui.Text($"TextFlags: {textNode->TextFlags}"); - ImGui.SameLine(); - ImGui.Text($"TextFlags2: {textNode->TextFlags2}"); break; case NodeType.Counter: diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs index 15c27d5b7..b58166e89 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -117,9 +118,11 @@ public class AddonLifecycleWidget : IDataWindowWidget { ImGui.Columns(2); + var functionAddress = receiveEventListener.FunctionAddress; + ImGui.Text("Hook Address"u8); ImGui.NextColumn(); - ImGui.Text(receiveEventListener.FunctionAddress.ToString("X")); + ImGui.Text($"0x{functionAddress:X} (ffxiv_dx11.exe+{functionAddress - Process.GetCurrentProcess().MainModule!.BaseAddress:X})"); ImGui.NextColumn(); ImGui.Text("Hook Status"u8); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs index 8d31168e2..bc12f4d28 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs @@ -27,7 +27,7 @@ internal class UldWidget : IDataWindowWidget { // ULD styles can be hardcoded for now as they don't add new ones regularly. Can later try and find where to load these from in the game EXE. private static readonly string[] ThemeDisplayNames = ["Dark", "Light", "Classic FF", "Clear Blue"]; - private static readonly string[] ThemeBasePaths = ["ui/uld/", "ui/uld/light/", "ui/uld/third/", "ui/uld/fourth/"]; + private static readonly string[] ThemeBasePaths = ["ui/uld/", "ui/uld/img01/", "ui/uld/img02/", "ui/uld/img03/"]; // 48 8D 15 ?? ?? ?? ?? is the part of the signatures that contain the string location offset // 48 = 64 bit register prefix diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 3536c9fe7..946a5f19a 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -2076,10 +2076,18 @@ internal class PluginInstallerWindow : Window, IDisposable var isOpen = this.openPluginCollapsibles.Contains(index); var sectionSize = ImGuiHelpers.GlobalScale * 66; - var tapeCursor = ImGui.GetCursorPos(); ImGui.Separator(); + var childId = $"plugin_child_{label}_{plugin?.EffectiveWorkingPluginId}_{manifest.InternalName}"; + const ImGuiWindowFlags childFlags = ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse; + + using var pluginChild = ImRaii.Child(childId, new Vector2(ImGui.GetContentRegionAvail().X, sectionSize), false, childFlags); + if (!pluginChild) + { + return isOpen; + } + var startCursor = ImGui.GetCursorPos(); if (flags.HasFlag(PluginHeaderFlags.IsTesting)) @@ -2115,7 +2123,7 @@ internal class PluginInstallerWindow : Window, IDisposable } } - DrawCautionTape(tapeCursor + new Vector2(0, 1), new Vector2(ImGui.GetWindowWidth(), sectionSize + ImGui.GetStyle().ItemSpacing.Y), ImGuiHelpers.GlobalScale * 40, 20); + DrawCautionTape(startCursor + new Vector2(0, 1), new Vector2(ImGui.GetWindowWidth(), sectionSize + ImGui.GetStyle().ItemSpacing.Y), ImGuiHelpers.GlobalScale * 40, 20); } ImGui.PushStyleColor(ImGuiCol.Button, isOpen ? new Vector4(0.5f, 0.5f, 0.5f, 0.1f) : Vector4.Zero); @@ -2124,7 +2132,7 @@ internal class PluginInstallerWindow : Window, IDisposable ImGui.PushStyleColor(ImGuiCol.ButtonActive, new Vector4(0.5f, 0.5f, 0.5f, 0.35f)); ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 0); - ImGui.SetCursorPos(tapeCursor); + ImGui.SetCursorPos(startCursor); if (ImGui.Button($"###plugin{index}CollapsibleBtn", new Vector2(ImGui.GetContentRegionAvail().X, sectionSize + ImGui.GetStyle().ItemSpacing.Y))) { diff --git a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs index cedd260a6..e3eb22a04 100644 --- a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs +++ b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs @@ -477,7 +477,7 @@ internal class TitleScreenMenuWindow : Window, IDisposable var textNode = addon->GetTextNodeById(3); // look and feel init. should be harmless to set. - textNode->TextFlags |= (byte)TextFlags.MultiLine; + textNode->TextFlags |= TextFlags.MultiLine; textNode->AlignmentType = AlignmentType.TopLeft; var containsDalamudVersionString = textNode->OriginalTextPointer.Value == textNode->NodeText.StringPtr.Value; diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index 64b785f59..e38537018 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -122,6 +122,34 @@ public interface IUiBuilder /// IFontSpec DefaultFontSpec { get; } + /// + /// Gets the default Dalamud font size in points. + /// + public float FontDefaultSizePt { get; } + + /// + /// Gets the default Dalamud font size in pixels. + /// + public float FontDefaultSizePx { get; } + + /// + /// Gets the default Dalamud font - supporting all game languages and icons.
+ /// Accessing this static property outside of is dangerous and not supported. + ///
+ public ImFontPtr FontDefault { get; } + + /// + /// Gets the default Dalamud icon font based on FontAwesome 5 Free solid.
+ /// Accessing this static property outside of is dangerous and not supported. + ///
+ public ImFontPtr FontIcon { get; } + + /// + /// Gets the default Dalamud monospaced font based on Inconsolata Regular.
+ /// Accessing this static property outside of is dangerous and not supported. + ///
+ public ImFontPtr FontMono { get; } + /// /// Gets the game's active Direct3D device. /// @@ -380,6 +408,21 @@ public sealed class UiBuilder : IDisposable, IUiBuilder /// public IFontSpec DefaultFontSpec => Service.Get().DefaultFontSpec; + /// + public float FontDefaultSizePt => Service.Get().DefaultFontSpec.SizePt; + + /// + public float FontDefaultSizePx => Service.Get().DefaultFontSpec.SizePx; + + /// + public ImFontPtr FontDefault => InterfaceManager.DefaultFont; + + /// + public ImFontPtr FontIcon => InterfaceManager.IconFont; + + /// + public ImFontPtr FontMono => InterfaceManager.MonoFont; + /// /// Gets the handle to the default Dalamud font - supporting all game languages and icons. /// @@ -541,15 +584,6 @@ public sealed class UiBuilder : IDisposable, IUiBuilder internal static bool DoStats { get; set; } = false; #endif - private void OnDefaultStyleChanged() - => this.DefaultStyleChanged.InvokeSafely(); - - private void OnDefaultGlobalScaleChanged() - => this.DefaultGlobalScaleChanged.InvokeSafely(); - - private void OnDefaultFontChanged() - => this.DefaultFontChanged.InvokeSafely(); - /// /// Gets a value indicating whether this UiBuilder has a configuration UI registered. /// @@ -796,6 +830,15 @@ public sealed class UiBuilder : IDisposable, IUiBuilder this.ResizeBuffers?.InvokeSafely(); } + private void OnDefaultStyleChanged() + => this.DefaultStyleChanged.InvokeSafely(); + + private void OnDefaultGlobalScaleChanged() + => this.DefaultGlobalScaleChanged.InvokeSafely(); + + private void OnDefaultFontChanged() + => this.DefaultFontChanged.InvokeSafely(); + private class FontHandleWrapper : IFontHandle { private IFontHandle? wrapped; diff --git a/Dalamud/Interface/Utility/ImGuiHelpers.cs b/Dalamud/Interface/Utility/ImGuiHelpers.cs index 27cb3596c..87f258250 100644 --- a/Dalamud/Interface/Utility/ImGuiHelpers.cs +++ b/Dalamud/Interface/Utility/ImGuiHelpers.cs @@ -203,8 +203,8 @@ public static partial class ImGuiHelpers ImGui.SetClipboardText(textCopy.IsNull ? text.Span : textCopy.Span); } - text.Dispose(); - textCopy.Dispose(); + text.Recycle(); + textCopy.Recycle(); } /// Draws a SeString. diff --git a/Dalamud/Plugin/ActivePluginsChangedEventArgs.cs b/Dalamud/Plugin/ActivePluginsChangedEventArgs.cs index 0c857be79..7a3991dcd 100644 --- a/Dalamud/Plugin/ActivePluginsChangedEventArgs.cs +++ b/Dalamud/Plugin/ActivePluginsChangedEventArgs.cs @@ -2,10 +2,8 @@ using System.Collections.Generic; namespace Dalamud.Plugin; -/// -/// Contains data about changes to the list of active plugins. -/// -public class ActivePluginsChangedEventArgs : EventArgs +/// +public class ActivePluginsChangedEventArgs : EventArgs, IActivePluginsChangedEventArgs { /// /// Initializes a new instance of the class @@ -19,13 +17,9 @@ public class ActivePluginsChangedEventArgs : EventArgs this.AffectedInternalNames = affectedInternalNames; } - /// - /// Gets the invalidation kind that caused this event to be fired. - /// + /// public PluginListInvalidationKind Kind { get; } - /// - /// Gets the InternalNames of affected plugins. - /// + /// public IEnumerable AffectedInternalNames { get; } } diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 25c998a42..541071b63 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -489,7 +489,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa /// Dispatch the active plugins changed event. /// /// The event arguments containing information about the change. - internal void NotifyActivePluginsChanged(ActivePluginsChangedEventArgs args) + internal void NotifyActivePluginsChanged(IActivePluginsChangedEventArgs args) { foreach (var action in Delegate.EnumerateInvocationList(this.ActivePluginsChanged)) { diff --git a/Dalamud/Plugin/IActivePluginsChangedEventArgs.cs b/Dalamud/Plugin/IActivePluginsChangedEventArgs.cs new file mode 100644 index 000000000..17c4347c7 --- /dev/null +++ b/Dalamud/Plugin/IActivePluginsChangedEventArgs.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace Dalamud.Plugin; + +/// +/// Contains data about changes to the list of active plugins. +/// +public interface IActivePluginsChangedEventArgs +{ + /// + /// Gets the invalidation kind that caused this event to be fired. + /// + PluginListInvalidationKind Kind { get; } + + /// + /// Gets the InternalNames of affected plugins. + /// + IEnumerable AffectedInternalNames { get; } +} diff --git a/Dalamud/Plugin/IDalamudPluginInterface.cs b/Dalamud/Plugin/IDalamudPluginInterface.cs index 1a1a47403..e98398a16 100644 --- a/Dalamud/Plugin/IDalamudPluginInterface.cs +++ b/Dalamud/Plugin/IDalamudPluginInterface.cs @@ -33,7 +33,7 @@ public interface IDalamudPluginInterface /// Delegate for events that listen to changes to the list of active plugins. /// /// The event arguments containing information about the change. - public delegate void ActivePluginsChangedDelegate(ActivePluginsChangedEventArgs args); + public delegate void ActivePluginsChangedDelegate(IActivePluginsChangedEventArgs args); /// /// Event that gets fired when loc is changed diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index a4aa3919b..db803caa8 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -1240,7 +1240,7 @@ internal class PluginManager : IInternalDisposableService } return this.bannedPlugins.Any(ban => (ban.Name == manifest.InternalName || ban.Name == Hash.GetStringSha256Hash(manifest.InternalName)) - && ban.AssemblyVersion >= versionToCheck); + && (ban.AssemblyVersion == null || ban.AssemblyVersion >= versionToCheck)); } /// diff --git a/Dalamud/Plugin/Internal/Types/BannedPlugin.cs b/Dalamud/Plugin/Internal/Types/BannedPlugin.cs index a21bbf02b..384318a56 100644 --- a/Dalamud/Plugin/Internal/Types/BannedPlugin.cs +++ b/Dalamud/Plugin/Internal/Types/BannedPlugin.cs @@ -17,7 +17,7 @@ internal struct BannedPlugin /// Gets plugin assembly version. /// [JsonProperty] - public Version AssemblyVersion { get; private set; } + public Version? AssemblyVersion { get; private set; } /// /// Gets reason for the ban. diff --git a/Dalamud/Plugin/Services/IChatGui.cs b/Dalamud/Plugin/Services/IChatGui.cs index ab595dc3f..c474ca386 100644 --- a/Dalamud/Plugin/Services/IChatGui.cs +++ b/Dalamud/Plugin/Services/IChatGui.cs @@ -83,20 +83,21 @@ public interface IChatGui /// /// Gets the dictionary of Dalamud Link Handlers. /// - public IReadOnlyDictionary<(string PluginName, Guid CommandId), Action> RegisteredLinkHandlers { get; } + public IReadOnlyDictionary<(string PluginName, uint CommandId), Action> RegisteredLinkHandlers { get; } /// /// Register a chat link handler. /// + /// The ID of the command. /// The action to be executed. /// Returns an SeString payload for the link. - public DalamudLinkPayload AddChatLinkHandler(Action commandAction); + public DalamudLinkPayload AddChatLinkHandler(uint commandId, Action commandAction); /// /// Remove a chat link handler. /// /// The ID of the command. - public void RemoveChatLinkHandler(Guid commandId); + public void RemoveChatLinkHandler(uint commandId); /// /// Removes all chat link handlers registered by the plugin. diff --git a/Dalamud/Plugin/Services/ISeStringEvaluator.cs b/Dalamud/Plugin/Services/ISeStringEvaluator.cs index 65932652e..4efc29e3e 100644 --- a/Dalamud/Plugin/Services/ISeStringEvaluator.cs +++ b/Dalamud/Plugin/Services/ISeStringEvaluator.cs @@ -38,6 +38,15 @@ public interface ISeStringEvaluator /// An evaluated . ReadOnlySeString EvaluateMacroString(string macroString, Span localParameters = default, ClientLanguage? language = null); + /// + /// Evaluates macros in a macro string. + /// + /// The macro string. + /// An optional list of local parameters. + /// An optional language override. + /// An evaluated . + ReadOnlySeString EvaluateMacroString(ReadOnlySpan macroString, Span localParameters = default, ClientLanguage? language = null); + /// /// Evaluates macros in text from the Addon sheet. /// diff --git a/Dalamud/Support/BugBait.cs b/Dalamud/Support/BugBait.cs index 8dbf2e429..7ce96208c 100644 --- a/Dalamud/Support/BugBait.cs +++ b/Dalamud/Support/BugBait.cs @@ -36,6 +36,7 @@ internal static class BugBait Reporter = reporter, Name = plugin.InternalName, Version = isTesting ? plugin.TestingAssemblyVersion?.ToString() : plugin.AssemblyVersion.ToString(), + Platform = Util.GetHostPlatform().ToString(), DalamudHash = Util.GetScmVersion(), }; @@ -66,6 +67,9 @@ internal static class BugBait [JsonProperty("version")] public string? Version { get; set; } + [JsonProperty("platform")] + public string? Platform { get; set; } + [JsonProperty("reporter")] public string? Reporter { get; set; } diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index a95f3ed66..a1c2eb6b2 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -9,6 +9,7 @@ using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; using Dalamud.Bindings.ImGui; @@ -27,6 +28,8 @@ using Windows.Win32.System.Memory; using Windows.Win32.System.Ole; using Windows.Win32.UI.WindowsAndMessaging; +using Dalamud.Interface.Internal; + using FLASHWINFO = Windows.Win32.UI.WindowsAndMessaging.FLASHWINFO; using HWND = Windows.Win32.Foundation.HWND; using MEMORY_BASIC_INFORMATION = Windows.Win32.System.Memory.MEMORY_BASIC_INFORMATION; @@ -522,17 +525,36 @@ public static partial class Util public static bool IsWindows11() => Environment.OSVersion.Version.Build >= 22000; /// - /// Open a link in the default browser. + /// Open a link in the default browser, and attempts to focus the newly launched application. /// /// The link to open. - public static void OpenLink(string url) - { - var process = new ProcessStartInfo(url) + public static void OpenLink(string url) => new Thread( + static url => { - UseShellExecute = true, - }; - Process.Start(process); - } + try + { + var psi = new ProcessStartInfo((string)url!) + { + UseShellExecute = true, + ErrorDialogParentHandle = Service.GetNullable() is { } im + ? im.GameWindowHandle + : 0, + Verb = "open", + }; + if (Process.Start(psi) is not { } process) + return; + + if (process.Id != 0) + TerraFX.Interop.Windows.Windows.AllowSetForegroundWindow((uint)process.Id); + process.WaitForInputIdle(); + TerraFX.Interop.Windows.Windows.SetForegroundWindow( + (TerraFX.Interop.Windows.HWND)process.MainWindowHandle); + } + catch (Exception e) + { + Log.Error(e, "{fn}: failed to open {url}", nameof(OpenLink), url); + } + }).Start(url); /// /// Perform a "zipper merge" (A, 1, B, 2, C, 3) of multiple enumerables, allowing for lists to end early. diff --git a/DalamudCrashHandler/DalamudCrashHandler.cpp b/DalamudCrashHandler/DalamudCrashHandler.cpp index 62ccdd20a..ec7115ffd 100644 --- a/DalamudCrashHandler/DalamudCrashHandler.cpp +++ b/DalamudCrashHandler/DalamudCrashHandler.cpp @@ -463,12 +463,14 @@ void open_folder_and_select_items(HWND hwndOpener, const std::wstring& path) { void export_tspack(HWND hWndParent, const std::filesystem::path& logDir, const std::string& crashLog, const std::string& troubleshootingPackData) { static const char* SourceLogFiles[] = { - "output.log", + "output.log", // XIVLauncher for Windows + "launcher.log", // XIVLauncher.Core for [mostly] Linux "patcher.log", "dalamud.log", "dalamud.injector.log", "dalamud.boot.log", "aria.log", + "wine.log" }; static constexpr auto MaxSizePerLog = 1 * 1024 * 1024; static constexpr std::array OutputFileTypeFilterSpec{{ diff --git a/Directory.Build.props b/Directory.Build.props index 224b610b6..b5330709f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,7 +10,7 @@ - 6.3.0 + 6.5.1 13.0.3 diff --git a/filter_imgui_bindings.ps1 b/filter_imgui_bindings.ps1 index e2ca0d7ba..55f02599d 100644 --- a/filter_imgui_bindings.ps1 +++ b/filter_imgui_bindings.ps1 @@ -21,7 +21,7 @@ $sourcePaths = ( # replace "ImGuiKey.GamepadStart" $tmp = Get-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Raw $tmp = $tmp.Replace("unchecked((int)GamepadStart)", "unchecked((int)ImGuiKey.GamepadStart)").Trim() -$tmp | Set-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Encoding ascii +$tmp.Trim() | Set-Content -Path "$PSScriptRoot\imgui\Dalamud.Bindings.ImGui\Generated\Enums\ImGuiKeyPrivate.cs" -Encoding ascii try { @@ -141,7 +141,9 @@ foreach ($sourcePath in $sourcePaths) $husks = $husks.Replace("public unsafe struct", "public unsafe partial struct") $husks = $referNativeFunctionQualified.Replace($husks, '$1Native.$2') $husks = "// `r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`n$husks" - $husks | Set-Content -Path "$targetPath.gen.cs" -Encoding ascii + $husks = $husks -ireplace 'nuint (ActiveIdUsingKeyInputMask)', 'ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN $1' + $husks = $husks.Replace('ref Unsafe.AsRef(&Handle->ActiveIdUsingKeyInputMask)', 'ref Unsafe.AsRef(&Handle->ActiveIdUsingKeyInputMask)') + $husks.Trim() | Set-Content -Path "$targetPath.gen.cs" -Encoding ascii } $husks = "// `r`n`r`nusing $([string]::Join(";`r`nusing ", $imports) );`r`n`r`nnamespace $namespace;`r`n`r`n" @@ -286,6 +288,6 @@ foreach ($sourcePath in $sourcePaths) $null = $sb.Append("// DISCARDED: $methodName`r`n") } - $sb.ToString() | Set-Content -Path "$targetPath/$className.gen.cs" -Encoding ascii + $sb.ToString().Trim() | Set-Content -Path "$targetPath/$className.gen.cs" -Encoding ascii } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGui.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGui.gen.cs index 3574ab21f..8db9fb7de 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGui.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGui.gen.cs @@ -8896,4 +8896,3 @@ public unsafe partial class ImGui // DISCARDED: internal static byte VSliderFloatNative(byte* label, Vector2 size, float* v, float vMin, float vMax, byte* format, ImGuiSliderFlags flags) // DISCARDED: internal static byte VSliderIntNative(byte* label, Vector2 size, int* v, int vMin, int vMax, byte* format, ImGuiSliderFlags flags) // DISCARDED: internal static byte VSliderScalarNative(byte* label, Vector2 size, ImGuiDataType dataType, void* pData, void* pMin, void* pMax, byte* format, ImGuiSliderFlags flags) - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGuiNative.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGuiNative.gen.cs index 22386e992..5e2fd7fa2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGuiNative.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Functions/ImGuiNative.gen.cs @@ -4828,4 +4828,3 @@ public unsafe partial class ImGuiNative } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs.gen.cs index f853f5402..2fe66de88 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs.gen.cs @@ -2250,7 +2250,7 @@ namespace Dalamud.Bindings.ImGui public byte ActiveIdUsingMouseWheel; public uint ActiveIdUsingNavDirMask; public uint ActiveIdUsingNavInputMask; - public nuint ActiveIdUsingKeyInputMask; + public ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN ActiveIdUsingKeyInputMask; public ImGuiItemFlags CurrentItemFlags; public ImGuiNextItemData NextItemData; public ImGuiLastItemData LastItemData; @@ -2546,7 +2546,7 @@ namespace Dalamud.Bindings.ImGui public int WantCaptureKeyboardNextFrame; public int WantTextInputNextFrame; public ImVector TempBuffer; - public unsafe ImGuiContext(bool initialized = default, bool fontAtlasOwnedByContext = default, ImGuiIO io = default, ImGuiPlatformIO platformIo = default, ImVector inputEventsQueue = default, ImVector inputEventsTrail = default, ImGuiStyle style = default, ImGuiConfigFlags configFlagsCurrFrame = default, ImGuiConfigFlags configFlagsLastFrame = default, ImFontPtr font = default, float fontSize = default, float fontBaseSize = default, ImDrawListSharedData drawListSharedData = default, double time = default, int frameCount = default, int frameCountEnded = default, int frameCountPlatformEnded = default, int frameCountRendered = default, bool withinFrameScope = default, bool withinFrameScopeWithImplicitWindow = default, bool withinEndChild = default, bool gcCompactAll = default, bool testEngineHookItems = default, void* testEngine = default, ImVector windows = default, ImVector windowsFocusOrder = default, ImVector windowsTempSortBuffer = default, ImVector currentWindowStack = default, ImGuiStorage windowsById = default, int windowsActiveCount = default, Vector2 windowsHoverPadding = default, ImGuiWindow* currentWindow = default, ImGuiWindow* hoveredWindow = default, ImGuiWindow* hoveredWindowUnderMovingWindow = default, ImGuiDockNode* hoveredDockNode = default, ImGuiWindow* movingWindow = default, ImGuiWindow* wheelingWindow = default, Vector2 wheelingWindowRefMousePos = default, float wheelingWindowTimer = default, uint debugHookIdInfo = default, uint hoveredId = default, uint hoveredIdPreviousFrame = default, bool hoveredIdAllowOverlap = default, bool hoveredIdUsingMouseWheel = default, bool hoveredIdPreviousFrameUsingMouseWheel = default, bool hoveredIdDisabled = default, float hoveredIdTimer = default, float hoveredIdNotActiveTimer = default, uint activeId = default, uint activeIdIsAlive = default, float activeIdTimer = default, bool activeIdIsJustActivated = default, bool activeIdAllowOverlap = default, bool activeIdNoClearOnFocusLoss = default, bool activeIdHasBeenPressedBefore = default, bool activeIdHasBeenEditedBefore = default, bool activeIdHasBeenEditedThisFrame = default, Vector2 activeIdClickOffset = default, ImGuiWindow* activeIdWindow = default, ImGuiInputSource activeIdSource = default, int activeIdMouseButton = default, uint activeIdPreviousFrame = default, bool activeIdPreviousFrameIsAlive = default, bool activeIdPreviousFrameHasBeenEditedBefore = default, ImGuiWindow* activeIdPreviousFrameWindow = default, uint lastActiveId = default, float lastActiveIdTimer = default, bool activeIdUsingMouseWheel = default, uint activeIdUsingNavDirMask = default, uint activeIdUsingNavInputMask = default, nuint activeIdUsingKeyInputMask = default, ImGuiItemFlags currentItemFlags = default, ImGuiNextItemData nextItemData = default, ImGuiLastItemData lastItemData = default, ImGuiNextWindowData nextWindowData = default, ImVector colorStack = default, ImVector styleVarStack = default, ImVector fontStack = default, ImVector focusScopeStack = default, ImVector itemFlagsStack = default, ImVector groupStack = default, ImVector openPopupStack = default, ImVector beginPopupStack = default, int beginMenuCount = default, ImVector viewports = default, float currentDpiScale = default, ImGuiViewportP* currentViewport = default, ImGuiViewportP* mouseViewport = default, ImGuiViewportP* mouseLastHoveredViewport = default, uint platformLastFocusedViewportId = default, ImGuiPlatformMonitor fallbackMonitor = default, int viewportFrontMostStampCount = default, ImGuiWindow* navWindow = default, uint navId = default, uint navFocusScopeId = default, uint navActivateId = default, uint navActivateDownId = default, uint navActivatePressedId = default, uint navActivateInputId = default, ImGuiActivateFlags navActivateFlags = default, uint navJustMovedToId = default, uint navJustMovedToFocusScopeId = default, ImGuiModFlags navJustMovedToKeyMods = default, uint navNextActivateId = default, ImGuiActivateFlags navNextActivateFlags = default, ImGuiInputSource navInputSource = default, ImGuiNavLayer navLayer = default, bool navIdIsAlive = default, bool navMousePosDirty = default, bool navDisableHighlight = default, bool navDisableMouseHover = default, bool navAnyRequest = default, bool navInitRequest = default, bool navInitRequestFromMove = default, uint navInitResultId = default, ImRect navInitResultRectRel = default, bool navMoveSubmitted = default, bool navMoveScoringItems = default, bool navMoveForwardToNextFrame = default, ImGuiNavMoveFlags navMoveFlags = default, ImGuiScrollFlags navMoveScrollFlags = default, ImGuiModFlags navMoveKeyMods = default, ImGuiDir navMoveDir = default, ImGuiDir navMoveDirForDebug = default, ImGuiDir navMoveClipDir = default, ImRect navScoringRect = default, ImRect navScoringNoClipRect = default, int navScoringDebugCount = default, int navTabbingDir = default, int navTabbingCounter = default, ImGuiNavItemData navMoveResultLocal = default, ImGuiNavItemData navMoveResultLocalVisible = default, ImGuiNavItemData navMoveResultOther = default, ImGuiNavItemData navTabbingResultFirst = default, ImGuiWindow* navWindowingTarget = default, ImGuiWindow* navWindowingTargetAnim = default, ImGuiWindow* navWindowingListWindow = default, float navWindowingTimer = default, float navWindowingHighlightAlpha = default, bool navWindowingToggleLayer = default, float dimBgRatio = default, ImGuiMouseCursor mouseCursor = default, bool dragDropActive = default, bool dragDropWithinSource = default, bool dragDropWithinTarget = default, ImGuiDragDropFlags dragDropSourceFlags = default, int dragDropSourceFrameCount = default, int dragDropMouseButton = default, ImGuiPayload dragDropPayload = default, ImRect dragDropTargetRect = default, uint dragDropTargetId = default, ImGuiDragDropFlags dragDropAcceptFlags = default, float dragDropAcceptIdCurrRectSurface = default, uint dragDropAcceptIdCurr = default, uint dragDropAcceptIdPrev = default, int dragDropAcceptFrameCount = default, uint dragDropHoldJustPressedId = default, ImVector dragDropPayloadBufHeap = default, byte* dragDropPayloadBufLocal = default, int clipperTempDataStacked = default, ImVector clipperTempData = default, ImGuiTable* currentTable = default, int tablesTempDataStacked = default, ImVector tablesTempData = default, ImPoolImGuiTable tables = default, ImVector tablesLastTimeActive = default, ImVector drawChannelsTempMergeBuffer = default, ImGuiTabBar* currentTabBar = default, ImPoolImGuiTabBar tabBars = default, ImVector currentTabBarStack = default, ImVector shrinkWidthBuffer = default, Vector2 mouseLastValidPos = default, ImGuiInputTextState inputTextState = default, ImFont inputTextPasswordFont = default, uint tempInputId = default, ImGuiColorEditFlags colorEditOptions = default, float colorEditLastHue = default, float colorEditLastSat = default, uint colorEditLastColor = default, Vector4 colorPickerRef = default, ImGuiComboPreviewData comboPreviewData = default, float sliderGrabClickOffset = default, float sliderCurrentAccum = default, bool sliderCurrentAccumDirty = default, bool dragCurrentAccumDirty = default, float dragCurrentAccum = default, float dragSpeedDefaultRatio = default, float scrollbarClickDeltaToGrabCenter = default, float disabledAlphaBackup = default, short disabledStackSize = default, short tooltipOverrideCount = default, float tooltipSlowDelay = default, ImVector clipboardHandlerData = default, ImVector menusIdSubmittedThisFrame = default, ImGuiPlatformImeData platformImeData = default, ImGuiPlatformImeData platformImeDataPrev = default, uint platformImeViewport = default, byte platformLocaleDecimalPoint = default, ImGuiDockContext dockContext = default, bool settingsLoaded = default, float settingsDirtyTimer = default, ImGuiTextBuffer settingsIniData = default, ImVector settingsHandlers = default, ImChunkStreamImGuiWindowSettings settingsWindows = default, ImChunkStreamImGuiTableSettings settingsTables = default, ImVector hooks = default, uint hookIdNext = default, bool logEnabled = default, ImGuiLogType logType = default, ImFileHandle logFile = default, ImGuiTextBuffer logBuffer = default, byte* logNextPrefix = default, byte* logNextSuffix = default, float logLinePosY = default, bool logLineFirstItem = default, int logDepthRef = default, int logDepthToExpand = default, int logDepthToExpandDefault = default, ImGuiDebugLogFlags debugLogFlags = default, ImGuiTextBuffer debugLogBuf = default, bool debugItemPickerActive = default, uint debugItemPickerBreakId = default, ImGuiMetricsConfig debugMetricsConfig = default, ImGuiStackTool debugStackTool = default, float* framerateSecPerFrame = default, int framerateSecPerFrameIdx = default, int framerateSecPerFrameCount = default, float framerateSecPerFrameAccum = default, int wantCaptureMouseNextFrame = default, int wantCaptureKeyboardNextFrame = default, int wantTextInputNextFrame = default, ImVector tempBuffer = default) + public unsafe ImGuiContext(bool initialized = default, bool fontAtlasOwnedByContext = default, ImGuiIO io = default, ImGuiPlatformIO platformIo = default, ImVector inputEventsQueue = default, ImVector inputEventsTrail = default, ImGuiStyle style = default, ImGuiConfigFlags configFlagsCurrFrame = default, ImGuiConfigFlags configFlagsLastFrame = default, ImFontPtr font = default, float fontSize = default, float fontBaseSize = default, ImDrawListSharedData drawListSharedData = default, double time = default, int frameCount = default, int frameCountEnded = default, int frameCountPlatformEnded = default, int frameCountRendered = default, bool withinFrameScope = default, bool withinFrameScopeWithImplicitWindow = default, bool withinEndChild = default, bool gcCompactAll = default, bool testEngineHookItems = default, void* testEngine = default, ImVector windows = default, ImVector windowsFocusOrder = default, ImVector windowsTempSortBuffer = default, ImVector currentWindowStack = default, ImGuiStorage windowsById = default, int windowsActiveCount = default, Vector2 windowsHoverPadding = default, ImGuiWindow* currentWindow = default, ImGuiWindow* hoveredWindow = default, ImGuiWindow* hoveredWindowUnderMovingWindow = default, ImGuiDockNode* hoveredDockNode = default, ImGuiWindow* movingWindow = default, ImGuiWindow* wheelingWindow = default, Vector2 wheelingWindowRefMousePos = default, float wheelingWindowTimer = default, uint debugHookIdInfo = default, uint hoveredId = default, uint hoveredIdPreviousFrame = default, bool hoveredIdAllowOverlap = default, bool hoveredIdUsingMouseWheel = default, bool hoveredIdPreviousFrameUsingMouseWheel = default, bool hoveredIdDisabled = default, float hoveredIdTimer = default, float hoveredIdNotActiveTimer = default, uint activeId = default, uint activeIdIsAlive = default, float activeIdTimer = default, bool activeIdIsJustActivated = default, bool activeIdAllowOverlap = default, bool activeIdNoClearOnFocusLoss = default, bool activeIdHasBeenPressedBefore = default, bool activeIdHasBeenEditedBefore = default, bool activeIdHasBeenEditedThisFrame = default, Vector2 activeIdClickOffset = default, ImGuiWindow* activeIdWindow = default, ImGuiInputSource activeIdSource = default, int activeIdMouseButton = default, uint activeIdPreviousFrame = default, bool activeIdPreviousFrameIsAlive = default, bool activeIdPreviousFrameHasBeenEditedBefore = default, ImGuiWindow* activeIdPreviousFrameWindow = default, uint lastActiveId = default, float lastActiveIdTimer = default, bool activeIdUsingMouseWheel = default, uint activeIdUsingNavDirMask = default, uint activeIdUsingNavInputMask = default, ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN activeIdUsingKeyInputMask = default, ImGuiItemFlags currentItemFlags = default, ImGuiNextItemData nextItemData = default, ImGuiLastItemData lastItemData = default, ImGuiNextWindowData nextWindowData = default, ImVector colorStack = default, ImVector styleVarStack = default, ImVector fontStack = default, ImVector focusScopeStack = default, ImVector itemFlagsStack = default, ImVector groupStack = default, ImVector openPopupStack = default, ImVector beginPopupStack = default, int beginMenuCount = default, ImVector viewports = default, float currentDpiScale = default, ImGuiViewportP* currentViewport = default, ImGuiViewportP* mouseViewport = default, ImGuiViewportP* mouseLastHoveredViewport = default, uint platformLastFocusedViewportId = default, ImGuiPlatformMonitor fallbackMonitor = default, int viewportFrontMostStampCount = default, ImGuiWindow* navWindow = default, uint navId = default, uint navFocusScopeId = default, uint navActivateId = default, uint navActivateDownId = default, uint navActivatePressedId = default, uint navActivateInputId = default, ImGuiActivateFlags navActivateFlags = default, uint navJustMovedToId = default, uint navJustMovedToFocusScopeId = default, ImGuiModFlags navJustMovedToKeyMods = default, uint navNextActivateId = default, ImGuiActivateFlags navNextActivateFlags = default, ImGuiInputSource navInputSource = default, ImGuiNavLayer navLayer = default, bool navIdIsAlive = default, bool navMousePosDirty = default, bool navDisableHighlight = default, bool navDisableMouseHover = default, bool navAnyRequest = default, bool navInitRequest = default, bool navInitRequestFromMove = default, uint navInitResultId = default, ImRect navInitResultRectRel = default, bool navMoveSubmitted = default, bool navMoveScoringItems = default, bool navMoveForwardToNextFrame = default, ImGuiNavMoveFlags navMoveFlags = default, ImGuiScrollFlags navMoveScrollFlags = default, ImGuiModFlags navMoveKeyMods = default, ImGuiDir navMoveDir = default, ImGuiDir navMoveDirForDebug = default, ImGuiDir navMoveClipDir = default, ImRect navScoringRect = default, ImRect navScoringNoClipRect = default, int navScoringDebugCount = default, int navTabbingDir = default, int navTabbingCounter = default, ImGuiNavItemData navMoveResultLocal = default, ImGuiNavItemData navMoveResultLocalVisible = default, ImGuiNavItemData navMoveResultOther = default, ImGuiNavItemData navTabbingResultFirst = default, ImGuiWindow* navWindowingTarget = default, ImGuiWindow* navWindowingTargetAnim = default, ImGuiWindow* navWindowingListWindow = default, float navWindowingTimer = default, float navWindowingHighlightAlpha = default, bool navWindowingToggleLayer = default, float dimBgRatio = default, ImGuiMouseCursor mouseCursor = default, bool dragDropActive = default, bool dragDropWithinSource = default, bool dragDropWithinTarget = default, ImGuiDragDropFlags dragDropSourceFlags = default, int dragDropSourceFrameCount = default, int dragDropMouseButton = default, ImGuiPayload dragDropPayload = default, ImRect dragDropTargetRect = default, uint dragDropTargetId = default, ImGuiDragDropFlags dragDropAcceptFlags = default, float dragDropAcceptIdCurrRectSurface = default, uint dragDropAcceptIdCurr = default, uint dragDropAcceptIdPrev = default, int dragDropAcceptFrameCount = default, uint dragDropHoldJustPressedId = default, ImVector dragDropPayloadBufHeap = default, byte* dragDropPayloadBufLocal = default, int clipperTempDataStacked = default, ImVector clipperTempData = default, ImGuiTable* currentTable = default, int tablesTempDataStacked = default, ImVector tablesTempData = default, ImPoolImGuiTable tables = default, ImVector tablesLastTimeActive = default, ImVector drawChannelsTempMergeBuffer = default, ImGuiTabBar* currentTabBar = default, ImPoolImGuiTabBar tabBars = default, ImVector currentTabBarStack = default, ImVector shrinkWidthBuffer = default, Vector2 mouseLastValidPos = default, ImGuiInputTextState inputTextState = default, ImFont inputTextPasswordFont = default, uint tempInputId = default, ImGuiColorEditFlags colorEditOptions = default, float colorEditLastHue = default, float colorEditLastSat = default, uint colorEditLastColor = default, Vector4 colorPickerRef = default, ImGuiComboPreviewData comboPreviewData = default, float sliderGrabClickOffset = default, float sliderCurrentAccum = default, bool sliderCurrentAccumDirty = default, bool dragCurrentAccumDirty = default, float dragCurrentAccum = default, float dragSpeedDefaultRatio = default, float scrollbarClickDeltaToGrabCenter = default, float disabledAlphaBackup = default, short disabledStackSize = default, short tooltipOverrideCount = default, float tooltipSlowDelay = default, ImVector clipboardHandlerData = default, ImVector menusIdSubmittedThisFrame = default, ImGuiPlatformImeData platformImeData = default, ImGuiPlatformImeData platformImeDataPrev = default, uint platformImeViewport = default, byte platformLocaleDecimalPoint = default, ImGuiDockContext dockContext = default, bool settingsLoaded = default, float settingsDirtyTimer = default, ImGuiTextBuffer settingsIniData = default, ImVector settingsHandlers = default, ImChunkStreamImGuiWindowSettings settingsWindows = default, ImChunkStreamImGuiTableSettings settingsTables = default, ImVector hooks = default, uint hookIdNext = default, bool logEnabled = default, ImGuiLogType logType = default, ImFileHandle logFile = default, ImGuiTextBuffer logBuffer = default, byte* logNextPrefix = default, byte* logNextSuffix = default, float logLinePosY = default, bool logLineFirstItem = default, int logDepthRef = default, int logDepthToExpand = default, int logDepthToExpandDefault = default, ImGuiDebugLogFlags debugLogFlags = default, ImGuiTextBuffer debugLogBuf = default, bool debugItemPickerActive = default, uint debugItemPickerBreakId = default, ImGuiMetricsConfig debugMetricsConfig = default, ImGuiStackTool debugStackTool = default, float* framerateSecPerFrame = default, int framerateSecPerFrameIdx = default, int framerateSecPerFrameCount = default, float framerateSecPerFrameAccum = default, int wantCaptureMouseNextFrame = default, int wantCaptureKeyboardNextFrame = default, int wantTextInputNextFrame = default, ImVector tempBuffer = default) { Initialized = initialized ? (byte)1 : (byte)0; FontAtlasOwnedByContext = fontAtlasOwnedByContext ? (byte)1 : (byte)0; @@ -2921,7 +2921,7 @@ namespace Dalamud.Bindings.ImGui WantTextInputNextFrame = wantTextInputNextFrame; TempBuffer = tempBuffer; } - public unsafe ImGuiContext(bool initialized = default, bool fontAtlasOwnedByContext = default, ImGuiIO io = default, ImGuiPlatformIO platformIo = default, ImVector inputEventsQueue = default, ImVector inputEventsTrail = default, ImGuiStyle style = default, ImGuiConfigFlags configFlagsCurrFrame = default, ImGuiConfigFlags configFlagsLastFrame = default, ImFontPtr font = default, float fontSize = default, float fontBaseSize = default, ImDrawListSharedData drawListSharedData = default, double time = default, int frameCount = default, int frameCountEnded = default, int frameCountPlatformEnded = default, int frameCountRendered = default, bool withinFrameScope = default, bool withinFrameScopeWithImplicitWindow = default, bool withinEndChild = default, bool gcCompactAll = default, bool testEngineHookItems = default, void* testEngine = default, ImVector windows = default, ImVector windowsFocusOrder = default, ImVector windowsTempSortBuffer = default, ImVector currentWindowStack = default, ImGuiStorage windowsById = default, int windowsActiveCount = default, Vector2 windowsHoverPadding = default, ImGuiWindow* currentWindow = default, ImGuiWindow* hoveredWindow = default, ImGuiWindow* hoveredWindowUnderMovingWindow = default, ImGuiDockNode* hoveredDockNode = default, ImGuiWindow* movingWindow = default, ImGuiWindow* wheelingWindow = default, Vector2 wheelingWindowRefMousePos = default, float wheelingWindowTimer = default, uint debugHookIdInfo = default, uint hoveredId = default, uint hoveredIdPreviousFrame = default, bool hoveredIdAllowOverlap = default, bool hoveredIdUsingMouseWheel = default, bool hoveredIdPreviousFrameUsingMouseWheel = default, bool hoveredIdDisabled = default, float hoveredIdTimer = default, float hoveredIdNotActiveTimer = default, uint activeId = default, uint activeIdIsAlive = default, float activeIdTimer = default, bool activeIdIsJustActivated = default, bool activeIdAllowOverlap = default, bool activeIdNoClearOnFocusLoss = default, bool activeIdHasBeenPressedBefore = default, bool activeIdHasBeenEditedBefore = default, bool activeIdHasBeenEditedThisFrame = default, Vector2 activeIdClickOffset = default, ImGuiWindow* activeIdWindow = default, ImGuiInputSource activeIdSource = default, int activeIdMouseButton = default, uint activeIdPreviousFrame = default, bool activeIdPreviousFrameIsAlive = default, bool activeIdPreviousFrameHasBeenEditedBefore = default, ImGuiWindow* activeIdPreviousFrameWindow = default, uint lastActiveId = default, float lastActiveIdTimer = default, bool activeIdUsingMouseWheel = default, uint activeIdUsingNavDirMask = default, uint activeIdUsingNavInputMask = default, nuint activeIdUsingKeyInputMask = default, ImGuiItemFlags currentItemFlags = default, ImGuiNextItemData nextItemData = default, ImGuiLastItemData lastItemData = default, ImGuiNextWindowData nextWindowData = default, ImVector colorStack = default, ImVector styleVarStack = default, ImVector fontStack = default, ImVector focusScopeStack = default, ImVector itemFlagsStack = default, ImVector groupStack = default, ImVector openPopupStack = default, ImVector beginPopupStack = default, int beginMenuCount = default, ImVector viewports = default, float currentDpiScale = default, ImGuiViewportP* currentViewport = default, ImGuiViewportP* mouseViewport = default, ImGuiViewportP* mouseLastHoveredViewport = default, uint platformLastFocusedViewportId = default, ImGuiPlatformMonitor fallbackMonitor = default, int viewportFrontMostStampCount = default, ImGuiWindow* navWindow = default, uint navId = default, uint navFocusScopeId = default, uint navActivateId = default, uint navActivateDownId = default, uint navActivatePressedId = default, uint navActivateInputId = default, ImGuiActivateFlags navActivateFlags = default, uint navJustMovedToId = default, uint navJustMovedToFocusScopeId = default, ImGuiModFlags navJustMovedToKeyMods = default, uint navNextActivateId = default, ImGuiActivateFlags navNextActivateFlags = default, ImGuiInputSource navInputSource = default, ImGuiNavLayer navLayer = default, bool navIdIsAlive = default, bool navMousePosDirty = default, bool navDisableHighlight = default, bool navDisableMouseHover = default, bool navAnyRequest = default, bool navInitRequest = default, bool navInitRequestFromMove = default, uint navInitResultId = default, ImRect navInitResultRectRel = default, bool navMoveSubmitted = default, bool navMoveScoringItems = default, bool navMoveForwardToNextFrame = default, ImGuiNavMoveFlags navMoveFlags = default, ImGuiScrollFlags navMoveScrollFlags = default, ImGuiModFlags navMoveKeyMods = default, ImGuiDir navMoveDir = default, ImGuiDir navMoveDirForDebug = default, ImGuiDir navMoveClipDir = default, ImRect navScoringRect = default, ImRect navScoringNoClipRect = default, int navScoringDebugCount = default, int navTabbingDir = default, int navTabbingCounter = default, ImGuiNavItemData navMoveResultLocal = default, ImGuiNavItemData navMoveResultLocalVisible = default, ImGuiNavItemData navMoveResultOther = default, ImGuiNavItemData navTabbingResultFirst = default, ImGuiWindow* navWindowingTarget = default, ImGuiWindow* navWindowingTargetAnim = default, ImGuiWindow* navWindowingListWindow = default, float navWindowingTimer = default, float navWindowingHighlightAlpha = default, bool navWindowingToggleLayer = default, float dimBgRatio = default, ImGuiMouseCursor mouseCursor = default, bool dragDropActive = default, bool dragDropWithinSource = default, bool dragDropWithinTarget = default, ImGuiDragDropFlags dragDropSourceFlags = default, int dragDropSourceFrameCount = default, int dragDropMouseButton = default, ImGuiPayload dragDropPayload = default, ImRect dragDropTargetRect = default, uint dragDropTargetId = default, ImGuiDragDropFlags dragDropAcceptFlags = default, float dragDropAcceptIdCurrRectSurface = default, uint dragDropAcceptIdCurr = default, uint dragDropAcceptIdPrev = default, int dragDropAcceptFrameCount = default, uint dragDropHoldJustPressedId = default, ImVector dragDropPayloadBufHeap = default, Span dragDropPayloadBufLocal = default, int clipperTempDataStacked = default, ImVector clipperTempData = default, ImGuiTable* currentTable = default, int tablesTempDataStacked = default, ImVector tablesTempData = default, ImPoolImGuiTable tables = default, ImVector tablesLastTimeActive = default, ImVector drawChannelsTempMergeBuffer = default, ImGuiTabBar* currentTabBar = default, ImPoolImGuiTabBar tabBars = default, ImVector currentTabBarStack = default, ImVector shrinkWidthBuffer = default, Vector2 mouseLastValidPos = default, ImGuiInputTextState inputTextState = default, ImFont inputTextPasswordFont = default, uint tempInputId = default, ImGuiColorEditFlags colorEditOptions = default, float colorEditLastHue = default, float colorEditLastSat = default, uint colorEditLastColor = default, Vector4 colorPickerRef = default, ImGuiComboPreviewData comboPreviewData = default, float sliderGrabClickOffset = default, float sliderCurrentAccum = default, bool sliderCurrentAccumDirty = default, bool dragCurrentAccumDirty = default, float dragCurrentAccum = default, float dragSpeedDefaultRatio = default, float scrollbarClickDeltaToGrabCenter = default, float disabledAlphaBackup = default, short disabledStackSize = default, short tooltipOverrideCount = default, float tooltipSlowDelay = default, ImVector clipboardHandlerData = default, ImVector menusIdSubmittedThisFrame = default, ImGuiPlatformImeData platformImeData = default, ImGuiPlatformImeData platformImeDataPrev = default, uint platformImeViewport = default, byte platformLocaleDecimalPoint = default, ImGuiDockContext dockContext = default, bool settingsLoaded = default, float settingsDirtyTimer = default, ImGuiTextBuffer settingsIniData = default, ImVector settingsHandlers = default, ImChunkStreamImGuiWindowSettings settingsWindows = default, ImChunkStreamImGuiTableSettings settingsTables = default, ImVector hooks = default, uint hookIdNext = default, bool logEnabled = default, ImGuiLogType logType = default, ImFileHandle logFile = default, ImGuiTextBuffer logBuffer = default, byte* logNextPrefix = default, byte* logNextSuffix = default, float logLinePosY = default, bool logLineFirstItem = default, int logDepthRef = default, int logDepthToExpand = default, int logDepthToExpandDefault = default, ImGuiDebugLogFlags debugLogFlags = default, ImGuiTextBuffer debugLogBuf = default, bool debugItemPickerActive = default, uint debugItemPickerBreakId = default, ImGuiMetricsConfig debugMetricsConfig = default, ImGuiStackTool debugStackTool = default, Span framerateSecPerFrame = default, int framerateSecPerFrameIdx = default, int framerateSecPerFrameCount = default, float framerateSecPerFrameAccum = default, int wantCaptureMouseNextFrame = default, int wantCaptureKeyboardNextFrame = default, int wantTextInputNextFrame = default, ImVector tempBuffer = default) + public unsafe ImGuiContext(bool initialized = default, bool fontAtlasOwnedByContext = default, ImGuiIO io = default, ImGuiPlatformIO platformIo = default, ImVector inputEventsQueue = default, ImVector inputEventsTrail = default, ImGuiStyle style = default, ImGuiConfigFlags configFlagsCurrFrame = default, ImGuiConfigFlags configFlagsLastFrame = default, ImFontPtr font = default, float fontSize = default, float fontBaseSize = default, ImDrawListSharedData drawListSharedData = default, double time = default, int frameCount = default, int frameCountEnded = default, int frameCountPlatformEnded = default, int frameCountRendered = default, bool withinFrameScope = default, bool withinFrameScopeWithImplicitWindow = default, bool withinEndChild = default, bool gcCompactAll = default, bool testEngineHookItems = default, void* testEngine = default, ImVector windows = default, ImVector windowsFocusOrder = default, ImVector windowsTempSortBuffer = default, ImVector currentWindowStack = default, ImGuiStorage windowsById = default, int windowsActiveCount = default, Vector2 windowsHoverPadding = default, ImGuiWindow* currentWindow = default, ImGuiWindow* hoveredWindow = default, ImGuiWindow* hoveredWindowUnderMovingWindow = default, ImGuiDockNode* hoveredDockNode = default, ImGuiWindow* movingWindow = default, ImGuiWindow* wheelingWindow = default, Vector2 wheelingWindowRefMousePos = default, float wheelingWindowTimer = default, uint debugHookIdInfo = default, uint hoveredId = default, uint hoveredIdPreviousFrame = default, bool hoveredIdAllowOverlap = default, bool hoveredIdUsingMouseWheel = default, bool hoveredIdPreviousFrameUsingMouseWheel = default, bool hoveredIdDisabled = default, float hoveredIdTimer = default, float hoveredIdNotActiveTimer = default, uint activeId = default, uint activeIdIsAlive = default, float activeIdTimer = default, bool activeIdIsJustActivated = default, bool activeIdAllowOverlap = default, bool activeIdNoClearOnFocusLoss = default, bool activeIdHasBeenPressedBefore = default, bool activeIdHasBeenEditedBefore = default, bool activeIdHasBeenEditedThisFrame = default, Vector2 activeIdClickOffset = default, ImGuiWindow* activeIdWindow = default, ImGuiInputSource activeIdSource = default, int activeIdMouseButton = default, uint activeIdPreviousFrame = default, bool activeIdPreviousFrameIsAlive = default, bool activeIdPreviousFrameHasBeenEditedBefore = default, ImGuiWindow* activeIdPreviousFrameWindow = default, uint lastActiveId = default, float lastActiveIdTimer = default, bool activeIdUsingMouseWheel = default, uint activeIdUsingNavDirMask = default, uint activeIdUsingNavInputMask = default, ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN activeIdUsingKeyInputMask = default, ImGuiItemFlags currentItemFlags = default, ImGuiNextItemData nextItemData = default, ImGuiLastItemData lastItemData = default, ImGuiNextWindowData nextWindowData = default, ImVector colorStack = default, ImVector styleVarStack = default, ImVector fontStack = default, ImVector focusScopeStack = default, ImVector itemFlagsStack = default, ImVector groupStack = default, ImVector openPopupStack = default, ImVector beginPopupStack = default, int beginMenuCount = default, ImVector viewports = default, float currentDpiScale = default, ImGuiViewportP* currentViewport = default, ImGuiViewportP* mouseViewport = default, ImGuiViewportP* mouseLastHoveredViewport = default, uint platformLastFocusedViewportId = default, ImGuiPlatformMonitor fallbackMonitor = default, int viewportFrontMostStampCount = default, ImGuiWindow* navWindow = default, uint navId = default, uint navFocusScopeId = default, uint navActivateId = default, uint navActivateDownId = default, uint navActivatePressedId = default, uint navActivateInputId = default, ImGuiActivateFlags navActivateFlags = default, uint navJustMovedToId = default, uint navJustMovedToFocusScopeId = default, ImGuiModFlags navJustMovedToKeyMods = default, uint navNextActivateId = default, ImGuiActivateFlags navNextActivateFlags = default, ImGuiInputSource navInputSource = default, ImGuiNavLayer navLayer = default, bool navIdIsAlive = default, bool navMousePosDirty = default, bool navDisableHighlight = default, bool navDisableMouseHover = default, bool navAnyRequest = default, bool navInitRequest = default, bool navInitRequestFromMove = default, uint navInitResultId = default, ImRect navInitResultRectRel = default, bool navMoveSubmitted = default, bool navMoveScoringItems = default, bool navMoveForwardToNextFrame = default, ImGuiNavMoveFlags navMoveFlags = default, ImGuiScrollFlags navMoveScrollFlags = default, ImGuiModFlags navMoveKeyMods = default, ImGuiDir navMoveDir = default, ImGuiDir navMoveDirForDebug = default, ImGuiDir navMoveClipDir = default, ImRect navScoringRect = default, ImRect navScoringNoClipRect = default, int navScoringDebugCount = default, int navTabbingDir = default, int navTabbingCounter = default, ImGuiNavItemData navMoveResultLocal = default, ImGuiNavItemData navMoveResultLocalVisible = default, ImGuiNavItemData navMoveResultOther = default, ImGuiNavItemData navTabbingResultFirst = default, ImGuiWindow* navWindowingTarget = default, ImGuiWindow* navWindowingTargetAnim = default, ImGuiWindow* navWindowingListWindow = default, float navWindowingTimer = default, float navWindowingHighlightAlpha = default, bool navWindowingToggleLayer = default, float dimBgRatio = default, ImGuiMouseCursor mouseCursor = default, bool dragDropActive = default, bool dragDropWithinSource = default, bool dragDropWithinTarget = default, ImGuiDragDropFlags dragDropSourceFlags = default, int dragDropSourceFrameCount = default, int dragDropMouseButton = default, ImGuiPayload dragDropPayload = default, ImRect dragDropTargetRect = default, uint dragDropTargetId = default, ImGuiDragDropFlags dragDropAcceptFlags = default, float dragDropAcceptIdCurrRectSurface = default, uint dragDropAcceptIdCurr = default, uint dragDropAcceptIdPrev = default, int dragDropAcceptFrameCount = default, uint dragDropHoldJustPressedId = default, ImVector dragDropPayloadBufHeap = default, Span dragDropPayloadBufLocal = default, int clipperTempDataStacked = default, ImVector clipperTempData = default, ImGuiTable* currentTable = default, int tablesTempDataStacked = default, ImVector tablesTempData = default, ImPoolImGuiTable tables = default, ImVector tablesLastTimeActive = default, ImVector drawChannelsTempMergeBuffer = default, ImGuiTabBar* currentTabBar = default, ImPoolImGuiTabBar tabBars = default, ImVector currentTabBarStack = default, ImVector shrinkWidthBuffer = default, Vector2 mouseLastValidPos = default, ImGuiInputTextState inputTextState = default, ImFont inputTextPasswordFont = default, uint tempInputId = default, ImGuiColorEditFlags colorEditOptions = default, float colorEditLastHue = default, float colorEditLastSat = default, uint colorEditLastColor = default, Vector4 colorPickerRef = default, ImGuiComboPreviewData comboPreviewData = default, float sliderGrabClickOffset = default, float sliderCurrentAccum = default, bool sliderCurrentAccumDirty = default, bool dragCurrentAccumDirty = default, float dragCurrentAccum = default, float dragSpeedDefaultRatio = default, float scrollbarClickDeltaToGrabCenter = default, float disabledAlphaBackup = default, short disabledStackSize = default, short tooltipOverrideCount = default, float tooltipSlowDelay = default, ImVector clipboardHandlerData = default, ImVector menusIdSubmittedThisFrame = default, ImGuiPlatformImeData platformImeData = default, ImGuiPlatformImeData platformImeDataPrev = default, uint platformImeViewport = default, byte platformLocaleDecimalPoint = default, ImGuiDockContext dockContext = default, bool settingsLoaded = default, float settingsDirtyTimer = default, ImGuiTextBuffer settingsIniData = default, ImVector settingsHandlers = default, ImChunkStreamImGuiWindowSettings settingsWindows = default, ImChunkStreamImGuiTableSettings settingsTables = default, ImVector hooks = default, uint hookIdNext = default, bool logEnabled = default, ImGuiLogType logType = default, ImFileHandle logFile = default, ImGuiTextBuffer logBuffer = default, byte* logNextPrefix = default, byte* logNextSuffix = default, float logLinePosY = default, bool logLineFirstItem = default, int logDepthRef = default, int logDepthToExpand = default, int logDepthToExpandDefault = default, ImGuiDebugLogFlags debugLogFlags = default, ImGuiTextBuffer debugLogBuf = default, bool debugItemPickerActive = default, uint debugItemPickerBreakId = default, ImGuiMetricsConfig debugMetricsConfig = default, ImGuiStackTool debugStackTool = default, Span framerateSecPerFrame = default, int framerateSecPerFrameIdx = default, int framerateSecPerFrameCount = default, float framerateSecPerFrameAccum = default, int wantCaptureMouseNextFrame = default, int wantCaptureKeyboardNextFrame = default, int wantTextInputNextFrame = default, ImVector tempBuffer = default) { Initialized = initialized ? (byte)1 : (byte)0; FontAtlasOwnedByContext = fontAtlasOwnedByContext ? (byte)1 : (byte)0; @@ -3388,7 +3388,7 @@ namespace Dalamud.Bindings.ImGui public ref bool ActiveIdUsingMouseWheel => ref Unsafe.AsRef(&Handle->ActiveIdUsingMouseWheel); public ref uint ActiveIdUsingNavDirMask => ref Unsafe.AsRef(&Handle->ActiveIdUsingNavDirMask); public ref uint ActiveIdUsingNavInputMask => ref Unsafe.AsRef(&Handle->ActiveIdUsingNavInputMask); - public ref nuint ActiveIdUsingKeyInputMask => ref Unsafe.AsRef(&Handle->ActiveIdUsingKeyInputMask); + public ref ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN ActiveIdUsingKeyInputMask => ref Unsafe.AsRef(&Handle->ActiveIdUsingKeyInputMask); public ref ImGuiItemFlags CurrentItemFlags => ref Unsafe.AsRef(&Handle->CurrentItemFlags); public ref ImGuiNextItemData NextItemData => ref Unsafe.AsRef(&Handle->NextItemData); public ref ImGuiLastItemData LastItemData => ref Unsafe.AsRef(&Handle->LastItemData); diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN.gen.cs index 90874f319..7ff9da775 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVector.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVector.gen.cs index 683dc30c5..e685b531e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVector.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVector.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImBitVector { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVectorPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVectorPtr.gen.cs index 377e9d268..48a258a96 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVectorPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImBitVectorPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImBitVectorPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiTableSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiTableSettings.gen.cs index 4873416b0..1ee1487f2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiTableSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiTableSettings.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImChunkStreamImGuiTableSettings { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiWindowSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiWindowSettings.gen.cs index 383d7d72e..7120eb72f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiWindowSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImChunkStreamImGuiWindowSettings.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImChunkStreamImGuiWindowSettings { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColor.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColor.gen.cs index 976499f32..1165e1fa5 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColor.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColor.gen.cs @@ -47,4 +47,3 @@ public unsafe partial struct ImColor } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColorPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColorPtr.gen.cs index 80de55e64..65a07e1b2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColorPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImColorPtr.gen.cs @@ -32,4 +32,3 @@ public unsafe partial struct ImColorPtr ImGuiNative.SetHSV(Handle, h, s, v, (float)(1.0f)); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannel.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannel.gen.cs index afcb1db3b..a188a6c30 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannel.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannel.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawChannel { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannelPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannelPtr.gen.cs index ffff450fd..950f370f1 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannelPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawChannelPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawChannelPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmd.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmd.gen.cs index 5128fa69e..1d62c7fb4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmd.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmd.gen.cs @@ -27,4 +27,3 @@ public unsafe partial struct ImDrawCmd } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdHeader.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdHeader.gen.cs index 8d0c05d8b..cb06d8201 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdHeader.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdHeader.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawCmdHeader { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdPtr.gen.cs index 2041f8013..a09491ded 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawCmdPtr.gen.cs @@ -21,4 +21,3 @@ public unsafe partial struct ImDrawCmdPtr return ret; } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawData.gen.cs index 8bdbab18d..d4c0a3c5f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawData.gen.cs @@ -40,4 +40,3 @@ public unsafe partial struct ImDrawData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilder.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilder.gen.cs index d67f3397a..756d111ba 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilder.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilder.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawDataBuilder { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilderPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilderPtr.gen.cs index 89a4e3854..d513628ff 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilderPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataBuilderPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawDataBuilderPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataPtr.gen.cs index 99e7cd6e5..50b13808d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawDataPtr.gen.cs @@ -28,4 +28,3 @@ public unsafe partial struct ImDrawDataPtr ImGuiNative.ScaleClipRects(Handle, fbScale); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawList.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawList.gen.cs index e8bcc92da..83fe8f18e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawList.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawList.gen.cs @@ -756,4 +756,3 @@ public unsafe partial struct ImDrawList } } // DISCARDED: AddText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtr.gen.cs index c223bc08b..ef82004a4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtr.gen.cs @@ -441,4 +441,3 @@ public unsafe partial struct ImDrawListPtr } } // DISCARDED: AddText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtrPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtrPtr.gen.cs index 8c9554aee..dc2d7dca1 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtrPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListPtrPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawListPtrPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedData.gen.cs index 8597857d6..d51b5fdc8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImDrawListSharedData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedDataPtr.gen.cs index 8fcb7fb71..2a4a3fd06 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSharedDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImDrawListSharedDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitter.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitter.gen.cs index 4d34de6a1..569ccf345 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitter.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitter.gen.cs @@ -84,4 +84,3 @@ public unsafe partial struct ImDrawListSplitter } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitterPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitterPtr.gen.cs index f2fc439cf..60be9629f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitterPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawListSplitterPtr.gen.cs @@ -57,4 +57,3 @@ public unsafe partial struct ImDrawListSplitterPtr } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVert.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVert.gen.cs index c5ef76d3e..e2ae605b5 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVert.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVert.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawVert { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVertPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVertPtr.gen.cs index 58993c324..909401d5d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVertPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImDrawVertPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImDrawVertPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFont.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFont.gen.cs index 8c55dc024..95a60e10b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFont.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFont.gen.cs @@ -174,4 +174,3 @@ public unsafe partial struct ImFont // DISCARDED: GetDebugName // DISCARDED: GetDebugNameS // DISCARDED: RenderText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlas.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlas.gen.cs index 1a12ee615..bdee51eee 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlas.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlas.gen.cs @@ -1829,4 +1829,3 @@ public unsafe partial struct ImFontAtlas // DISCARDED: AddFontFromMemoryCompressedBase85TTF // DISCARDED: AddFontFromMemoryCompressedTTF // DISCARDED: AddFontFromMemoryTTF - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRect.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRect.gen.cs index 8d1a7dcbc..304b1c152 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRect.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRect.gen.cs @@ -27,4 +27,3 @@ public unsafe partial struct ImFontAtlasCustomRect } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRectPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRectPtr.gen.cs index d97bc58f5..2e4beafa0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRectPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasCustomRectPtr.gen.cs @@ -21,4 +21,3 @@ public unsafe partial struct ImFontAtlasCustomRectPtr return ret != 0; } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasPtr.gen.cs index 59693e908..1ed50cbd9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasPtr.gen.cs @@ -1409,4 +1409,3 @@ public unsafe partial struct ImFontAtlasPtr // DISCARDED: AddFontFromMemoryCompressedBase85TTF // DISCARDED: AddFontFromMemoryCompressedTTF // DISCARDED: AddFontFromMemoryTTF - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexture.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexture.gen.cs index f1a9c60b9..865f5d198 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexture.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexture.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontAtlasTexture { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexturePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexturePtr.gen.cs index c5c47f397..e20e544dd 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexturePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontAtlasTexturePtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontAtlasTexturePtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIO.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIO.gen.cs index 0c3c861a3..b60374483 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIO.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIO.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontBuilderIO { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIOPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIOPtr.gen.cs index b61f898d3..2689d387c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIOPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontBuilderIOPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontBuilderIOPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfig.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfig.gen.cs index 1fb980e53..00fa869a6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfig.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfig.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImFontConfig } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfigPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfigPtr.gen.cs index 876572b6f..f94d55372 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfigPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontConfigPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImFontConfigPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyph.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyph.gen.cs index ff4cea6bc..ea4aa3a3f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyph.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyph.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontGlyph { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotData.gen.cs index e53137687..394e59ca4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontGlyphHotData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotDataPtr.gen.cs index 953f577dc..6cec98602 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphHotDataPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontGlyphHotDataPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphPtr.gen.cs index 41675a226..34154ae42 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontGlyphPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs index a3c2002ac..384373475 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs @@ -73,4 +73,3 @@ public unsafe partial struct ImFontGlyphRangesBuilder } } // DISCARDED: AddText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilderPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilderPtr.gen.cs index 3f8022784..ddc37425b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilderPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontGlyphRangesBuilderPtr.gen.cs @@ -49,4 +49,3 @@ public unsafe partial struct ImFontGlyphRangesBuilderPtr } } // DISCARDED: AddText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPair.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPair.gen.cs index 73de0e645..414af9aaa 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPair.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPair.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontKerningPair { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPairPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPairPtr.gen.cs index 2dffccc80..3869c931a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPairPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontKerningPairPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontKerningPairPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtr.gen.cs index 9d542a898..b5d92f0d9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtr.gen.cs @@ -114,4 +114,3 @@ public unsafe partial struct ImFontPtr // DISCARDED: GetDebugName // DISCARDED: GetDebugNameS // DISCARDED: RenderText - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtrPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtrPtr.gen.cs index 0d9157625..a66bfcc49 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtrPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImFontPtrPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImFontPtrPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorMod.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorMod.gen.cs index c3d04868b..3dd326fb5 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorMod.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorMod.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiColorMod { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorModPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorModPtr.gen.cs index 0cc2105e8..53f953e56 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorModPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiColorModPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiColorModPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewData.gen.cs index 7d9cded64..b4ef07eef 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiComboPreviewData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewDataPtr.gen.cs index b45eab464..4fee6be09 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiComboPreviewDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiComboPreviewDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContext.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContext.gen.cs index 6a05d5ec0..65b415f74 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContext.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContext.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiContext } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHook.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHook.gen.cs index a79d07809..0b908eab4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHook.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHook.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiContextHook } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHookPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHookPtr.gen.cs index eba827aa0..763d40454 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHookPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextHookPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiContextHookPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextPtr.gen.cs index 38a28dc68..1893638a8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiContextPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiContextPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfo.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfo.gen.cs index a5d205c3f..36274a032 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfo.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfo.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDataTypeInfo { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfoPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfoPtr.gen.cs index 3eb3ddcfb..17c27f6cb 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfoPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeInfoPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDataTypeInfoPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeTempStorage.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeTempStorage.gen.cs index c336dd27d..9e377b29e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeTempStorage.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDataTypeTempStorage.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDataTypeTempStorage { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContext.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContext.gen.cs index 119bbefe7..33947970b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContext.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContext.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiDockContext } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContextPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContextPtr.gen.cs index 24a48b92c..1d89e3d2c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContextPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockContextPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiDockContextPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNode.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNode.gen.cs index 04df4a137..225cbc3d6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNode.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNode.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockNode { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodePtr.gen.cs index 911f24ea5..da73730b7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodePtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockNodePtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettings.gen.cs index 5ca7f3e60..e4963e63e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettings.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockNodeSettings { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettingsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettingsPtr.gen.cs index 96ca0ee7b..5334d4e01 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettingsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockNodeSettingsPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockNodeSettingsPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequest.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequest.gen.cs index 096e78834..de6349e85 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequest.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequest.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockRequest { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequestPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequestPtr.gen.cs index 5bc7f97d3..9c3fc5498 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequestPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiDockRequestPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiDockRequestPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupData.gen.cs index 1a560f690..41f9becc0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiGroupData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupDataPtr.gen.cs index b0dfc1a2f..ddd0ff2c0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiGroupDataPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiGroupDataPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIO.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIO.gen.cs index a3550bc65..41f0bc505 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIO.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIO.gen.cs @@ -106,4 +106,3 @@ public unsafe partial struct ImGuiIO // DISCARDED: AddInputCharacter // DISCARDED: AddInputCharactersUTF8 // DISCARDED: AddInputCharacterUTF16 - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIOPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIOPtr.gen.cs index 2507869fe..e6368ff45 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIOPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiIOPtr.gen.cs @@ -67,4 +67,3 @@ public unsafe partial struct ImGuiIOPtr // DISCARDED: AddInputCharacter // DISCARDED: AddInputCharactersUTF8 // DISCARDED: AddInputCharacterUTF16 - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEvent.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEvent.gen.cs index 3bbc1ad3c..f92fb892d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEvent.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEvent.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiInputEvent } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventAppFocused.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventAppFocused.gen.cs index b1c379d0a..1a6617da9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventAppFocused.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventAppFocused.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventAppFocused { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventKey.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventKey.gen.cs index e25f754f7..40e0e5413 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventKey.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventKey.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventKey { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseButton.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseButton.gen.cs index 23395aa53..6abccd74b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseButton.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseButton.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventMouseButton { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMousePos.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMousePos.gen.cs index 9e5566e2b..063eb235d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMousePos.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMousePos.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventMousePos { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseViewport.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseViewport.gen.cs index c37c19925..a6be31c99 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseViewport.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseViewport.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventMouseViewport { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseWheel.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseWheel.gen.cs index c5f5c29a5..982cb5f11 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseWheel.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventMouseWheel.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventMouseWheel { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventPtr.gen.cs index c4469ec26..c7db8ae43 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiInputEventPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventText.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventText.gen.cs index 4a7d398e5..a4c919876 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventText.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputEventText.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputEventText { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackData.gen.cs index 511749bcb..4400d5842 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackData.gen.cs @@ -49,4 +49,3 @@ public unsafe partial struct ImGuiInputTextCallbackData } } // DISCARDED: InsertChars - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackDataPtr.gen.cs index 849c60ef4..3938d873a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextCallbackDataPtr.gen.cs @@ -34,4 +34,3 @@ public unsafe partial struct ImGuiInputTextCallbackDataPtr } } // DISCARDED: InsertChars - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextState.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextState.gen.cs index cf0f2a122..e6af29db3 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextState.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextState.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiInputTextState } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextStatePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextStatePtr.gen.cs index 0d1acd6cb..9419473a6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextStatePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiInputTextStatePtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiInputTextStatePtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyData.gen.cs index 5c5ca435d..0cb17bf73 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiKeyData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyDataPtr.gen.cs index 5d4a4ac3e..2ee1fdc9b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiKeyDataPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiKeyDataPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemData.gen.cs index 3963c3867..a389aa3f5 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiLastItemData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemDataPtr.gen.cs index 03cd3669e..28e37f5d4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiLastItemDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiLastItemDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipper.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipper.gen.cs index 2cb71e3ee..2d49b94b1 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipper.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipper.gen.cs @@ -55,4 +55,3 @@ public unsafe partial struct ImGuiListClipper } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperData.gen.cs index 09b338fc3..ee92dbd61 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiListClipperData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperDataPtr.gen.cs index 6b1fe9aef..4b249f2dc 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiListClipperDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperPtr.gen.cs index eda25fa58..6d04b48be 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperPtr.gen.cs @@ -37,4 +37,3 @@ public unsafe partial struct ImGuiListClipperPtr return ret != 0; } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRange.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRange.gen.cs index ece752c83..5d9e1c544 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRange.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRange.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiListClipperRange { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRangePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRangePtr.gen.cs index 439a14f3b..bab538f31 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRangePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiListClipperRangePtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiListClipperRangePtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumns.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumns.gen.cs index 9ad4d2bae..51aa6013a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumns.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumns.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiMenuColumns } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumnsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumnsPtr.gen.cs index 717db2fdf..86005fe6e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumnsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMenuColumnsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiMenuColumnsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfig.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfig.gen.cs index 876fb9871..b7c3a5a12 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfig.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfig.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiMetricsConfig } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfigPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfigPtr.gen.cs index 5d4278371..45cfe2e98 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfigPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiMetricsConfigPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiMetricsConfigPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemData.gen.cs index 757bc3a0a..0bff7c9d0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiNavItemData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemDataPtr.gen.cs index 8581bb0a2..d46aee8fe 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNavItemDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiNavItemDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemData.gen.cs index 9d3da6e5e..cc6c32cf0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiNextItemData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemDataPtr.gen.cs index d0fefe239..3e6e3fada 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextItemDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiNextItemDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowData.gen.cs index c38fb2e3a..5a06766e0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiNextWindowData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowDataPtr.gen.cs index 505aca780..56cf1555b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiNextWindowDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiNextWindowDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnData.gen.cs index 5d65d8b6a..02b073645 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiOldColumnData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnDataPtr.gen.cs index a9eb6cfc0..ef4bb0daf 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiOldColumnDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumns.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumns.gen.cs index 458d36981..3cba17d3e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumns.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumns.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiOldColumns } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnsPtr.gen.cs index 8868ed7d5..f0d82030d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOldColumnsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiOldColumnsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFrame.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFrame.gen.cs index d27329c85..4e84c59f0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFrame.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFrame.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiOnceUponAFrame } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFramePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFramePtr.gen.cs index 494d48914..4853558f6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFramePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiOnceUponAFramePtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiOnceUponAFramePtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayload.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayload.gen.cs index a2db21747..e9adbcba0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayload.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayload.gen.cs @@ -43,4 +43,3 @@ public unsafe partial struct ImGuiPayload } } // DISCARDED: IsDataType - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayloadPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayloadPtr.gen.cs index 5dec38288..a010ff422 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayloadPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPayloadPtr.gen.cs @@ -31,4 +31,3 @@ public unsafe partial struct ImGuiPayloadPtr } } // DISCARDED: IsDataType - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIO.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIO.gen.cs index d0ab67a8e..a33681fdb 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIO.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIO.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiPlatformIO } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIOPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIOPtr.gen.cs index 6614e1532..a9ca00425 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIOPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformIOPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiPlatformIOPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeData.gen.cs index 7bcbdd907..8728a5184 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiPlatformImeData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeDataPtr.gen.cs index a330f293b..faf99c987 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformImeDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiPlatformImeDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitor.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitor.gen.cs index 2b87b2c13..553d7f7d9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitor.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitor.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiPlatformMonitor } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitorPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitorPtr.gen.cs index 74dbb3b52..1cd0a5cae 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitorPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPlatformMonitorPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiPlatformMonitorPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupData.gen.cs index 04ba205e8..b745cc947 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiPopupData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupDataPtr.gen.cs index 5ca38dad4..de8330596 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPopupDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiPopupDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndex.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndex.gen.cs index 08ba47b06..2fc79140e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndex.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndex.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiPtrOrIndex } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndexPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndexPtr.gen.cs index bd65f96f5..26c50dd84 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndexPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiPtrOrIndexPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiPtrOrIndexPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandler.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandler.gen.cs index a67ecb5e3..90a498d31 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandler.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandler.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiSettingsHandler } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandlerPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandlerPtr.gen.cs index 84d3e3e2b..bfeea08f0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandlerPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSettingsHandlerPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiSettingsHandlerPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItem.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItem.gen.cs index e7d06ab7d..ec6c4569e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItem.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItem.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiShrinkWidthItem { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItemPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItemPtr.gen.cs index e6fa465f9..167a472a2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItemPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiShrinkWidthItemPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiShrinkWidthItemPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSizeCallbackData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSizeCallbackData.gen.cs index aa3b74526..8b1bedb1d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSizeCallbackData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiSizeCallbackData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiSizeCallbackData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfo.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfo.gen.cs index 4d5b8d9cd..61ee6e36e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfo.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfo.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiStackLevelInfo } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfoPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfoPtr.gen.cs index 9a2c46bc3..9c3238033 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfoPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackLevelInfoPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiStackLevelInfoPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizes.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizes.gen.cs index 700515c21..ccb69adda 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizes.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizes.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiStackSizes } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizesPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizesPtr.gen.cs index 08ae5176c..7e1454016 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizesPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackSizesPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiStackSizesPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackTool.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackTool.gen.cs index 240cb054b..7f0c4d468 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackTool.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackTool.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiStackTool } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackToolPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackToolPtr.gen.cs index 6c412fe2a..6fc491bc1 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackToolPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStackToolPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiStackToolPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStorage.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStorage.gen.cs index dd22118e0..592d7d388 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStorage.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStorage.gen.cs @@ -121,4 +121,3 @@ public unsafe partial struct ImGuiStorage // DISCARDED: GetFloatRef // DISCARDED: GetIntRef // DISCARDED: GetVoidPtrRef - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePair.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePair.gen.cs index 7db41165a..4bd1280cf 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePair.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePair.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiStoragePair } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePairPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePairPtr.gen.cs index bf5d4c320..92dbebcbd 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePairPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePairPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiStoragePairPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePtr.gen.cs index 8ce6b61e9..5ba04c913 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStoragePtr.gen.cs @@ -79,4 +79,3 @@ public unsafe partial struct ImGuiStoragePtr // DISCARDED: GetFloatRef // DISCARDED: GetIntRef // DISCARDED: GetVoidPtrRef - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyle.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyle.gen.cs index f2c16041a..ce7dbb0ca 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyle.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyle.gen.cs @@ -26,4 +26,3 @@ public unsafe partial struct ImGuiStyle } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleMod.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleMod.gen.cs index f73cbbd84..0376004f0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleMod.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleMod.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiStyleMod } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleModPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleModPtr.gen.cs index b67acd04b..f76899c44 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleModPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStyleModPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiStyleModPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStylePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStylePtr.gen.cs index 5690d0872..d66d02583 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStylePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiStylePtr.gen.cs @@ -20,4 +20,3 @@ public unsafe partial struct ImGuiStylePtr ImGuiNative.ScaleAllSizes(Handle, scaleFactor); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBar.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBar.gen.cs index aad4b15a0..673bc61e0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBar.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBar.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTabBar } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBarPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBarPtr.gen.cs index 35a11571f..fbcd4beee 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBarPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabBarPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTabBarPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItem.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItem.gen.cs index d9be5cde2..17496ca38 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItem.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItem.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTabItem } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItemPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItemPtr.gen.cs index 03f032ae7..e70f10d88 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItemPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTabItemPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTabItemPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTable.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTable.gen.cs index c1e238064..151b6db34 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTable.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTable.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTable { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellData.gen.cs index e3e33c821..8b9462e0c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTableCellData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellDataPtr.gen.cs index 7ed59568a..ff519a6e7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableCellDataPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTableCellDataPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumn.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumn.gen.cs index 1d8a792a9..97ab4bdb8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumn.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumn.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableColumn } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnPtr.gen.cs index b58c6bdfd..e82da10a4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableColumnPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettings.gen.cs index 4bdf2514c..1f4e8c606 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettings.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableColumnSettings } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettingsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettingsPtr.gen.cs index f3eebda34..03a961781 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettingsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSettingsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableColumnSettingsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs index 560c0479f..bbe570f8d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableColumnSortSpecs } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecsPtr.gen.cs index a5474f37a..9c0773d8c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnSortSpecsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableColumnSortSpecsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnsSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnsSettings.gen.cs index 33246fa87..d4c36b46d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnsSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableColumnsSettings.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTableColumnsSettings { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceData.gen.cs index 6be8125aa..f66b1912c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableInstanceData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceDataPtr.gen.cs index 2f0f44bb9..6d9420e8f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableInstanceDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableInstanceDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTablePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTablePtr.gen.cs index 91f0569ee..c8ce06302 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTablePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTablePtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTablePtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettings.gen.cs index 8f750cf54..bfc10e5c7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettings.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableSettings } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettingsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettingsPtr.gen.cs index 00cf67d70..b409b21fb 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettingsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSettingsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableSettingsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecs.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecs.gen.cs index e32e44949..a26afca38 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecs.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecs.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableSortSpecs } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecsPtr.gen.cs index 3ae71e11e..da0273486 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableSortSpecsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableSortSpecsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempData.gen.cs index fa2715038..207d45a38 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempData.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiTableTempData } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempDataPtr.gen.cs index e950701b3..0a43ff19a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTableTempDataPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiTableTempDataPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBuffer.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBuffer.gen.cs index 902472c02..1a634a6fe 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBuffer.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBuffer.gen.cs @@ -58,4 +58,3 @@ public unsafe partial struct ImGuiTextBuffer // DISCARDED: c_strS // DISCARDED: end // DISCARDED: endS - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBufferPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBufferPtr.gen.cs index f1a03482c..4dab0fbcb 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBufferPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextBufferPtr.gen.cs @@ -43,4 +43,3 @@ public unsafe partial struct ImGuiTextBufferPtr // DISCARDED: c_strS // DISCARDED: end // DISCARDED: endS - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilter.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilter.gen.cs index 6acd610ff..8f0876285 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilter.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilter.gen.cs @@ -43,4 +43,3 @@ public unsafe partial struct ImGuiTextFilter } // DISCARDED: Draw // DISCARDED: PassFilter - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilterPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilterPtr.gen.cs index 2470cb0f6..b2d54c5f3 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilterPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextFilterPtr.gen.cs @@ -31,4 +31,3 @@ public unsafe partial struct ImGuiTextFilterPtr } // DISCARDED: Draw // DISCARDED: PassFilter - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRange.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRange.gen.cs index 0902d8254..334e360b8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRange.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRange.gen.cs @@ -44,4 +44,3 @@ public unsafe partial struct ImGuiTextRange } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRangePtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRangePtr.gen.cs index 8dfdc67f3..0c5aa5703 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRangePtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiTextRangePtr.gen.cs @@ -32,4 +32,3 @@ public unsafe partial struct ImGuiTextRangePtr } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewport.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewport.gen.cs index ee2165eb6..485f94b88 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewport.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewport.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiViewport } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportP.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportP.gen.cs index f505fd913..436ba290b 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportP.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportP.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiViewportP { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtr.gen.cs index 23d081673..4f9f7f755 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiViewportPPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtrPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtrPtr.gen.cs index 100e5a6aa..5b69bb805 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtrPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPPtrPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiViewportPPtrPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtr.gen.cs index 9b4e99572..bd7c55bc7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiViewportPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtrPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtrPtr.gen.cs index 932dd2fb7..1cffdfe55 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtrPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiViewportPtrPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiViewportPtrPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindow.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindow.gen.cs index 6a14c7f67..b42187061 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindow.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindow.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindow { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClass.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClass.gen.cs index 8d5c64f6a..a001c98bf 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClass.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClass.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiWindowClass } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClassPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClassPtr.gen.cs index 87c8f02fc..c3867b206 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClassPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowClassPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiWindowClassPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowDockStyle.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowDockStyle.gen.cs index 769cbe51a..499a41947 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowDockStyle.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowDockStyle.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowDockStyle { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtr.gen.cs index ab091e3e0..11a8f7b8d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtrPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtrPtr.gen.cs index 4ea675d77..3e9395633 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtrPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowPtrPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowPtrPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettings.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettings.gen.cs index 0dd1f8ab2..eb77df86f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettings.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettings.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImGuiWindowSettings } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettingsPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettingsPtr.gen.cs index 6b646a3b6..9b04070a2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettingsPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowSettingsPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImGuiWindowSettingsPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackData.gen.cs index 5487fa658..c123470d4 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowStackData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackDataPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackDataPtr.gen.cs index 3260ca47f..15948461d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackDataPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowStackDataPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowStackDataPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowTempData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowTempData.gen.cs index a9c99fb2f..5f56b954a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowTempData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImGuiWindowTempData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiWindowTempData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTabBar.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTabBar.gen.cs index cec5bc071..6a8ed50b0 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTabBar.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTabBar.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImPoolImGuiTabBar { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTable.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTable.gen.cs index d4880dc8c..9058a29c8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTable.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImPoolImGuiTable.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImPoolImGuiTable { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRect.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRect.gen.cs index 1277235a8..9caacdf26 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRect.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRect.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImRect } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRectPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRectPtr.gen.cs index c15383bb2..32e743aa6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRectPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImRectPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImRectPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableCellData.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableCellData.gen.cs index a712caff8..80cdff589 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableCellData.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableCellData.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImSpanImGuiTableCellData { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumn.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumn.gen.cs index e20ac0509..c37d391a9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumn.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumn.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImSpanImGuiTableColumn { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumnIdx.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumnIdx.gen.cs index 446a9134a..6ebd9bdb6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumnIdx.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImSpanImGuiTableColumnIdx.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImSpanImGuiTableColumnIdx { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1.gen.cs index 3b5377e44..0f3f8d98d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImVec1 } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1Ptr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1Ptr.gen.cs index 78d47bf9d..f095da0be 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1Ptr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec1Ptr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImVec1Ptr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2Ih.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2Ih.gen.cs index c110b6293..9aed95e7d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2Ih.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2Ih.gen.cs @@ -19,4 +19,3 @@ public unsafe partial struct ImVec2Ih } } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2IhPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2IhPtr.gen.cs index 6f7759bdb..a0432cbd8 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2IhPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/ImVec2IhPtr.gen.cs @@ -16,4 +16,3 @@ public unsafe partial struct ImVec2IhPtr ImGuiNative.Destroy(Handle); } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/STBTexteditState.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/STBTexteditState.gen.cs index a2012943e..1cf81eaba 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/STBTexteditState.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/STBTexteditState.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct STBTexteditState { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbTexteditRow.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbTexteditRow.gen.cs index d561cc218..574e7498d 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbTexteditRow.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbTexteditRow.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct StbTexteditRow { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoRecord.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoRecord.gen.cs index b38b7476b..c1a39765e 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoRecord.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoRecord.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct StbUndoRecord { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoState.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoState.gen.cs index 138d0ed24..91c0fa2ef 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoState.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbUndoState.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct StbUndoState { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContext.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContext.gen.cs index 8da0c50b0..7d067c47f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContext.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContext.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct StbttPackContext { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContextPtr.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContextPtr.gen.cs index 142106368..8b4c5cab7 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContextPtr.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Generated/Structs/StbttPackContextPtr.gen.cs @@ -12,4 +12,3 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct StbttPackContextPtr { } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiP.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiP.gen.cs index 08148462e..bccfeb412 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiP.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiP.gen.cs @@ -6594,4 +6594,3 @@ public unsafe partial class ImGuiP // DISCARDED: internal static byte TempInputScalarNative(ImRect bb, uint id, byte* label, ImGuiDataType dataType, void* pData, byte* format, void* pClampMin, void* pClampMax) // DISCARDED: internal static void TextExNative(byte* text, byte* textEnd, ImGuiTextFlags flags) // DISCARDED: internal static byte TreeNodeBehaviorNative(uint id, ImGuiTreeNodeFlags flags, byte* label, byte* labelEnd) - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiPNative.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiPNative.gen.cs index 20093f7a0..8c21faf48 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiPNative.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Internals/Functions/ImGuiPNative.gen.cs @@ -4065,4 +4065,3 @@ public unsafe partial class ImGuiPNative } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGui.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGui.gen.cs index 02a8e833b..f4a51c35f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGui.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGui.gen.cs @@ -24,4 +24,3 @@ public unsafe partial class ImGui // DISCARDED: internal static byte InputTextMultilineNative(byte* label, byte* buf, nuint bufSize, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) // DISCARDED: internal static byte InputTextWithHintNative(byte* label, byte* hint, byte* buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) // DISCARDED: internal static byte TempInputTextNative(ImRect bb, uint id, byte* label, byte* buf, int bufSize, ImGuiInputTextFlags flags) - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGuiNative.gen.cs b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGuiNative.gen.cs index 92632fb9e..04c166e66 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGuiNative.gen.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/Generated/Manual/Functions/ImGuiNative.gen.cs @@ -89,4 +89,3 @@ public unsafe partial class ImGuiNative } } - diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs index 655083627..9cfdd970c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ColorEditPicker.cs @@ -13,7 +13,7 @@ public static unsafe partial class ImGui fixed (Vector3* colPtr = &col) { var res = ImGuiNative.ColorEdit3(labelPtr, &colPtr->X, flags) != 0; - label.Dispose(); + label.Recycle(); return res; } } @@ -25,7 +25,7 @@ public static unsafe partial class ImGui fixed (Vector4* colPtr = &col) { var res = ImGuiNative.ColorEdit4(labelPtr, &colPtr->X, flags) != 0; - label.Dispose(); + label.Recycle(); return res; } } @@ -37,7 +37,7 @@ public static unsafe partial class ImGui fixed (Vector3* colPtr = &col) { var res = ImGuiNative.ColorPicker3(labelPtr, &colPtr->X, flags) != 0; - label.Dispose(); + label.Recycle(); return res; } } @@ -49,7 +49,7 @@ public static unsafe partial class ImGui fixed (Vector4* colPtr = &col) { var res = ImGuiNative.ColorPicker4(labelPtr, &colPtr->X, flags, null) != 0; - label.Dispose(); + label.Recycle(); return res; } } @@ -62,7 +62,7 @@ public static unsafe partial class ImGui fixed (Vector4* refColPtr = &refCol) { var res = ImGuiNative.ColorPicker4(labelPtr, &colPtr->X, flags, &refColPtr->X) != 0; - label.Dispose(); + label.Recycle(); return res; } } @@ -74,7 +74,7 @@ public static unsafe partial class ImGui fixed (Vector4* refColPtr = &refCol) { var res = ImGuiNative.ColorPicker4(labelPtr, &colPtr->X, ImGuiColorEditFlags.None, &refColPtr->X) != 0; - label.Dispose(); + label.Recycle(); return res; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs index 603019d7d..ed261a694 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.ComboAndList.cs @@ -15,7 +15,25 @@ public static unsafe partial class ImGui public delegate ImU8String PopulateAutoUtf8BufferRefContextDelegate(scoped ref T context, int index) where T : allows ref struct; - [OverloadResolutionPriority(2)] + [OverloadResolutionPriority(8)] + public static bool Combo( + ImU8String label, ref int currentItem, ImU8String itemsSeparatedByZeros, int popupMaxHeightInItems = -1) + { + if (!itemsSeparatedByZeros.Span.EndsWith("\0\0"u8)) + itemsSeparatedByZeros.AppendFormatted("\0\0"u8); + + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (int* currentItemPtr = ¤tItem) + fixed (byte* itemsSeparatedByZerosPtr = itemsSeparatedByZeros) + { + var r = ImGuiNative.Combo(labelPtr, currentItemPtr, itemsSeparatedByZerosPtr, popupMaxHeightInItems) != 0; + label.Recycle(); + itemsSeparatedByZeros.Recycle(); + return r; + } + } + + [OverloadResolutionPriority(7)] public static bool Combo( ImU8String label, ref int currentItem, ReadOnlySpan items, int popupMaxHeightInItems = -1) => Combo( @@ -26,7 +44,7 @@ public static unsafe partial class ImGui items.Length, popupMaxHeightInItems); - [OverloadResolutionPriority(3)] + [OverloadResolutionPriority(6)] public static bool Combo( ImU8String label, ref int currentItem, scoped in T items, int popupMaxHeightInItems = -1) where T : IList => @@ -38,7 +56,7 @@ public static unsafe partial class ImGui items.Count, popupMaxHeightInItems); - [OverloadResolutionPriority(4)] + [OverloadResolutionPriority(5)] public static bool Combo( ImU8String label, ref int currentItem, IReadOnlyList items, int popupMaxHeightInItems = -1) => Combo( @@ -49,7 +67,7 @@ public static unsafe partial class ImGui items.Count, popupMaxHeightInItems); - [OverloadResolutionPriority(5)] + [OverloadResolutionPriority(4)] public static bool Combo( ImU8String label, ref int currentItem, ReadOnlySpan items, Func toString, int popupMaxHeightInItems = -1) @@ -65,7 +83,7 @@ public static unsafe partial class ImGui popupMaxHeightInItems); } - [OverloadResolutionPriority(6)] + [OverloadResolutionPriority(3)] public static bool Combo( ImU8String label, ref int currentItem, scoped in TList items, Func toString, int popupMaxHeightInItems = -1) @@ -78,7 +96,7 @@ public static unsafe partial class ImGui items.Count, popupMaxHeightInItems); - [OverloadResolutionPriority(7)] + [OverloadResolutionPriority(2)] public static bool Combo( ImU8String label, ref int currentItem, IReadOnlyList items, Func toString, int popupMaxHeightInItems = -1) => @@ -90,24 +108,6 @@ public static unsafe partial class ImGui items.Count, popupMaxHeightInItems); - [OverloadResolutionPriority(1)] - public static bool Combo( - ImU8String label, ref int currentItem, ImU8String itemsSeparatedByZeros, int popupMaxHeightInItems = -1) - { - if (!itemsSeparatedByZeros.Span.EndsWith("\0\0"u8)) - itemsSeparatedByZeros.AppendFormatted("\0\0"u8); - - fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) - fixed (int* currentItemPtr = ¤tItem) - fixed (byte* itemsSeparatedByZerosPtr = itemsSeparatedByZeros.Span) - { - var r = ImGuiNative.Combo(labelPtr, currentItemPtr, itemsSeparatedByZerosPtr, popupMaxHeightInItems) != 0; - label.Dispose(); - itemsSeparatedByZeros.Dispose(); - return r; - } - } - public static bool Combo( ImU8String label, ref int currentItem, PopulateAutoUtf8BufferInContextDelegate itemsGetter, scoped in TContext context, int itemsCount, int popupMaxHeightInItems = -1) @@ -129,8 +129,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, popupMaxHeightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -156,8 +156,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, popupMaxHeightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -181,8 +181,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, popupMaxHeightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -282,8 +282,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, heightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -309,8 +309,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, heightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -334,8 +334,8 @@ public static unsafe partial class ImGui &dataBuffer, itemsCount, heightInItems) != 0; - label.Dispose(); - textBuffer.Dispose(); + label.Recycle(); + textBuffer.Recycle(); return r; } } @@ -345,11 +345,11 @@ public static unsafe partial class ImGui { #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ref var s = ref PointerTuple.From, ImU8String, object>(data); - s.Item2.Dispose(); + s.Item2.Recycle(); s.Item2 = s.Item1.Invoke(ref s.Item3, index); if (s.Item2.IsNull) return false; - *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.Span[0])); + *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.GetPinnableNullTerminatedReference())); return true; #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type } @@ -359,11 +359,11 @@ public static unsafe partial class ImGui { #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ref var s = ref PointerTuple.From, ImU8String, object>(data); - s.Item2.Dispose(); + s.Item2.Recycle(); s.Item2 = s.Item1.Invoke(s.Item3, index); if (s.Item2.IsNull) return false; - *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.Span[0])); + *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.GetPinnableNullTerminatedReference())); return true; #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type } @@ -373,11 +373,11 @@ public static unsafe partial class ImGui { #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ref var s = ref PointerTuple.From(data); - s.Item2.Dispose(); + s.Item2.Recycle(); s.Item2 = s.Item1.Invoke(index); if (s.Item2.IsNull) return false; - *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.Span[0])); + *text = (byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in s.Item2.GetPinnableNullTerminatedReference())); return true; #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs index 13c06ad2b..665fa434f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs @@ -309,8 +309,8 @@ public static unsafe partial class ImGui fixed (T* vMaxPtr = &vMax) { var res = ImGuiNative.DragScalar(labelPtr, dataType, vPtr, vSpeed, vMinPtr, vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -336,8 +336,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -362,8 +362,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -389,8 +389,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -418,9 +418,9 @@ public static unsafe partial class ImGui formatPtr, formatMaxPtr, flags); - label.Dispose(); - format.Dispose(); - formatMax.Dispose(); + label.Recycle(); + format.Recycle(); + formatMax.Recycle(); return res != 0; } } @@ -448,9 +448,9 @@ public static unsafe partial class ImGui formatPtr, formatMaxPtr, flags); - label.Dispose(); - format.Dispose(); - formatMax.Dispose(); + label.Recycle(); + format.Recycle(); + formatMax.Recycle(); return res != 0; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs index 7138d8a92..fb86096ff 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs @@ -270,12 +270,12 @@ public static unsafe partial class ImGui labelPtr, dataType, dataPtr, - stepPtr, - stepFastPtr, + step > T.Zero ? stepPtr : null, + stepFast > T.Zero ? stepFastPtr : null, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -298,12 +298,12 @@ public static unsafe partial class ImGui dataType, dataPtr, data.Length, - stepPtr, - stepFastPtr, + step > T.Zero ? stepPtr : null, + stepFast > T.Zero ? stepFastPtr : null, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -325,12 +325,12 @@ public static unsafe partial class ImGui labelPtr, GetImGuiDataType(), dataPtr, - stepPtr, - stepFastPtr, + step > T.Zero ? stepPtr : null, + stepFast > T.Zero ? stepFastPtr : null, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -353,14 +353,13 @@ public static unsafe partial class ImGui GetImGuiDataType(), dataPtr, data.Length, - stepPtr, - stepFastPtr, + step > T.Zero ? stepPtr : null, + stepFast > T.Zero ? stepFastPtr : null, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } - } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs index 7b0aefe97..89b3cc3d6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs @@ -26,7 +26,7 @@ public unsafe partial class ImGui fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) { var len = ImGuiNative.DataTypeFormatString(bufPtr, buf.Length, dataType, &data, formatPtr); - format.Dispose(); + format.Recycle(); return buf[..len]; } } @@ -39,7 +39,7 @@ public unsafe partial class ImGui fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) fixed (byte* bufPtr = buf) ImGuiNative.ImParseFormatTrimDecorations(formatPtr, bufPtr, (nuint)buf.Length); - format.Dispose(); + format.Recycle(); var nul = buf.IndexOf((byte)0); return nul == -1 ? buf : buf[..nul]; } @@ -77,6 +77,8 @@ public unsafe partial class ImGui public delegate int ImGuiInputTextCallbackDelegate(scoped ref ImGuiInputTextCallbackData data); + public delegate int ImGuiInputTextCallbackPtrDelegate(ImGuiInputTextCallbackDataPtr data); + public delegate int ImGuiInputTextCallbackRefContextDelegate( scoped ref ImGuiInputTextCallbackData data, scoped ref TContext context); @@ -92,6 +94,14 @@ public unsafe partial class ImGui return InputTextEx(label, default, buf, default, flags, callback); } + public static bool InputText( + ImU8String label, Span buf, ImGuiInputTextFlags flags, ImGuiInputTextCallbackPtrDelegate? callback) + { + if ((flags & (ImGuiInputTextFlags)ImGuiInputTextFlagsPrivate.Multiline) != ImGuiInputTextFlags.None) + throw new ArgumentOutOfRangeException(nameof(flags), flags, "Multiline must not be set"); + return InputTextEx(label, default, buf, default, flags, callback); + } + public static bool InputText( ImU8String label, Span buf, ImGuiInputTextFlags flags, ImGuiInputTextCallbackRefContextDelegate callback, scoped ref TContext context) @@ -112,15 +122,27 @@ public unsafe partial class ImGui public static bool InputText( ImU8String label, scoped ref string buf, int maxLength = ImU8String.AllocFreeBufferSize, - ImGuiInputTextFlags flags = ImGuiInputTextFlags.None, - ImGuiInputTextCallbackDelegate? callback = null) + ImGuiInputTextFlags flags = ImGuiInputTextFlags.None, ImGuiInputTextCallbackDelegate? callback = null) { var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); + return r; + } + + public static bool InputText( + ImU8String label, scoped ref string buf, int maxLength, ImGuiInputTextFlags flags, + ImGuiInputTextCallbackPtrDelegate? callback) + { + var t = new ImU8String(buf); + t.Reserve(maxLength + 1); + var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback); + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); + t.Recycle(); return r; } @@ -133,7 +155,7 @@ public unsafe partial class ImGui var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, ref context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -146,7 +168,7 @@ public unsafe partial class ImGui var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, in context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -170,8 +192,34 @@ public unsafe partial class ImGui flags, callback == null ? null : &InputTextCallbackStatic, callback == null ? null : &dataBuffer) != 0; - label.Dispose(); - hint.Dispose(); + label.Recycle(); + hint.Recycle(); + return r; + } + } + + public static bool InputTextEx( + ImU8String label, ImU8String hint, Span buf, Vector2 sizeArg, + ImGuiInputTextFlags flags, ImGuiInputTextCallbackPtrDelegate? callback) + { + fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) + fixed (byte* hintPtr = &hint.GetPinnableNullTerminatedReference()) + fixed (byte* bufPtr = buf) +#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + { + var dataBuffer = PointerTuple.Create(&callback); +#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type + var r = ImGuiNative.InputTextEx( + labelPtr, + hintPtr, + bufPtr, + buf.Length, + sizeArg, + flags, + callback == null ? null : &InputTextCallbackPtrStatic, + callback == null ? null : &dataBuffer) != 0; + label.Recycle(); + hint.Recycle(); return r; } } @@ -197,8 +245,8 @@ public unsafe partial class ImGui flags, &InputTextCallbackRefContextStatic, &dataBuffer) != 0; - label.Dispose(); - hint.Dispose(); + label.Recycle(); + hint.Recycle(); return r; } } @@ -224,8 +272,8 @@ public unsafe partial class ImGui flags, &InputTextCallbackInContextStatic, &dataBuffer) != 0; - label.Dispose(); - hint.Dispose(); + label.Recycle(); + hint.Recycle(); return r; } } @@ -241,7 +289,20 @@ public unsafe partial class ImGui var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); + return r; + } + + public static bool InputTextEx( + ImU8String label, ImU8String hint, scoped ref string buf, int maxLength, Vector2 sizeArg, + ImGuiInputTextFlags flags, ImGuiInputTextCallbackPtrDelegate? callback) + { + var t = new ImU8String(buf); + t.Reserve(maxLength + 1); + var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback); + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); + t.Recycle(); return r; } @@ -255,7 +316,7 @@ public unsafe partial class ImGui var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, ref context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -269,7 +330,7 @@ public unsafe partial class ImGui var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, in context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -284,6 +345,17 @@ public unsafe partial class ImGui flags | (ImGuiInputTextFlags)ImGuiInputTextFlagsPrivate.Multiline, callback); + public static bool InputTextMultiline( + ImU8String label, Span buf, Vector2 size, ImGuiInputTextFlags flags, + ImGuiInputTextCallbackPtrDelegate? callback) => + InputTextEx( + label, + default, + buf, + size, + flags | (ImGuiInputTextFlags)ImGuiInputTextFlagsPrivate.Multiline, + callback); + public static bool InputTextMultiline( ImU8String label, Span buf, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallbackRefContextDelegate callback, scoped ref TContext context) => @@ -318,7 +390,20 @@ public unsafe partial class ImGui var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); + return r; + } + + public static bool InputTextMultiline( + ImU8String label, scoped ref string buf, int maxLength, Vector2 size, ImGuiInputTextFlags flags, + ImGuiInputTextCallbackPtrDelegate? callback) + { + var t = new ImU8String(buf); + t.Reserve(maxLength + 1); + var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback); + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); + t.Recycle(); return r; } @@ -331,7 +416,7 @@ public unsafe partial class ImGui var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, ref context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -344,7 +429,7 @@ public unsafe partial class ImGui var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, in context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -357,6 +442,15 @@ public unsafe partial class ImGui return InputTextEx(label, hint, buf, default, flags, callback); } + public static bool InputTextWithHint( + ImU8String label, ImU8String hint, Span buf, ImGuiInputTextFlags flags, + ImGuiInputTextCallbackPtrDelegate? callback) + { + if ((flags & (ImGuiInputTextFlags)ImGuiInputTextFlagsPrivate.Multiline) != ImGuiInputTextFlags.None) + throw new ArgumentOutOfRangeException(nameof(flags), flags, "Multiline must not be set"); + return InputTextEx(label, hint, buf, default, flags, callback); + } + public static bool InputTextWithHint( ImU8String label, ImU8String hint, Span buf, ImGuiInputTextFlags flags, ImGuiInputTextCallbackRefContextDelegate callback, scoped ref TContext context) @@ -385,7 +479,20 @@ public unsafe partial class ImGui var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); + return r; + } + + public static bool InputTextWithHint( + ImU8String label, ImU8String hint, scoped ref string buf, int maxLength, ImGuiInputTextFlags flags, + ImGuiInputTextCallbackPtrDelegate? callback) + { + var t = new ImU8String(buf); + t.Reserve(maxLength + 1); + var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback); + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); + t.Recycle(); return r; } @@ -398,7 +505,7 @@ public unsafe partial class ImGui var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, ref context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -411,7 +518,7 @@ public unsafe partial class ImGui var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, in context); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -422,7 +529,7 @@ public unsafe partial class ImGui fixed (byte* bufPtr = buf) { var r = ImGuiNative.TempInputText(bb, id, labelPtr, bufPtr, buf.Length, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -436,7 +543,7 @@ public unsafe partial class ImGui var r = TempInputText(bb, id, label, t.Buffer[..(maxLength + 1)], flags); var i = t.Buffer.IndexOf((byte)0); buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - t.Dispose(); + t.Recycle(); return r; } @@ -447,6 +554,13 @@ public unsafe partial class ImGui return dvps.Item1.Invoke(ref *data); } + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static int InputTextCallbackPtrStatic(ImGuiInputTextCallbackData* data) + { + ref var dvps = ref PointerTuple.From(data->UserData); + return dvps.Item1.Invoke(data); + } + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] private static int InputTextCallbackRefContextStatic(ImGuiInputTextCallbackData* data) { diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs index 957d72789..e7aa6cc4a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Misc.cs @@ -27,7 +27,7 @@ public static unsafe partial class ImGui fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.AcceptDragDropPayload(typePtr, flags); - type.Dispose(); + type.Recycle(); return r; } } @@ -39,7 +39,7 @@ public static unsafe partial class ImGui fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.AddFontFromFileTTF(self, filenamePtr, sizePixels, fontCfg, glyphRanges); - filename.Dispose(); + filename.Recycle(); return r; } } @@ -56,7 +56,7 @@ public static unsafe partial class ImGui sizePixels, fontCfg, glyphRanges); - compressedFontDatabase85.Dispose(); + compressedFontDatabase85.Recycle(); return r; } } @@ -91,11 +91,12 @@ public static unsafe partial class ImGui public static void AddInputCharacter(ImGuiIOPtr self, char c) => ImGuiNative.AddInputCharacter(self, c); public static void AddInputCharacter(ImGuiIOPtr self, Rune c) => ImGuiNative.AddInputCharacter(self, (uint)c.Value); + public static void AddInputCharacters(ImGuiIOPtr self, ImU8String str) { fixed (byte* strPtr = &str.GetPinnableNullTerminatedReference()) ImGuiNative.AddInputCharactersUTF8(self.Handle, strPtr); - str.Dispose(); + str.Recycle(); } public static ref bool GetBoolRef(ImGuiStoragePtr self, uint key, bool defaultValue = false) => @@ -121,10 +122,10 @@ public static unsafe partial class ImGui public static uint GetID(ImU8String strId) { - fixed (byte* strIdPtr = strId.Span) + fixed (byte* strIdPtr = strId) { var r = ImGuiNative.GetID(strIdPtr, strIdPtr + strId.Length); - strId.Dispose(); + strId.Recycle(); return r; } } @@ -135,10 +136,10 @@ public static unsafe partial class ImGui public static void PushID(ImU8String strId) { - fixed (byte* strIdPtr = strId.Span) + fixed (byte* strIdPtr = strId) { ImGuiNative.PushID(strIdPtr, strIdPtr + strId.Length); - strId.Dispose(); + strId.Recycle(); } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs index 69b3b7dbe..d2662238c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Plot.cs @@ -34,8 +34,8 @@ public static unsafe partial class ImGui stride); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotHistogram( @@ -66,8 +66,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotHistogram( @@ -97,8 +97,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotHistogram( @@ -126,8 +126,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotLines( @@ -151,8 +151,8 @@ public static unsafe partial class ImGui stride); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotLines( @@ -182,8 +182,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotLines( @@ -214,8 +214,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } public static void PlotLines( @@ -243,8 +243,8 @@ public static unsafe partial class ImGui graphSize); } - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); } #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs index e37eaec65..20ee78ab6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs @@ -277,8 +277,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -305,8 +305,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -332,8 +332,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -360,8 +360,8 @@ public static unsafe partial class ImGui vMaxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -383,8 +383,8 @@ public static unsafe partial class ImGui vDegreesMax, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } @@ -466,8 +466,8 @@ public static unsafe partial class ImGui { var res = ImGuiNative.VSliderScalar(labelPtr, size, dataType, dataPtr, minPtr, maxPtr, formatPtr, flags) != 0; - label.Dispose(); - format.Dispose(); + label.Recycle(); + format.Recycle(); return res; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs index 297b68924..284475824 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Text.cs @@ -8,21 +8,23 @@ public static unsafe partial class ImGui { public static void AddText(ImFontGlyphRangesBuilderPtr self, ImU8String text) { - fixed (byte* textPtr = text.Span) ImGuiNative.AddText(self.Handle, textPtr, textPtr + text.Length); - text.Dispose(); + fixed (byte* textPtr = text) + ImGuiNative.AddText(self.Handle, textPtr, textPtr + text.Length); + text.Recycle(); } public static void AddText(ImDrawListPtr self, Vector2 pos, uint col, ImU8String text) { - fixed (byte* textPtr = text.Span) ImGuiNative.AddText(self.Handle, pos, col, textPtr, textPtr + text.Length); - text.Dispose(); + fixed (byte* textPtr = text) + ImGuiNative.AddText(self.Handle, pos, col, textPtr, textPtr + text.Length); + text.Recycle(); } public static void AddText( ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, ImU8String text, float wrapWidth, scoped in Vector4 cpuFineClipRect) { - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) fixed (Vector4* cpuFineClipRectPtr = &cpuFineClipRect) ImGuiNative.AddText( self.Handle, @@ -34,22 +36,23 @@ public static unsafe partial class ImGui textPtr + text.Length, wrapWidth, cpuFineClipRectPtr); - text.Dispose(); + text.Recycle(); } public static void AddText( ImDrawListPtr self, ImFontPtr font, float fontSize, Vector2 pos, uint col, ImU8String text, float wrapWidth = 0f) { - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiNative.AddText(self.Handle, font, fontSize, pos, col, textPtr, textPtr + text.Length, wrapWidth, null); - text.Dispose(); + text.Recycle(); } public static void append(this ImGuiTextBufferPtr self, ImU8String str) { - fixed (byte* strPtr = str.Span) ImGuiNative.append(self.Handle, strPtr, strPtr + str.Length); - str.Dispose(); + fixed (byte* strPtr = str) + ImGuiNative.append(self.Handle, strPtr, strPtr + str.Length); + str.Recycle(); } public static void BulletText(ImU8String text) @@ -60,8 +63,8 @@ public static unsafe partial class ImGui scoped ref readonly var style = ref g.Style; var labelSize = CalcTextSize(text.Span); var totalSize = new Vector2( - g.FontSize + (labelSize.X > 0.0f ? (labelSize.X + style.FramePadding.X * 2) : 0.0f), - labelSize.Y); // Empty text doesn't add padding + g.FontSize + (labelSize.X > 0.0f ? (labelSize.X + style.FramePadding.X * 2) : 0.0f), + labelSize.Y); // Empty text doesn't add padding var pos = window->DC.CursorPos; pos.Y += window->DC.CurrLineTextBaseOffset; ImGuiP.ItemSize(totalSize, 0.0f); @@ -82,14 +85,14 @@ public static unsafe partial class ImGui ImU8String text, bool hideTextAfterDoubleHash = false, float wrapWidth = -1.0f) { var @out = Vector2.Zero; - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiNative.CalcTextSize( &@out, textPtr, textPtr + text.Length, hideTextAfterDoubleHash ? (byte)1 : (byte)0, wrapWidth); - text.Dispose(); + text.Recycle(); return @out; } @@ -97,7 +100,7 @@ public static unsafe partial class ImGui ImFontPtr self, float size, float maxWidth, float wrapWidth, ImU8String text, out int remaining) { var @out = Vector2.Zero; - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) { byte* remainingPtr = null; ImGuiNative.CalcTextSizeA( @@ -112,18 +115,18 @@ public static unsafe partial class ImGui remaining = (int)(remainingPtr - textPtr); } - text.Dispose(); + text.Recycle(); return @out; } public static int CalcWordWrapPositionA( ImFontPtr font, float scale, ImU8String text, float wrapWidth) { - fixed (byte* ptr = text.Span) + fixed (byte* ptr = text) { var r = (int)(ImGuiNative.CalcWordWrapPositionA(font.Handle, scale, ptr, ptr + text.Length, wrapWidth) - ptr); - text.Dispose(); + text.Recycle(); return r; } } @@ -131,9 +134,9 @@ public static unsafe partial class ImGui public static void InsertChars( ImGuiInputTextCallbackDataPtr self, int pos, ImU8String text) { - fixed (byte* ptr = text.Span) + fixed (byte* ptr = text) ImGuiNative.InsertChars(self.Handle, pos, ptr, ptr + text.Length); - text.Dispose(); + text.Recycle(); } public static void LabelText( @@ -143,8 +146,8 @@ public static unsafe partial class ImGui var window = ImGuiP.GetCurrentWindow().Handle; if (window->SkipItems != 0) { - label.Dispose(); - text.Dispose(); + label.Recycle(); + text.Recycle(); return; } @@ -165,8 +168,8 @@ public static unsafe partial class ImGui ImGuiP.ItemSize(totalBb, style.FramePadding.Y); if (!ImGuiP.ItemAdd(totalBb, 0)) { - label.Dispose(); - text.Dispose(); + label.Recycle(); + text.Recycle(); return; } @@ -179,8 +182,8 @@ public static unsafe partial class ImGui label.Span); } - label.Dispose(); - text.Dispose(); + label.Recycle(); + text.Recycle(); } public static void LogText(ImU8String text) @@ -190,7 +193,7 @@ public static unsafe partial class ImGui { g.LogBuffer.Buf.Resize(0); append(&g.Handle->LogBuffer, text.Span); - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.ImFileWrite(textPtr, 1, (ulong)text.Length, g.LogFile); } else @@ -198,21 +201,24 @@ public static unsafe partial class ImGui append(&g.Handle->LogBuffer, text); } - text.Dispose(); + text.Recycle(); } - public static void PassFilter(ImGuiTextFilterPtr self, ImU8String text) + public static bool PassFilter(ImGuiTextFilterPtr self, ImU8String text) { - fixed (byte* textPtr = text.Span) - ImGuiNative.PassFilter(self.Handle, textPtr, textPtr + text.Length); - text.Dispose(); + fixed (byte* textPtr = text) + { + var r = ImGuiNative.PassFilter(self.Handle, textPtr, textPtr + text.Length) != 0; + text.Recycle(); + return r; + } } public static void RenderText( ImFontPtr self, ImDrawListPtr drawList, float size, Vector2 pos, uint col, Vector4 clipRect, ImU8String text, float wrapWidth = 0.0f, bool cpuFineClip = false) { - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiNative.RenderText( self, drawList, @@ -224,7 +230,7 @@ public static unsafe partial class ImGui textPtr + text.Length, wrapWidth, cpuFineClip ? (byte)1 : (byte)0); - text.Dispose(); + text.Recycle(); } public static void SetTooltip(ImU8String text) @@ -232,14 +238,14 @@ public static unsafe partial class ImGui ImGuiP.BeginTooltipEx(ImGuiTooltipFlags.OverridePreviousTooltip, ImGuiWindowFlags.None); Text(text.Span); EndTooltip(); - text.Dispose(); + text.Recycle(); } public static void Text(ImU8String text) { - fixed (byte* ptr = text.Span) + fixed (byte* ptr = text) ImGuiNative.TextUnformatted(ptr, ptr + text.Length); - text.Dispose(); + text.Recycle(); } public static void TextColored(uint col, ImU8String text) @@ -247,7 +253,7 @@ public static unsafe partial class ImGui PushStyleColor(ImGuiCol.Text, col); Text(text.Span); PopStyleColor(); - text.Dispose(); + text.Recycle(); } public static void TextColored(scoped in Vector4 col, ImU8String text) @@ -255,19 +261,19 @@ public static unsafe partial class ImGui PushStyleColor(ImGuiCol.Text, col); Text(text.Span); PopStyleColor(); - text.Dispose(); + text.Recycle(); } public static void TextDisabled(ImU8String text) { TextColored(*GetStyleColorVec4(ImGuiCol.TextDisabled), text.Span); - text.Dispose(); + text.Recycle(); } public static void TextUnformatted(ImU8String text) { Text(text.Span); - text.Dispose(); + text.Recycle(); } public static void TextWrapped(ImU8String text) @@ -279,7 +285,7 @@ public static unsafe partial class ImGui Text(text.Span); if (needBackup) PopTextWrapPos(); - text.Dispose(); + text.Recycle(); } public static void TextColoredWrapped(uint col, ImU8String text) @@ -287,7 +293,7 @@ public static unsafe partial class ImGui PushStyleColor(ImGuiCol.Text, col); TextWrapped(text.Span); PopStyleColor(); - text.Dispose(); + text.Recycle(); } public static void TextColoredWrapped(scoped in Vector4 col, ImU8String text) @@ -295,7 +301,7 @@ public static unsafe partial class ImGui PushStyleColor(ImGuiCol.Text, col); TextWrapped(text.Span); PopStyleColor(); - text.Dispose(); + text.Recycle(); } public static bool TreeNode(ImU8String label) @@ -303,7 +309,7 @@ public static unsafe partial class ImGui var window = ImGuiP.GetCurrentWindow(); if (window.SkipItems) { - label.Dispose(); + label.Recycle(); return false; } @@ -311,7 +317,7 @@ public static unsafe partial class ImGui window.Handle->GetID(label.Span), ImGuiTreeNodeFlags.None, label.Span[..ImGuiP.FindRenderedTextEnd(label.Span, out _, out _)]); - label.Dispose(); + label.Recycle(); return res; } @@ -337,8 +343,8 @@ public static unsafe partial class ImGui res = ImGuiP.TreeNodeBehavior(window.Handle->GetID(id.Span), flags, label.Span[..label.Length]); } - id.Dispose(); - label.Dispose(); + id.Recycle(); + label.Recycle(); return res; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs index 953df2908..889824f43 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs @@ -6,13 +6,23 @@ namespace Dalamud.Bindings.ImGui; [SuppressMessage("ReSharper", "InconsistentNaming")] public static unsafe partial class ImGui { + public static bool ArrowButton(ImU8String strId, ImGuiDir dir) + { + fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) + { + var r = ImGuiNative.ArrowButton(strIdPtr, dir) != 0; + strId.Recycle(); + return r; + } + } + public static bool Begin(ImU8String name, ref bool open, ImGuiWindowFlags flags = ImGuiWindowFlags.None) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) fixed (bool* openPtr = &open) { var r = ImGuiNative.Begin(namePtr, openPtr, flags) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -22,32 +32,35 @@ public static unsafe partial class ImGui fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.Begin(namePtr, null, flags) != 0; - name.Dispose(); + name.Recycle(); return r; } } - public static bool BeginChild(ImU8String strId, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) + public static bool BeginChild( + ImU8String strId, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginChild(strIdPtr, size, border ? (byte)1 : (byte)0, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } - public static bool BeginChild(uint id, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) => + public static bool BeginChild( + uint id, Vector2 size = default, bool border = false, ImGuiWindowFlags flags = ImGuiWindowFlags.None) => ImGuiNative.BeginChild(id, size, border ? (byte)1 : (byte)0, flags) != 0; - public static bool BeginCombo(ImU8String label, ImU8String previewValue, ImGuiComboFlags flags = ImGuiComboFlags.None) + public static bool BeginCombo( + ImU8String label, ImU8String previewValue, ImGuiComboFlags flags = ImGuiComboFlags.None) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (byte* previewValuePtr = &previewValue.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginCombo(labelPtr, previewValuePtr, flags) != 0; - label.Dispose(); - previewValue.Dispose(); + label.Recycle(); + previewValue.Recycle(); return r; } } @@ -57,7 +70,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginListBox(labelPtr, size) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -67,7 +80,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginMenu(labelPtr, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -77,37 +90,40 @@ public static unsafe partial class ImGui fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginPopup(strIdPtr, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } - public static bool BeginPopupContextItem(ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + public static bool BeginPopupContextItem( + ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginPopupContextItem(strIdPtr, popupFlags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } - public static bool BeginPopupContextWindow(ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + public static bool BeginPopupContextWindow( + ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginPopupContextWindow(strIdPtr, popupFlags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } - public static bool BeginPopupContextVoid(ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) + public static bool BeginPopupContextVoid( + ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginPopupContextVoid(strIdPtr, popupFlags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -119,7 +135,7 @@ public static unsafe partial class ImGui fixed (bool* openPtr = &open) { var r = ImGuiNative.BeginPopupModal(namePtr, openPtr, flags) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -129,7 +145,7 @@ public static unsafe partial class ImGui fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginPopupModal(namePtr, null, flags) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -139,7 +155,7 @@ public static unsafe partial class ImGui fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginTabBar(strIdPtr, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -151,7 +167,7 @@ public static unsafe partial class ImGui fixed (bool* pOpenPtr = &pOpen) { var r = ImGuiNative.BeginTabItem(labelPtr, pOpenPtr, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -161,7 +177,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginTabItem(labelPtr, null, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -173,7 +189,7 @@ public static unsafe partial class ImGui fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.BeginTable(strIdPtr, column, flags, outerSize, innerWidth) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -183,7 +199,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.Button(labelPtr, size) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -194,7 +210,7 @@ public static unsafe partial class ImGui fixed (bool* vPtr = &v) { var r = ImGuiNative.Checkbox(labelPtr, vPtr) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -228,7 +244,7 @@ public static unsafe partial class ImGui flags &= ~flagsValue; } - label.Dispose(); + label.Recycle(); return pressed; } } @@ -240,7 +256,7 @@ public static unsafe partial class ImGui fixed (bool* visiblePtr = &visible) { var r = ImGuiNative.CollapsingHeader(labelPtr, visiblePtr, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -250,7 +266,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.CollapsingHeader(labelPtr, null, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -262,7 +278,7 @@ public static unsafe partial class ImGui fixed (byte* descIdPtr = &descId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.ColorButton(descIdPtr, col, flags, size) != 0; - descId.Dispose(); + descId.Recycle(); return r; } } @@ -271,7 +287,7 @@ public static unsafe partial class ImGui { fixed (byte* idPtr = &id.GetPinnableNullTerminatedReference()) ImGuiNative.Columns(count, idPtr, border ? (byte)1 : (byte)0); - id.Dispose(); + id.Recycle(); } public static bool DebugCheckVersionAndDataLayout( @@ -280,8 +296,15 @@ public static unsafe partial class ImGui { fixed (byte* versionPtr = &versionStr.GetPinnableNullTerminatedReference()) { - var r = ImGuiNative.DebugCheckVersionAndDataLayout(versionPtr, szIo, szStyle, szVec2, szVec4, szDrawVert, szDrawIdx) != 0; - versionStr.Dispose(); + var r = ImGuiNative.DebugCheckVersionAndDataLayout( + versionPtr, + szIo, + szStyle, + szVec2, + szVec4, + szDrawVert, + szDrawIdx) != 0; + versionStr.Recycle(); return r; } } @@ -291,7 +314,7 @@ public static unsafe partial class ImGui fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) { ImGuiNative.DebugTextEncoding(textPtr); - text.Dispose(); + text.Recycle(); } } @@ -300,7 +323,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference("Filter (inc,-exc)"u8)) { var r = ImGuiNative.Draw(self.Handle, labelPtr, width) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -310,7 +333,7 @@ public static unsafe partial class ImGui fixed (byte* defaultFilterPtr = &defaultFilter.GetPinnableNullTerminatedReference("\0"u8)) { var r = ImGuiNative.ImGuiTextFilter(defaultFilterPtr); - defaultFilter.Dispose(); + defaultFilter.Recycle(); return r; } } @@ -329,7 +352,7 @@ public static unsafe partial class ImGui fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.InvisibleButton(strIdPtr, size, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -339,7 +362,7 @@ public static unsafe partial class ImGui fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.IsDataType(self.Handle, typePtr) != 0; - type.Dispose(); + type.Recycle(); return r; } } @@ -349,7 +372,7 @@ public static unsafe partial class ImGui fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.IsPopupOpen(strIdPtr, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -358,21 +381,21 @@ public static unsafe partial class ImGui { fixed (byte* iniFilenamePtr = &iniFilename.GetPinnableNullTerminatedReference()) ImGuiNative.LoadIniSettingsFromDisk(iniFilenamePtr); - iniFilename.Dispose(); + iniFilename.Recycle(); } public static void LoadIniSettingsFromMemory(ImU8String iniData) { - fixed (byte* iniDataPtr = iniData.Span) + fixed (byte* iniDataPtr = iniData) ImGuiNative.LoadIniSettingsFromMemory(iniDataPtr, (nuint)iniData.Length); - iniData.Dispose(); + iniData.Recycle(); } public static void LogToFile(int autoOpenDepth = -1, ImU8String filename = default) { fixed (byte* filenamePtr = &filename.GetPinnableNullTerminatedReference()) ImGuiNative.LogToFile(autoOpenDepth, filenamePtr); - filename.Dispose(); + filename.Recycle(); } public static bool MenuItem( @@ -381,9 +404,13 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (byte* shortcutPtr = &shortcut.GetPinnableNullTerminatedReference()) { - var r = ImGuiNative.MenuItem(labelPtr, shortcutPtr, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); - shortcut.Dispose(); + var r = ImGuiNative.MenuItem( + labelPtr, + shortcutPtr, + selected ? (byte)1 : (byte)0, + enabled ? (byte)1 : (byte)0) != 0; + label.Recycle(); + shortcut.Recycle(); return r; } } @@ -395,8 +422,8 @@ public static unsafe partial class ImGui fixed (bool* selectedPtr = &selected) { var r = ImGuiNative.MenuItem(labelPtr, shortcutPtr, selectedPtr, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); - shortcut.Dispose(); + label.Recycle(); + shortcut.Recycle(); return r; } } @@ -407,7 +434,7 @@ public static unsafe partial class ImGui fixed (bool* selectedPtr = &selected) { var r = ImGuiNative.MenuItem(labelPtr, null, selectedPtr, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -416,8 +443,12 @@ public static unsafe partial class ImGui { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { - var r = ImGuiNative.MenuItem(labelPtr, null, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); + var r = ImGuiNative.MenuItem( + labelPtr, + null, + selected ? (byte)1 : (byte)0, + enabled ? (byte)1 : (byte)0) != 0; + label.Recycle(); return r; } } @@ -426,39 +457,40 @@ public static unsafe partial class ImGui { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) ImGuiNative.OpenPopup(strIdPtr, popupFlags); - strId.Dispose(); + strId.Recycle(); } - public static void OpenPopup(uint id, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.None) => ImGuiNative.OpenPopup(id, popupFlags); + public static void OpenPopup(uint id, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.None) => + ImGuiNative.OpenPopup(id, popupFlags); public static void OpenPopupOnItemClick( ImU8String strId, ImGuiPopupFlags popupFlags = ImGuiPopupFlags.MouseButtonDefault) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) ImGuiNative.OpenPopupOnItemClick(strIdPtr, popupFlags); - strId.Dispose(); + strId.Recycle(); } public static void ProgressBar(float fraction, Vector2 sizeArg, ImU8String overlay = default) { fixed (byte* overlayPtr = &overlay.GetPinnableNullTerminatedReference()) ImGuiNative.ProgressBar(fraction, sizeArg, overlayPtr); - overlay.Dispose(); + overlay.Recycle(); } public static void ProgressBar(float fraction, ImU8String overlay = default) { fixed (byte* overlayPtr = &overlay.GetPinnableNullTerminatedReference()) ImGuiNative.ProgressBar(fraction, new(-float.MinValue, 0), overlayPtr); - overlay.Dispose(); + overlay.Recycle(); } public static bool RadioButton(ImU8String label, bool active) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { - var r = ImGuiNative.RadioButton(labelPtr, active ? (byte)1:(byte)0) != 0; - label.Dispose(); + var r = ImGuiNative.RadioButton(labelPtr, active ? (byte)1 : (byte)0) != 0; + label.Recycle(); return r; } } @@ -468,8 +500,8 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var pressed = ImGuiNative.RadioButton( - labelPtr, - EqualityComparer.Default.Equals(v, vButton) ? (byte)1 : (byte)0) != 0; + labelPtr, + EqualityComparer.Default.Equals(v, vButton) ? (byte)1 : (byte)0) != 0; if (pressed) v = vButton; return pressed; @@ -483,23 +515,26 @@ public static unsafe partial class ImGui } public static bool Selectable( - ImU8String label, bool selected = false, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, Vector2 size = default) + ImU8String label, bool selected = false, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, + Vector2 size = default) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { - var r = ImGuiNative.Selectable(labelPtr, selected ?(byte)1:(byte)0, flags, size)!=0; - label.Dispose(); + var r = ImGuiNative.Selectable(labelPtr, selected ? (byte)1 : (byte)0, flags, size) != 0; + label.Recycle(); return r; } } - public static bool Selectable(ImU8String label, ref bool selected, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, Vector2 size = default) + public static bool Selectable( + ImU8String label, ref bool selected, ImGuiSelectableFlags flags = ImGuiSelectableFlags.None, + Vector2 size = default) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) - fixed (bool* selectedPtr = &selected) + fixed (bool* selectedPtr = &selected) { - var r = ImGuiNative.Selectable(labelPtr, selectedPtr, flags, size)!=0; - label.Dispose(); + var r = ImGuiNative.Selectable(labelPtr, selectedPtr, flags, size) != 0; + label.Recycle(); return r; } } @@ -508,16 +543,16 @@ public static unsafe partial class ImGui { fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) ImGuiNative.SetClipboardText(textPtr); - text.Dispose(); + text.Recycle(); } - public static bool SetDragDropPayload(ImU8String type, ReadOnlySpan data, ImGuiCond cond) + public static bool SetDragDropPayload(ImU8String type, ReadOnlySpan data, ImGuiCond cond = ImGuiCond.None) { fixed (byte* typePtr = &type.GetPinnableNullTerminatedReference()) fixed (byte* dataPtr = data) { - var r = ImGuiNative.SetDragDropPayload(typePtr, dataPtr, (nuint)data.Length, cond)!=0; - type.Dispose(); + var r = ImGuiNative.SetDragDropPayload(typePtr, dataPtr, (nuint)data.Length, cond) != 0; + type.Recycle(); return r; } } @@ -526,50 +561,60 @@ public static unsafe partial class ImGui { fixed (byte* tabItemPtr = &tabOrDockedWindowLabel.GetPinnableNullTerminatedReference()) ImGuiNative.SetTabItemClosed(tabItemPtr); - tabOrDockedWindowLabel.Dispose(); + tabOrDockedWindowLabel.Recycle(); } - public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowCollapsed(collapsed ? (byte)1 : (byte)0, cond); + public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond = ImGuiCond.None) => + ImGuiNative.SetWindowCollapsed(collapsed ? (byte)1 : (byte)0, cond); public static void SetWindowCollapsed(ImU8String name, bool collapsed, ImGuiCond cond = ImGuiCond.None) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) ImGuiNative.SetWindowCollapsed(namePtr, collapsed ? (byte)1 : (byte)0, cond); - name.Dispose(); + name.Recycle(); } + /// Sets the current window to be focused / top-most. + /// Prefer using . public static void SetWindowFocus() => ImGuiNative.SetWindowFocus(); + /// Sets a named window to be focused / top-most. + /// Name of the window to focus. Use default to remove focus. public static void SetWindowFocus(ImU8String name) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) ImGuiNative.SetWindowFocus(namePtr); - name.Dispose(); + name.Recycle(); } - public static void SetWindowPos(Vector2 pos, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowPos(pos, cond); + /// Removes focus from any window. + public static void ClearWindowFocus() => ImGuiNative.SetWindowFocus(null); + + public static void SetWindowPos(Vector2 pos, ImGuiCond cond = ImGuiCond.None) => + ImGuiNative.SetWindowPos(pos, cond); public static void SetWindowPos(ImU8String name, Vector2 pos, ImGuiCond cond = ImGuiCond.None) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) ImGuiNative.SetWindowPos(namePtr, pos, cond); - name.Dispose(); + name.Recycle(); } - public static void SetWindowSize(Vector2 size, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowSize(size, cond); + public static void SetWindowSize(Vector2 size, ImGuiCond cond = ImGuiCond.None) => + ImGuiNative.SetWindowSize(size, cond); public static void SetWindowSize(ImU8String name, Vector2 size, ImGuiCond cond = ImGuiCond.None) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) ImGuiNative.SetWindowSize(namePtr, size, cond); - name.Dispose(); + name.Recycle(); } public static void ShowFontSelector(ImU8String label) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiNative.ShowFontSelector(labelPtr); - label.Dispose(); + label.Recycle(); } public static bool ShowStyleSelector(ImU8String label) @@ -577,7 +622,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.ShowStyleSelector(labelPtr) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -587,7 +632,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.SmallButton(labelPtr) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -597,7 +642,7 @@ public static unsafe partial class ImGui fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiNative.TabItemButton(labelPtr, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -606,7 +651,7 @@ public static unsafe partial class ImGui { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiNative.TableHeader(labelPtr); - label.Dispose(); + label.Recycle(); } public static void TableSetupColumn( @@ -615,14 +660,14 @@ public static unsafe partial class ImGui { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiNative.TableSetupColumn(labelPtr, flags, initWidthOrWeight, userId); - label.Dispose(); + label.Recycle(); } public static void TreePush(ImU8String strId) { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) ImGuiNative.TreePush(strIdPtr); - strId.Dispose(); + strId.Recycle(); } public static void TreePush(nint ptrId) => ImGuiNative.TreePush((void*)ptrId); @@ -632,10 +677,10 @@ public static unsafe partial class ImGui { prefix.AppendLiteral(": "); prefix.AppendFormatted(value); - fixed (byte* prefixPtr = prefix.Span) + fixed (byte* prefixPtr = prefix) { ImGuiNative.TextUnformatted(prefixPtr, prefixPtr + prefix.Length); - prefix.Dispose(); + prefix.Recycle(); } } @@ -647,8 +692,8 @@ public static unsafe partial class ImGui fixed (byte* floatPtr = &floatFormat.GetPinnableNullTerminatedReference()) { ImGuiNative.Value(prefixPtr, value, floatPtr); - prefix.Dispose(); - floatFormat.Dispose(); + prefix.Recycle(); + floatFormat.Recycle(); } } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs index 9d910e6d7..ee90e3b82 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiInputTextCallbackData.Custom.cs @@ -3,6 +3,7 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiInputTextCallbackData { public readonly Span BufSpan => new(this.Buf, this.BufSize); + public readonly Span BufTextSpan => new(this.Buf, this.BufTextLen); public void InsertChars(int pos, ImU8String text) @@ -15,6 +16,7 @@ public unsafe partial struct ImGuiInputTextCallbackData public unsafe partial struct ImGuiInputTextCallbackDataPtr { public readonly Span BufSpan => this.Handle->BufSpan; + public readonly Span BufTextSpan => this.Handle->BufTextSpan; public void InsertChars(int pos, ImU8String text) => ImGui.InsertChars(this, pos, text); diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiNative.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiNative.Custom.cs index 66626ee3b..62d351993 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiNative.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiNative.Custom.cs @@ -28,7 +28,7 @@ public static unsafe partial class ImGuiNative [LibraryImport(LibraryName, EntryPoint = "igInputTextEx")] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - public static partial int InputTextEx( + public static partial byte InputTextEx( byte* label, byte* hint, byte* buf, diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs index 8e61f8f07..3947d18d2 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Misc.cs @@ -12,7 +12,7 @@ public unsafe partial class ImGuiP fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.ArrowButtonEx(strIdPtr, dir, sizeArg, flags) != 0; - strId.Dispose(); + strId.Recycle(); return r; } } @@ -22,7 +22,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.BeginChildEx(namePtr, id, sizeArg, border ? (byte)1 : (byte)0, flags) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -31,7 +31,7 @@ public unsafe partial class ImGuiP { fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) ImGuiPNative.BeginColumns(strIdPtr, count, flags); - strId.Dispose(); + strId.Recycle(); } public static bool BeginMenuEx(ImU8String label, ImU8String icon = default, bool enabled = true) @@ -40,8 +40,8 @@ public unsafe partial class ImGuiP fixed (byte* iconPtr = &icon.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.BeginMenuEx(labelPtr, iconPtr, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); - icon.Dispose(); + label.Recycle(); + icon.Recycle(); return r; } } @@ -53,7 +53,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.BeginTableEx(namePtr, id, columnsCount, flags, outerSize, innerWidth) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -64,7 +64,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.BeginViewportSideBar(namePtr, viewport, dir, size, windowFlags) != 0; - name.Dispose(); + name.Recycle(); return r; } } @@ -75,7 +75,7 @@ public unsafe partial class ImGuiP fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.ButtonEx(labelPtr, sizeArg, flags) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -97,7 +97,7 @@ public unsafe partial class ImGuiP fixed (byte* textPtr = &text.GetPinnableNullTerminatedReference()) fixed (float* colPtr = col) ImGuiPNative.ColorTooltip(textPtr, colPtr, flags); - text.Dispose(); + text.Recycle(); } public static ImGuiWindowSettingsPtr CreateNewWindowSettings(ImU8String name) @@ -105,7 +105,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.CreateNewWindowSettings(namePtr); - name.Dispose(); + name.Recycle(); return r; } } @@ -123,8 +123,8 @@ public unsafe partial class ImGuiP fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.DataTypeApplyFromText(bufPtr, dataType, &data, formatPtr) != 0; - format.Dispose(); - buf.Dispose(); + format.Recycle(); + buf.Recycle(); return r; } } @@ -133,7 +133,7 @@ public unsafe partial class ImGuiP { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeDockNode(node, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DebugNodeDrawList( @@ -141,28 +141,28 @@ public unsafe partial class ImGuiP { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeDrawList(window, viewport, drawList, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DebugNodeStorage(ImGuiStoragePtr storage, ImU8String label) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeStorage(storage, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ImU8String label) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeTabBar(tabBar, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DebugNodeWindow(ImGuiWindowPtr window, ImU8String label) { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeWindow(window, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DebugNodeWindowsList(scoped in ImVector windows, ImU8String label) @@ -170,7 +170,7 @@ public unsafe partial class ImGuiP fixed (ImVector* windowsPtr = &windows) fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) ImGuiPNative.DebugNodeWindowsList(windowsPtr, labelPtr); - label.Dispose(); + label.Recycle(); } public static void DockBuilderCopyWindowSettings(ImU8String srcName, ImU8String dstName) @@ -178,15 +178,15 @@ public unsafe partial class ImGuiP fixed (byte* srcNamePtr = &srcName.GetPinnableNullTerminatedReference()) fixed (byte* dstNamePtr = &dstName.GetPinnableNullTerminatedReference()) ImGuiPNative.DockBuilderCopyWindowSettings(srcNamePtr, dstNamePtr); - srcName.Dispose(); - dstName.Dispose(); + srcName.Recycle(); + dstName.Recycle(); } public static void DockBuilderDockWindow(ImU8String windowName, uint nodeId) { fixed (byte* windowNamePtr = &windowName.GetPinnableNullTerminatedReference()) ImGuiPNative.DockBuilderDockWindow(windowNamePtr, nodeId); - windowName.Dispose(); + windowName.Recycle(); } public static bool DragBehavior( @@ -196,7 +196,7 @@ public unsafe partial class ImGuiP fixed (byte* formatPtr = &format.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.DragBehavior(id, dataType, pV, vSpeed, pMin, pMax, formatPtr, flags) != 0; - format.Dispose(); + format.Recycle(); return r; } } @@ -206,7 +206,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.FindOrCreateWindowSettings(namePtr); - name.Dispose(); + name.Recycle(); return r; } } @@ -216,7 +216,7 @@ public unsafe partial class ImGuiP fixed (byte* typeNamePtr = &typeName.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.FindSettingsHandler(typeNamePtr); - typeName.Dispose(); + typeName.Recycle(); return r; } } @@ -226,7 +226,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.FindWindowByName(namePtr); - name.Dispose(); + name.Recycle(); return r; } } @@ -236,7 +236,7 @@ public unsafe partial class ImGuiP fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.GetColumnsID(strIdPtr, count); - strId.Dispose(); + strId.Recycle(); return r; } } @@ -246,7 +246,7 @@ public unsafe partial class ImGuiP fixed (byte* strIdPtr = &strId.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.GetIDWithSeed(strIdPtr, strIdPtr + strId.Length, seed); - strId.Dispose(); + strId.Recycle(); return r; } } @@ -259,8 +259,8 @@ public unsafe partial class ImGuiP fixed (nuint* outFileSizePtr = &outFileSize) { var r = ImGuiPNative.ImFileLoadToMemory(filenamePtr, modePtr, outFileSizePtr, paddingBytes); - filename.Dispose(); - mode.Dispose(); + filename.Recycle(); + mode.Recycle(); return r; } } @@ -271,8 +271,8 @@ public unsafe partial class ImGuiP fixed (byte* modePtr = &mode.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.ImFileLoadToMemory(filenamePtr, modePtr, null, paddingBytes); - filename.Dispose(); - mode.Dispose(); + filename.Recycle(); + mode.Recycle(); return r; } } @@ -283,8 +283,8 @@ public unsafe partial class ImGuiP fixed (byte* modePtr = &mode.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.ImFileOpen(filenamePtr, modePtr); - filename.Dispose(); - mode.Dispose(); + filename.Recycle(); + mode.Recycle(); return r; } } @@ -339,7 +339,7 @@ public unsafe partial class ImGuiP { fixed (byte* fmtPtr = &fmt.GetPinnableNullTerminatedReference()) ImGuiPNative.ImFormatStringToTempBuffer(outBuf, outBufEnd, fmtPtr); - fmt.Dispose(); + fmt.Recycle(); } public static ImGuiWindowPtr ImGuiWindow(ImGuiContextPtr context, ImU8String name) @@ -347,7 +347,7 @@ public unsafe partial class ImGuiP fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.ImGuiWindow(context, namePtr); - name.Dispose(); + name.Recycle(); return r; } } @@ -386,9 +386,9 @@ public unsafe partial class ImGuiP shortcutPtr, selected ? (byte)1 : (byte)0, enabled ? (byte)1 : (byte)0) != 0; - label.Dispose(); - icon.Dispose(); - shortcut.Dispose(); + label.Recycle(); + icon.Recycle(); + shortcut.Recycle(); return r; } } @@ -397,7 +397,7 @@ public unsafe partial class ImGuiP { fixed (byte* typeNamePtr = &typeName.GetPinnableNullTerminatedReference()) ImGuiPNative.RemoveSettingsHandler(typeNamePtr); - typeName.Dispose(); + typeName.Recycle(); } public static bool SliderBehavior( @@ -418,7 +418,7 @@ public unsafe partial class ImGuiP formatPtr, flags, outGrabBb) != 0; - format.Dispose(); + format.Recycle(); return r; } } @@ -440,7 +440,7 @@ public unsafe partial class ImGuiP fixed (bool* openPtr = &open) { var r = ImGuiPNative.TabItemEx(tabBar, labelPtr, openPtr, flags, dockedWindow) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -466,7 +466,7 @@ public unsafe partial class ImGuiP textClippedPtr); } - label.Dispose(); + label.Recycle(); } public static bool TempInputScalar( @@ -479,7 +479,7 @@ public unsafe partial class ImGuiP fixed (T* dataPtr = &data) { var r = ImGuiPNative.TempInputScalar(bb, id, labelPtr, dataType, dataPtr, formatPtr, &min, &max) != 0; - label.Dispose(); + label.Recycle(); return r; } } @@ -489,7 +489,7 @@ public unsafe partial class ImGuiP fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) { var r = ImGuiPNative.TreeNodeBehavior(id, flags, labelPtr, labelPtr + label.Length) != 0; - label.Dispose(); + label.Recycle(); return r; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs index 8f552d4fb..aab161b9c 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Plot.cs @@ -27,8 +27,8 @@ public static unsafe partial class ImGuiP scaleMin, scaleMax, frameSize); - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); return r; } } @@ -59,8 +59,8 @@ public static unsafe partial class ImGuiP scaleMin, scaleMax, frameSize); - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); return r; } } @@ -69,7 +69,7 @@ public static unsafe partial class ImGuiP ImGuiPlotType plotType, ImU8String label, ImGui.GetFloatRefContextDelegate valuesGetter, scoped in TContext context, int valuesCount, int valuesOffset, ImU8String overlayText, float scaleMin, float scaleMax, Vector2 frameSize) - where TContext: allows ref struct + where TContext : allows ref struct { fixed (byte* labelPtr = &label.GetPinnableNullTerminatedReference()) fixed (byte* overlayTextPtr = &overlayText.GetPinnableNullTerminatedReference()) @@ -91,8 +91,8 @@ public static unsafe partial class ImGuiP scaleMin, scaleMax, frameSize); - label.Dispose(); - overlayText.Dispose(); + label.Recycle(); + overlayText.Recycle(); return r; } } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs index 2f12a55c1..c4a2a48a9 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiP.Text.cs @@ -13,7 +13,7 @@ public static unsafe partial class ImGuiP ImGui.append(&g->DebugLogBuf, text.Span); if ((g->DebugLogFlags & ImGuiDebugLogFlags.OutputToTty) != ImGuiDebugLogFlags.None) Debug.Write(text.ToString()); - text.Dispose(); + text.Recycle(); } public static int FindRenderedTextEnd( @@ -35,20 +35,20 @@ public static unsafe partial class ImGuiP FindRenderedTextEnd(textBuf.Span, out var beforeBytes, out var afterBytes); before = text[..Encoding.UTF8.GetCharCount(beforeBytes)]; after = text[before.Length..]; - textBuf.Dispose(); + textBuf.Recycle(); return before.Length; } public static uint GetID(ImGuiWindowPtr self, ImU8String str) { - fixed (byte* strPtr = str.Span) + fixed (byte* strPtr = str) { var seed = *self.IDStack.Back; var id = ImGuiPNative.ImHashStr(strPtr, (nuint)str.Length, seed); var g = ImGui.GetCurrentContext(); if (g.DebugHookIdInfo == id) DebugHookIdInfo(id, (ImGuiDataType)ImGuiDataTypePrivate.String, strPtr, strPtr + str.Length); - str.Dispose(); + str.Recycle(); return id; } } @@ -63,10 +63,10 @@ public static unsafe partial class ImGuiP public static uint ImHashStr(ImU8String data, uint seed = 0) { - fixed (byte* ptr = data.Span) + fixed (byte* ptr = data) { var res = ImGuiPNative.ImHashStr(ptr, (nuint)data.Length, seed); - data.Dispose(); + data.Recycle(); return res; } } @@ -133,24 +133,24 @@ public static unsafe partial class ImGuiP public static void LogRenderedText(scoped in Vector2 refPos, ImU8String text) { fixed (Vector2* refPosPtr = &refPos) - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.LogRenderedText(refPosPtr, textPtr, textPtr + text.Length); - text.Dispose(); + text.Recycle(); } public static void RenderText(Vector2 pos, ImU8String text, bool hideTextAfterHash = true) { - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.RenderText(pos, textPtr, textPtr + text.Length, hideTextAfterHash ? (byte)1 : (byte)0); - text.Dispose(); + text.Recycle(); } public static void RenderTextWrapped( Vector2 pos, ImU8String text, float wrapWidth) { - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.RenderTextWrapped(pos, textPtr, textPtr + text.Length, wrapWidth); - text.Dispose(); + text.Recycle(); } public static void RenderTextClipped( @@ -160,7 +160,7 @@ public static unsafe partial class ImGuiP { var textSizeIfKnownOrDefault = textSizeIfKnown ?? default; var clipRectOrDefault = clipRect ?? default; - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.RenderTextClipped( posMin, posMax, @@ -169,7 +169,7 @@ public static unsafe partial class ImGuiP textSizeIfKnown.HasValue ? &textSizeIfKnownOrDefault : null, align, clipRect.HasValue ? &clipRectOrDefault : null); - text.Dispose(); + text.Recycle(); } public static void RenderTextClippedEx( @@ -179,7 +179,7 @@ public static unsafe partial class ImGuiP { var textSizeIfKnownOrDefault = textSizeIfKnown ?? default; var clipRectOrDefault = clipRect ?? default; - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.RenderTextClippedEx( drawList.Handle, posMin, @@ -189,7 +189,7 @@ public static unsafe partial class ImGuiP textSizeIfKnown.HasValue ? &textSizeIfKnownOrDefault : null, align, clipRect.HasValue ? &clipRectOrDefault : null); - text.Dispose(); + text.Recycle(); } public static void RenderTextEllipsis( @@ -197,7 +197,7 @@ public static unsafe partial class ImGuiP ImU8String text, scoped in Vector2? textSizeIfKnown = null) { var textSizeIfKnownOrDefault = textSizeIfKnown ?? default; - fixed (byte* textPtr = text.Span) + fixed (byte* textPtr = text) ImGuiPNative.RenderTextEllipsis( drawList.Handle, posMin, @@ -207,7 +207,7 @@ public static unsafe partial class ImGuiP textPtr, textPtr + text.Length, textSizeIfKnown.HasValue ? &textSizeIfKnownOrDefault : null); - text.Dispose(); + text.Recycle(); } public static void TextEx(ReadOnlySpan text, ImGuiTextFlags flags) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs index 03795d5e7..4ef7042eb 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGuiTextFilter.Custom.cs @@ -2,21 +2,21 @@ namespace Dalamud.Bindings.ImGui; public unsafe partial struct ImGuiTextFilter { - public void Draw(ImU8String label = default, float width = 0.0f) + public bool Draw(ImU8String label = default, float width = 0.0f) { fixed (ImGuiTextFilter* thisPtr = &this) - ImGui.Draw(thisPtr, label, width); + return ImGui.Draw(thisPtr, label, width); } - public void PassFilter(ImU8String text) + public bool PassFilter(ImU8String text) { fixed (ImGuiTextFilter* thisPtr = &this) - ImGui.PassFilter(thisPtr, text); + return ImGui.PassFilter(thisPtr, text); } } public partial struct ImGuiTextFilterPtr { - public void Draw(ImU8String label = default, float width = 0.0f) => ImGui.Draw(this, label, width); - public void PassFilter(ImU8String text) => ImGui.PassFilter(this, text); + public bool Draw(ImU8String label = default, float width = 0.0f) => ImGui.Draw(this, label, width); + public bool PassFilter(ImU8String text) => ImGui.PassFilter(this, text); } diff --git a/imgui/Dalamud.Bindings.ImGui/ImU8String.cs b/imgui/Dalamud.Bindings.ImGui/ImU8String.cs index d1b9ae6c2..17756ae61 100644 --- a/imgui/Dalamud.Bindings.ImGui/ImU8String.cs +++ b/imgui/Dalamud.Bindings.ImGui/ImU8String.cs @@ -8,7 +8,7 @@ using System.Text.Unicode; namespace Dalamud.Bindings.ImGui; [InterpolatedStringHandler] -public ref struct ImU8String : IDisposable +public ref struct ImU8String { public const int AllocFreeBufferSize = 512; private const int MinimumRentSize = AllocFreeBufferSize * 2; @@ -35,7 +35,7 @@ public ref struct ImU8String : IDisposable } public ImU8String(int literalLength, int formattedCount) - : this(ReadOnlySpan.Empty) + : this(""u8) { this.state |= State.Interpolation; literalLength += formattedCount * 4; @@ -51,6 +51,12 @@ public ref struct ImU8String : IDisposable public ImU8String(ReadOnlySpan text, bool ensureNullTermination = false) : this() { + if (Unsafe.IsNullRef(in MemoryMarshal.GetReference(text))) + { + this.state = State.None; + return; + } + this.state = State.Initialized; if (text.IsEmpty) { @@ -82,6 +88,12 @@ public ref struct ImU8String : IDisposable public ImU8String(ReadOnlySpan text) : this() { + if (Unsafe.IsNullRef(in MemoryMarshal.GetReference(text))) + { + this.state = State.None; + return; + } + this.state = State.Initialized | State.NullTerminated; this.Length = Encoding.UTF8.GetByteCount(text); if (this.Length + 1 < AllocFreeBufferSize) @@ -169,6 +181,28 @@ public ref struct ImU8String : IDisposable public static unsafe implicit operator ImU8String(byte* text) => new(text); public static unsafe implicit operator ImU8String(char* text) => new(text); + public ref readonly byte GetPinnableReference() + { + if (this.IsNull) + return ref Unsafe.NullRef(); + + if (this.IsEmpty) + return ref this.FixedBufferSpan[0]; + + return ref this.Span.GetPinnableReference(); + } + + public ref readonly byte GetPinnableReference(ReadOnlySpan defaultValue) + { + if (this.IsNull) + return ref defaultValue.GetPinnableReference(); + + if (this.IsEmpty) + return ref this.FixedBufferSpan[0]; + + return ref this.Span.GetPinnableReference(); + } + public ref readonly byte GetPinnableNullTerminatedReference(ReadOnlySpan defaultValue = default) { if (this.IsNull) @@ -213,7 +247,7 @@ public ref struct ImU8String : IDisposable this.externalFirstByte = ref Unsafe.NullRef(); } - public void Dispose() + public void Recycle() { if (this.rentedBuffer is { } buf) { @@ -226,7 +260,7 @@ public ref struct ImU8String : IDisposable { if (!this.IsNull) { - other.Dispose(); + other.Recycle(); var res = this; this = default; return res; @@ -291,6 +325,12 @@ public ref struct ImU8String : IDisposable FixAlignment(startingPos, alignment); } + public void AppendFormatted(object? value) => this.AppendFormatted(value!); + public void AppendFormatted(object? value, string? format) => this.AppendFormatted(value!, format); + public void AppendFormatted(object? value, int alignment) => this.AppendFormatted(value!, alignment); + public void AppendFormatted(object? value, int alignment, string? format) => + this.AppendFormatted(value!, alignment, format); + public void AppendFormatted(T value) => this.AppendFormatted(value, null); public void AppendFormatted(T value, string? format) diff --git a/lib/FFXIVClientStructs b/lib/FFXIVClientStructs index c0eb9c518..3ae5a65f6 160000 --- a/lib/FFXIVClientStructs +++ b/lib/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit c0eb9c518c32dd20cabda74ead6712141f52f223 +Subproject commit 3ae5a65f6d3a00d2d1091319ddec1442ea22726a diff --git a/lib/Lumina.Excel b/lib/Lumina.Excel index d78895e2c..1c7d19628 160000 --- a/lib/Lumina.Excel +++ b/lib/Lumina.Excel @@ -1 +1 @@ -Subproject commit d78895e2cbc001b1fca08ad6fd4d3fa9ef7f3c74 +Subproject commit 1c7d196283f12210e000e8dfd3cc1226fcf39e41