Add NightShot source
This commit is contained in:
1 parent
0174ecaf32
commit
dfcbacfb0c
33 files changed
+8358
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user