Add NightShot source

This commit is contained in:
f1den committed 2026-07-31 17:03:49 +03:00
1 parent 0174ecaf32
commit dfcbacfb0c
33 files changed
+8358 -1

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#pragma once
#include "config.hpp"
#include <windows.h>
#include <string>
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