Skip to content

Commit 573bbd1

Browse files
committed
Bring back Tizen.NUI.WindowSystem
1 parent cb5aed0 commit 573bbd1

30 files changed

+4380
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<ProjectReference Include="..\Tizen.NUI\Tizen.NUI.csproj" />
10+
<ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
11+
</ItemGroup>
12+
13+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.002.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.WindowSystem", "Tizen.NUI.WindowSystem.csproj", "{4736851E-294E-4EBA-9DF1-79D2D78176B9}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {0EBD4ED2-63CC-4DCC-A57A-68DBC451B9F2}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Tizen.NUI.WindowSystem
6+
{
7+
internal static partial class Interop
8+
{
9+
internal static partial class EcoreWl2
10+
{
11+
const string lib = "libecore_wl2.so.1";
12+
13+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "ecore_wl2_window_id_get")]
14+
internal static extern int GetWindowId(IntPtr win);
15+
}
16+
}
17+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Tizen.NUI.WindowSystem
6+
{
7+
internal static partial class Interop
8+
{
9+
internal static partial class InputGenerator
10+
{
11+
const string lib = "libcapi-ui-efl-util.so.0";
12+
13+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator")]
14+
internal static extern IntPtr Init(int devType);
15+
16+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator_with_name")]
17+
internal static extern IntPtr InitWithName(int devType, string devName);
18+
19+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator_with_sync")]
20+
internal static extern IntPtr SyncInit(int devType, string devName);
21+
22+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_deinitialize_generator")]
23+
internal static extern ErrorCode Deinit(IntPtr inputGenHandler);
24+
25+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_key")]
26+
internal static extern ErrorCode GenerateKey(IntPtr inputGenHandler, string keyName, int pressed);
27+
28+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_pointer")]
29+
internal static extern ErrorCode GeneratePointer(IntPtr inputGenHandler, int buttons, int pointerType, int x, int y);
30+
31+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_wheel")]
32+
internal static extern ErrorCode GenerateWheel(IntPtr inputGenHandler, int wheelType, int value);
33+
34+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_touch")]
35+
internal static extern ErrorCode GenerateTouch(IntPtr inputGenHandler, int idx, int touchType, int x, int y);
36+
37+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_touch_axis")]
38+
internal static extern ErrorCode GenerateTouchAxis(IntPtr inputGenHandler, int idx, int touchType, int x, int y, double radius_x, double radius_y, double pressure, double angle, double palm);
39+
40+
// Enumeration of input device types.
41+
// The device type may be used overlapped.
42+
internal enum DeviceType
43+
{
44+
None = 0x0,
45+
Touchscreen = (1 << 0),
46+
Keyboard = (1 << 1),
47+
Pointer = (1 << 2),
48+
All = Touchscreen | Keyboard, // Keyboard and Touchscreen
49+
}
50+
51+
// Enumeration of touch event types
52+
internal enum TouchType
53+
{
54+
None,
55+
Begin,
56+
Update,
57+
End,
58+
}
59+
60+
// Enumeration of pointer event types
61+
internal enum PointerType
62+
{
63+
Down,
64+
Up,
65+
Move,
66+
}
67+
68+
// Enumeration of pointer wheel event types
69+
internal enum PointerWheelType
70+
{
71+
Vertical,
72+
Horizontal,
73+
}
74+
75+
private const int ErrorTzsh = -0x02860000;
76+
77+
internal enum ErrorCode
78+
{
79+
None = Tizen.Internals.Errors.ErrorCode.None, // Successful
80+
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, // Out of memory
81+
InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, // Invalid parameter
82+
InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation, // Invalid operation
83+
PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, // Permission denied
84+
NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported, // NOT supported
85+
NoService = ErrorTzsh | 0x01, // Service does not exist
86+
}
87+
}
88+
}
89+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
using System;
2+
using System.Runtime.InteropServices;
3+
using System.Collections.Generic;
4+
using System.Text;
5+
6+
namespace Tizen.NUI.WindowSystem
7+
{
8+
internal static partial class Interop
9+
{
10+
internal static class InputGesture
11+
{
12+
const string lib = "libcapi-ui-efl-util.so.0";
13+
14+
internal static string LogTag = "Tizen.NUI.WindowSystem";
15+
16+
[DllImport(lib, EntryPoint = "efl_util_gesture_initialize")]
17+
internal static extern IntPtr Initialize();
18+
19+
[DllImport(lib, EntryPoint = "efl_util_gesture_deinitialize")]
20+
internal static extern ErrorCode Deinitialize(IntPtr gestureHandler);
21+
22+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_new")]
23+
internal static extern IntPtr EdgeSwipeNew(IntPtr gestureHandler, int fingers, int edge);
24+
25+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_free")]
26+
internal static extern ErrorCode EdgeSwipeFree(IntPtr gestureHandler, IntPtr gestureData);
27+
28+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_size_set")]
29+
internal static extern ErrorCode EdgeSwipeSizeSet(IntPtr gestureData, int edgeSize, int startPoint, int endPoint);
30+
31+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_new")]
32+
internal static extern IntPtr EdgeDragNew(IntPtr gestureHandler, int fingers, int edge);
33+
34+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_free")]
35+
internal static extern ErrorCode EdgeDragFree(IntPtr gestureHandler, IntPtr gestureData);
36+
37+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_size_set")]
38+
internal static extern ErrorCode EdgeDragSizeSet(IntPtr gestureData, int edgeSize, int startPoint, int endPoint);
39+
40+
[DllImport(lib, EntryPoint = "efl_util_gesture_tap_new")]
41+
internal static extern IntPtr TapNew(IntPtr gestureHandler, int fingers, int repeats);
42+
43+
[DllImport(lib, EntryPoint = "efl_util_gesture_tap_free")]
44+
internal static extern ErrorCode TapFree(IntPtr gestureHandler, IntPtr gestureData);
45+
46+
[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_new")]
47+
internal static extern IntPtr PalmCoverNew(IntPtr gestureHandler);
48+
49+
[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_free")]
50+
internal static extern ErrorCode PalmCoverFree(IntPtr gestureHandler, IntPtr gestureData);
51+
52+
[DllImport(lib, EntryPoint = "efl_util_gesture_grab")]
53+
internal static extern ErrorCode GestureGrab(IntPtr gestureHandler, IntPtr gestureData);
54+
55+
[DllImport(lib, EntryPoint = "efl_util_gesture_grab_mode_set")]
56+
internal static extern ErrorCode SetGestureGrabMode(IntPtr gestureHandler, IntPtr gestureData, int mode);
57+
58+
[DllImport(lib, EntryPoint = "efl_util_gesture_ungrab")]
59+
internal static extern ErrorCode GestureUngrab(IntPtr gestureHandler, IntPtr gestureData);
60+
61+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_cb_set")]
62+
internal static extern ErrorCode SetEdgeSwipeCb(IntPtr gestureHandler, EdgeSwipeCb cbFunc, IntPtr usergestureData);
63+
64+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
65+
internal delegate void EdgeSwipeCb(IntPtr usergestureData, int mode, int fingers, int sx, int sy, int edge);
66+
67+
[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_cb_set")]
68+
internal static extern ErrorCode SetEdgeDragCb(IntPtr gestureHandler, EdgeDragCb cbFunc, IntPtr usergestureData);
69+
70+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
71+
internal delegate void EdgeDragCb(IntPtr usergestureData, int mode, int fingers, int cx, int cy, int edge);
72+
73+
[DllImport(lib, EntryPoint = "efl_util_gesture_tap_cb_set")]
74+
internal static extern ErrorCode SetTapCb(IntPtr gestureHandler, TapCb cbFunc, IntPtr usergestureData);
75+
76+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
77+
internal delegate void TapCb(IntPtr usergestureData, int mode, int fingers, int repeats);
78+
79+
[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_cb_set")]
80+
internal static extern ErrorCode SetPalmCoverCb(IntPtr gestureHandler, PalmCoverCb cbFunc, IntPtr usergestureData);
81+
82+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
83+
internal delegate void PalmCoverCb(IntPtr usergestureData, int mode, int duration, int cx, int cy, int size, double pressure);
84+
85+
internal enum ErrorCode
86+
{
87+
None = Tizen.Internals.Errors.ErrorCode.None, // Successful
88+
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, // Out of memory
89+
InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, // Invalid parameter
90+
InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation, // Invalid operation
91+
PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, // Permission denied
92+
NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported, // NOT supported
93+
};
94+
}
95+
}
96+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Tizen.NUI.WindowSystem.Shell
6+
{
7+
internal static partial class Interop
8+
{
9+
internal static partial class KVMService
10+
{
11+
const string lib = "libtzsh_kvm_service.so.0";
12+
13+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_create")]
14+
internal static extern IntPtr Create(IntPtr tzsh, uint win);
15+
16+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_destroy")]
17+
internal static extern int Destroy(IntPtr kvmService);
18+
19+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_perform_drop")]
20+
internal static extern int PerformDrop(IntPtr kvmService);
21+
22+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_cancel_drag")]
23+
internal static extern int CancelDrag(IntPtr kvmService);
24+
25+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_receive_drag_data")]
26+
internal static extern int ReceiveDragData(IntPtr kvmService, string mimeType);
27+
28+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_get_source_mimetypes")]
29+
internal static extern int GetSourceMimetypes(
30+
IntPtr kvmService,
31+
out string[] mimeTypes,
32+
out int count);
33+
34+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_secondary_selection_set")]
35+
internal static extern int SetSecondarySelection(IntPtr kvmService);
36+
37+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_secondary_selection_unset")]
38+
internal static extern int UnsetSecondarySelection(IntPtr kvmService);
39+
40+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_perform_drop_target")]
41+
internal static extern int PerformDropTarget(IntPtr kvmService, uint drop_target);
42+
43+
internal delegate void KVMDragStartEventCallback(IntPtr data, IntPtr kvmService);
44+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_drag_start_cb_set")]
45+
internal static extern int SetDragStartEventHandler(IntPtr kvmService, KVMDragStartEventCallback func, IntPtr data);
46+
47+
internal delegate void KVMDragEndEventCallback(IntPtr data, IntPtr kvmService);
48+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_drag_end_cb_set")]
49+
internal static extern int SetDragEndEventHandler(IntPtr kvmService, KVMDragEndEventCallback func, IntPtr data);
50+
}
51+
}
52+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Tizen.NUI.WindowSystem.Shell
6+
{
7+
internal static partial class Interop
8+
{
9+
internal static partial class QuickPanelClient
10+
{
11+
const string lib = "libtzsh_quickpanel.so.0";
12+
13+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_create_with_type")]
14+
internal static extern IntPtr CreateWithType(IntPtr tzsh, uint win, int type);
15+
16+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_destroy")]
17+
internal static extern int Destroy(IntPtr qpClient);
18+
19+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_visible_get")]
20+
internal static extern int GetVisible(IntPtr qpClient, out int vis);
21+
22+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_scrollable_state_get")]
23+
internal static extern int GetScrollableState(IntPtr qpClient, out int scroll);
24+
25+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_scrollable_state_set")]
26+
internal static extern int SetScrollableState(IntPtr qpClient, int scroll);
27+
28+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_orientation_get")]
29+
internal static extern int GetOrientation(IntPtr qpClient, out int orientation);
30+
31+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_show")]
32+
internal static extern int Show(IntPtr qpClient);
33+
34+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_hide")]
35+
internal static extern int Hide(IntPtr qpClient);
36+
37+
internal delegate void QuickPanelEventCallback(int type, IntPtr ev_info, IntPtr data);
38+
39+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_handler_add")]
40+
internal static extern IntPtr AddEventHandler(IntPtr qpClient, int type, QuickPanelEventCallback func, IntPtr data);
41+
42+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_handler_del")]
43+
internal static extern int DelEventHandler(IntPtr qpClient, IntPtr eventHandler);
44+
45+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_visible_get")]
46+
internal static extern int GetEventVisible(IntPtr ev_info, out int state);
47+
48+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_orientation_get")]
49+
internal static extern int GetEventOrientation(IntPtr ev_info, out int state);
50+
51+
internal const string EventStringVisible = "tzsh_quickpanel_event_visible";
52+
internal const string EventStringOrientation = "tzsh_quickpanel_event_orientation";
53+
}
54+
}
55+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Tizen.NUI.WindowSystem.Shell
6+
{
7+
internal static partial class Interop
8+
{
9+
internal static partial class QuickPanelService
10+
{
11+
const string lib = "libtzsh_quickpanel_service.so.0";
12+
13+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_create_with_type")]
14+
internal static extern IntPtr CreateWithType(IntPtr tzsh, uint win, int type);
15+
16+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_destroy")]
17+
internal static extern int Destroy(IntPtr service);
18+
19+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_type_get")]
20+
internal static extern int GetType(IntPtr service, out int type);
21+
22+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_show")]
23+
internal static extern int Show(IntPtr service);
24+
25+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_hide")]
26+
internal static extern int Hide(IntPtr service);
27+
28+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_content_region_set")]
29+
internal static extern int SetContentRegion(IntPtr service, uint angle, IntPtr region);
30+
31+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_handler_region_set")]
32+
internal static extern int SetHandlerRegion(IntPtr service, uint angle, IntPtr region);
33+
34+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_effect_type_set")]
35+
internal static extern int SetEffectType(IntPtr service, int type);
36+
37+
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_scroll_lock")]
38+
internal static extern int LockScroll(IntPtr service, bool locked);
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)