[NUI] Add WindowMouseInOutEvent (#5242)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Interop / Interop.FrameProvider.cs
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19
20 using Tizen.NUI;
21 using Tizen.Applications;
22
23 namespace Tizen.NUI
24 {
25     internal static partial class Interop
26     {
27         internal static partial class FrameProvider
28         {
29             internal enum ErrorCode
30             {
31                 None = Tizen.Internals.Errors.ErrorCode.None,
32                 InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation,
33                 InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
34                 IoError = Tizen.Internals.Errors.ErrorCode.IoError,
35                 OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
36             }
37
38             internal delegate void ShowCallback(IntPtr handle, IntPtr userData);
39
40             internal delegate void HideCallback(IntPtr handle, IntPtr userData);
41
42             [StructLayout(LayoutKind.Sequential)]
43             internal struct FrameProviderEventCallbacks
44             {
45                 public ShowCallback OnShow;
46                 public HideCallback OnHide;
47             }
48
49             [DllImport(Libraries.FrameProvider, EntryPoint = "frame_provider_create")]
50             internal static extern ErrorCode Create(IntPtr wl2Win, ref FrameProviderEventCallbacks callbacks, IntPtr userData, out SafeFrameProviderHandle handle);
51
52             [DllImport(Libraries.FrameProvider, EntryPoint = "frame_provider_destroy")]
53             internal static extern ErrorCode DangerousDestroy(IntPtr handle);
54
55             [DllImport(Libraries.FrameProvider, EntryPoint = "frame_provider_notify_show_status")]
56             internal static extern ErrorCode NotifyShowStatus(SafeFrameProviderHandle handle, SafeBundleHandle safeBundleHandle);
57
58             [DllImport(Libraries.FrameProvider, EntryPoint = "frame_provider_notify_hide_status")]
59             internal static extern ErrorCode NotifyHideStatus(SafeFrameProviderHandle handle, SafeBundleHandle safeBundleHandle);
60         }
61     }
62 }