#pragma once #include "config.hpp" #include #include namespace gif_recorder { struct Options { int fps = 30; int quality = 8; // 0 means manual stop. hardLimitSeconds is always enforced. int durationSeconds = 0; int hardLimitSeconds = 30; bool captureCursor = true; }; struct StartRequest { RECT screenRect{}; Options options{}; HWND notificationTarget = nullptr; }; struct Result { bool success = false; std::wstring path; std::wstring message; int frameCount = 0; int elapsedMilliseconds = 0; }; [[nodiscard]] bool start(const StartRequest& request); void stop(); [[nodiscard]] bool active(); // Called by the main window after consuming WM_NIGHTSHOT_GIF_FINISHED. void releaseFinished(); void shutdown(); } // namespace gif_recorder