// DragonX Wallet - ImGui Edition // Copyright 2024-2026 The Hush Developers // Released under the GPLv3 #pragma once #include namespace dragonx { namespace ui { /** * @brief QR Code rendering utilities */ /** * @brief Generate a texture containing a QR code * @param data The data to encode in the QR code * @param out_width Output: width of the texture * @param out_height Output: height of the texture * @return Texture handle (OpenGL texture ID or DX11 SRV pointer), or 0 on failure */ uintptr_t GenerateQRTexture(const char* data, int* out_width, int* out_height); /** * @brief Free a QR texture * @param texture_id Texture handle returned by GenerateQRTexture */ void FreeQRTexture(uintptr_t texture_id); /** * @brief Render a QR code using ImGui * @param texture_id Texture handle from GenerateQRTexture * @param size Display size (width and height) */ void RenderQRCode(uintptr_t texture_id, float size); } // namespace ui } // namespace dragonx