1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
namespace Steamworks;
public static class SteamScreenshots
{
public static ScreenshotHandle WriteScreenshot(byte[] pubRGB, uint cubRGB, int nWidth, int nHeight)
{
InteropHelp.TestIfAvailableClient();
return (ScreenshotHandle)NativeMethods.ISteamScreenshots_WriteScreenshot(CSteamAPIContext.GetSteamScreenshots(), pubRGB, cubRGB, nWidth, nHeight);
}
public static ScreenshotHandle AddScreenshotToLibrary(string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight)
{
InteropHelp.TestIfAvailableClient();
using InteropHelp.UTF8StringHandle pchFilename2 = new InteropHelp.UTF8StringHandle(pchFilename);
using InteropHelp.UTF8StringHandle pchThumbnailFilename2 = new InteropHelp.UTF8StringHandle(pchThumbnailFilename);
return (ScreenshotHandle)NativeMethods.ISteamScreenshots_AddScreenshotToLibrary(CSteamAPIContext.GetSteamScreenshots(), pchFilename2, pchThumbnailFilename2, nWidth, nHeight);
}
public static void TriggerScreenshot()
{
InteropHelp.TestIfAvailableClient();
NativeMethods.ISteamScreenshots_TriggerScreenshot(CSteamAPIContext.GetSteamScreenshots());
}
public static void HookScreenshots(bool bHook)
{
InteropHelp.TestIfAvailableClient();
NativeMethods.ISteamScreenshots_HookScreenshots(CSteamAPIContext.GetSteamScreenshots(), bHook);
}
public static bool SetLocation(ScreenshotHandle hScreenshot, string pchLocation)
{
InteropHelp.TestIfAvailableClient();
using InteropHelp.UTF8StringHandle pchLocation2 = new InteropHelp.UTF8StringHandle(pchLocation);
return NativeMethods.ISteamScreenshots_SetLocation(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, pchLocation2);
}
public static bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID)
{
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamScreenshots_TagUser(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, steamID);
}
public static bool TagPublishedFile(ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID)
{
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamScreenshots_TagPublishedFile(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, unPublishedFileID);
}
public static bool IsScreenshotsHooked()
{
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamScreenshots_IsScreenshotsHooked(CSteamAPIContext.GetSteamScreenshots());
}
public static ScreenshotHandle AddVRScreenshotToLibrary(EVRScreenshotType eType, string pchFilename, string pchVRFilename)
{
InteropHelp.TestIfAvailableClient();
using InteropHelp.UTF8StringHandle pchFilename2 = new InteropHelp.UTF8StringHandle(pchFilename);
using InteropHelp.UTF8StringHandle pchVRFilename2 = new InteropHelp.UTF8StringHandle(pchVRFilename);
return (ScreenshotHandle)NativeMethods.ISteamScreenshots_AddVRScreenshotToLibrary(CSteamAPIContext.GetSteamScreenshots(), eType, pchFilename2, pchVRFilename2);
}
}
|