fetch cursor texture.

This commit is contained in:
hecomi
2016-11-01 02:15:25 +09:00
parent 9287ef2f2d
commit 6ba381f5d4
11 changed files with 905 additions and 70 deletions
+26
View File
@@ -5,6 +5,13 @@ using System.Runtime.InteropServices;
namespace uDesktopDuplication
{
public enum PointerShapeType
{
MonoChrome = 1,
Color = 2,
MaskedColor = 4,
}
public static class Lib
{
[DllImport("uDesktopDuplication")]
@@ -28,9 +35,21 @@ public static class Lib
[DllImport("uDesktopDuplication")]
public static extern int GetPointerY(int id);
[DllImport("uDesktopDuplication")]
public static extern int GetPointerShapeWidth(int id);
[DllImport("uDesktopDuplication")]
public static extern int GetPointerShapeHeight(int id);
[DllImport("uDesktopDuplication")]
public static extern int GetPointerShapePitch(int id);
[DllImport("uDesktopDuplication")]
public static extern PointerShapeType GetPointerShapeType(int id);
[DllImport("uDesktopDuplication")]
public static extern void UpdatePointerTexture(int id, System.IntPtr ptr);
[DllImport("uDesktopDuplication")]
public static extern int SetTexturePtr(int id, IntPtr ptr);
[DllImport("uDesktopDuplication")]
public static extern int GetErrorCode();
[DllImport("uDesktopDuplication")]
public static extern void GetErrorMessage(StringBuilder buf, int len);
public static string GetName(int id)
{
@@ -38,6 +57,13 @@ public static class Lib
GetName(id, buf, buf.Capacity);
return buf.ToString();
}
public static string GetErrorMessage()
{
var buf = new StringBuilder(64);
GetErrorMessage(buf, buf.Capacity);
return buf.ToString();
}
}
}