forked from Samsung/TizenFX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterop.AttachPanel.cs
More file actions
executable file
·78 lines (61 loc) · 4.01 KB
/
Interop.AttachPanel.cs
File metadata and controls
executable file
·78 lines (61 loc) · 4.01 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Runtime.InteropServices;
using Tizen.Applications;
/// <summary>
/// The Interoperability support class for the Tizen APIs.
/// </summary>
internal static partial class Interop
{
/// <summary>
/// The Interoperability support class for the attach panel APIs.
/// </summary>
internal static partial class AttachPanel
{
internal enum ErrorCode : int
{
None = Tizen.Internals.Errors.ErrorCode.None,
InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
AlreadyExists = -0x02850000 | 0x01,
NotInitialized = -0x02850000 | 0x02,
UnsupportedContentCategory = -0x02850000 | 0x03,
AlreadyDestroyed = -0x02850000 | 0x05,
NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void AttachPanelEventCallback(IntPtr attachPanel, int eventType, IntPtr eventInfo, IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void AttachPanelResultCallback(IntPtr attachPanel, int category, IntPtr result, int resultCode, IntPtr userData);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_create")]
internal static extern ErrorCode CreateAttachPanel(IntPtr conform, out IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_destroy")]
internal static extern ErrorCode DestroyAttachPanel(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_add_content_category")]
internal static extern ErrorCode AddCategory(IntPtr attach_panel, int content_category, IntPtr extraData);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_remove_content_category")]
internal static extern ErrorCode RemoveCategory(IntPtr attach_panel, int content_category);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_set_extra_data")]
internal static extern ErrorCode SetExtraData(IntPtr attach_panel, int content_category, IntPtr extraData);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_set_result_cb")]
internal static extern ErrorCode SetResultCb(IntPtr attach_panel, AttachPanelResultCallback callback, IntPtr userData);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_unset_result_cb")]
internal static extern ErrorCode UnsetResultCb(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_set_event_cb")]
internal static extern ErrorCode SetEventCb(IntPtr attach_panel, AttachPanelEventCallback callback, IntPtr userData);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_unset_event_cb")]
internal static extern ErrorCode UnsetEventCb(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_show")]
internal static extern ErrorCode Show(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_show_without_animation")]
internal static extern ErrorCode ShowWithoutAnimation(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_hide")]
internal static extern ErrorCode Hide(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_hide_without_animation")]
internal static extern ErrorCode HideWithoutAnimation(IntPtr attach_panel);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_get_visibility")]
internal static extern ErrorCode GetVisibility(IntPtr attach_panel, out int visible);
[DllImport(Libraries.AttachPanel, EntryPoint = "attach_panel_get_state")]
internal static extern ErrorCode GetState(IntPtr attach_panel, out int state);
}
}