Update nuget packages
[profile/tv/apps/dotnet/home.git] / TVHome / TVHome.TizenTV / SniperInterOp.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 namespace CoreApp
5 {
6     /// <summary>
7     /// Sniper InterOp class for getting application's screen-shot.
8     /// </summary>
9     internal static partial class InterOp
10     {
11         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
12         public delegate void CallbackAddedRemoved(string appId, string instanceId);
13         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
14         public delegate void CallbackUpdated(string appId, string instanceId, string filename);
15         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
16         public delegate int CallbackSkipUpdate(string appid, string instanceId, string filename);
17
18         [StructLayout(LayoutKind.Sequential)]
19         public struct SniperCallback
20         {
21             public CallbackAddedRemoved Added;
22             public CallbackAddedRemoved Removed;
23             public CallbackUpdated Updated;
24             public CallbackSkipUpdate SkipUpdate;
25         }
26
27         [DllImport("sniper", CharSet = CharSet.Ansi)]
28         internal static extern int sniper_init(IntPtr win, SniperCallback callbacks, string path, int w, int h);
29
30         [DllImport("sniper", CharSet = CharSet.Ansi)]
31         internal static extern int sniper_request_update(string instanceId);
32
33         [DllImport("sniper", CharSet = CharSet.Ansi)]
34         internal static extern int sniper_fini();
35     }
36 }
37
38 /* End of a file */