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,28 @@
|
||||
#pragma once
|
||||
#include "config.hpp"
|
||||
#include "settings.hpp"
|
||||
#include <windows.h>
|
||||
#include <objidl.h>
|
||||
#include <gdiplus.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
[[nodiscard]] int findEncoderClsid(const WCHAR* mimeType, CLSID* clsid);
|
||||
[[nodiscard]] bool saveBitmapAsPng(Gdiplus::Bitmap& bitmap, const std::wstring& path);
|
||||
[[nodiscard]] bool saveBitmapAsJpeg(Gdiplus::Bitmap& bitmap, const std::wstring& path, int quality);
|
||||
[[nodiscard]] bool copyBitmapToClipboard(HWND owner, Gdiplus::Bitmap& bitmap);
|
||||
[[nodiscard]] bool encodeBitmapAsPng(Gdiplus::Bitmap& bitmap, std::vector<BYTE>& output);
|
||||
|
||||
// Reserves a non-existing incremented file name with CREATE_NEW. The returned
|
||||
// empty file belongs to the caller and may safely be filled/overwritten.
|
||||
[[nodiscard]] std::wstring reserveIncrementedPath(
|
||||
const std::wstring& directory, const wchar_t* prefix,
|
||||
const wchar_t* extension);
|
||||
|
||||
[[nodiscard]] bool saveScreenshotIncremented(
|
||||
Gdiplus::Bitmap& bitmap, const settings::AppSettings& configuration,
|
||||
std::wstring& savedPath);
|
||||
|
||||
enum class PrintBitmapResult { Printed, Cancelled, Failed };
|
||||
[[nodiscard]] PrintBitmapResult printBitmap(HWND owner, Gdiplus::Bitmap& bitmap);
|
||||
[[nodiscard]] std::wstring choosePngPath(HWND owner);
|
||||
Reference in new issue
Block a user