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,64 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace settings {
|
||||
|
||||
inline constexpr std::size_t kSavedColorCount = 48;
|
||||
|
||||
enum class ScreenshotFormat : int {
|
||||
Png = 0,
|
||||
Jpeg = 1,
|
||||
};
|
||||
|
||||
struct AppSettings {
|
||||
bool notificationsEnabled = true;
|
||||
bool startWithWindows = true;
|
||||
bool silentAdmin = false;
|
||||
|
||||
bool copyUploadedUrl = true;
|
||||
bool openUploadedUrl = false;
|
||||
bool closeEditorAfterUpload = true;
|
||||
|
||||
std::wstring uploadUrl;
|
||||
std::wstring uploadName = L"Screenshot1";
|
||||
std::wstring multipartField = L"file";
|
||||
|
||||
// Files are saved automatically with non-destructive incrementing names:
|
||||
// Screenshot_N.png/.jpg and GIFShot_N.gif.
|
||||
std::wstring saveDirectory;
|
||||
ScreenshotFormat screenshotFormat = ScreenshotFormat::Png;
|
||||
int jpegQuality = 92;
|
||||
|
||||
int gifFps = 30;
|
||||
int gifQuality = 8;
|
||||
int gifMaxDurationSeconds = 30;
|
||||
bool gifCaptureCursor = true;
|
||||
|
||||
// Drawing widths are physical pixels and intentionally persist immediately
|
||||
// when the mouse wheel changes the active tool.
|
||||
int penWidth = 3;
|
||||
int lineWidth = 3;
|
||||
int arrowWidth = 3;
|
||||
int rectangleWidth = 3;
|
||||
int markerWidth = 15;
|
||||
|
||||
// ARGB values. Empty slots remain available for one-click saving from the
|
||||
// in-editor 8x6 color picker.
|
||||
std::array<std::uint32_t, kSavedColorCount> paletteArgb{};
|
||||
std::array<bool, kSavedColorCount> paletteOccupied{};
|
||||
};
|
||||
|
||||
[[nodiscard]] AppSettings load();
|
||||
[[nodiscard]] bool save(const AppSettings& value);
|
||||
[[nodiscard]] bool exists();
|
||||
[[nodiscard]] std::wstring filePath();
|
||||
[[nodiscard]] std::wstring defaultSaveDirectory();
|
||||
[[nodiscard]] std::wstring normalizeEndpoint(std::wstring value);
|
||||
|
||||
} // namespace settings
|
||||
Reference in new issue
Block a user