Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Tizen.WindowSystem/Tizen.WindowSystem.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
<ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions src/Tizen.WindowSystem/Tizen.WindowSystem.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.WindowSystem", "Tizen.WindowSystem.csproj", "{4736851E-294E-4EBA-9DF1-79D2D78176B9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4736851E-294E-4EBA-9DF1-79D2D78176B9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0EBD4ED2-63CC-4DCC-A57A-68DBC451B9F2}
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions src/Tizen.WindowSystem/src/internal/Interop/Interop.EcoreWl2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem
{
internal static partial class Interop
{
internal static partial class EcoreWl2
{
const string lib = "libecore_wl2.so.1";

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "ecore_wl2_window_id_get")]
internal static extern int GetWindowId(IntPtr win);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem
{
internal static partial class Interop
{
internal static partial class InputGenerator
{
const string lib = "libcapi-ui-efl-util.so.0";

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator")]
internal static extern IntPtr Init(int devType);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator_with_name")]
internal static extern IntPtr InitWithName(int devType, string devName);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_initialize_generator_with_sync")]
internal static extern IntPtr SyncInit(int devType, string devName);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_deinitialize_generator")]
internal static extern ErrorCode Deinit(IntPtr inputGenHandler);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_key")]
internal static extern ErrorCode GenerateKey(IntPtr inputGenHandler, string keyName, int pressed);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_pointer")]
internal static extern ErrorCode GeneratePointer(IntPtr inputGenHandler, int buttons, int pointerType, int x, int y);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_wheel")]
internal static extern ErrorCode GenerateWheel(IntPtr inputGenHandler, int wheelType, int value);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_touch")]
internal static extern ErrorCode GenerateTouch(IntPtr inputGenHandler, int idx, int touchType, int x, int y);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "efl_util_input_generate_touch_axis")]
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);

// Enumeration of input device types.
// The device type may be used overlapped.
internal enum DeviceType
{
None = 0x0,
Touchscreen = (1 << 0),
Keyboard = (1 << 1),
Pointer = (1 << 2),
All = Touchscreen | Keyboard, // Keyboard and Touchscreen
}

// Enumeration of touch event types
internal enum TouchType
{
None,
Begin,
Update,
End,
}

// Enumeration of pointer event types
internal enum PointerType
{
Down,
Up,
Move,
}

// Enumeration of pointer wheel event types
internal enum PointerWheelType
{
Vertical,
Horizontal,
}

private const int ErrorTzsh = -0x02860000;

internal enum ErrorCode
{
None = Tizen.Internals.Errors.ErrorCode.None, // Successful
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, // Out of memory
InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, // Invalid parameter
InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation, // Invalid operation
PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, // Permission denied
NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported, // NOT supported
NoService = ErrorTzsh | 0x01, // Service does not exist
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem
{
internal static partial class Interop
{
internal static class InputGesture
{
const string lib = "libcapi-ui-efl-util.so.0";

internal static string LogTag = "Tizen.WindowSystem";

[DllImport(lib, EntryPoint = "efl_util_gesture_initialize")]
internal static extern IntPtr Initialize();

[DllImport(lib, EntryPoint = "efl_util_gesture_deinitialize")]
internal static extern ErrorCode Deinitialize(IntPtr gestureHandler);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_new")]
internal static extern IntPtr EdgeSwipeNew(IntPtr gestureHandler, int fingers, int edge);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_free")]
internal static extern ErrorCode EdgeSwipeFree(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_size_set")]
internal static extern ErrorCode EdgeSwipeSizeSet(IntPtr gestureData, int edgeSize, int startPoint, int endPoint);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_new")]
internal static extern IntPtr EdgeDragNew(IntPtr gestureHandler, int fingers, int edge);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_free")]
internal static extern ErrorCode EdgeDragFree(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_size_set")]
internal static extern ErrorCode EdgeDragSizeSet(IntPtr gestureData, int edgeSize, int startPoint, int endPoint);

[DllImport(lib, EntryPoint = "efl_util_gesture_tap_new")]
internal static extern IntPtr TapNew(IntPtr gestureHandler, int fingers, int repeats);

[DllImport(lib, EntryPoint = "efl_util_gesture_tap_free")]
internal static extern ErrorCode TapFree(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_new")]
internal static extern IntPtr PalmCoverNew(IntPtr gestureHandler);

[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_free")]
internal static extern ErrorCode PalmCoverFree(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_grab")]
internal static extern ErrorCode GestureGrab(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_grab_mode_set")]
internal static extern ErrorCode SetGestureGrabMode(IntPtr gestureHandler, IntPtr gestureData, int mode);

[DllImport(lib, EntryPoint = "efl_util_gesture_ungrab")]
internal static extern ErrorCode GestureUngrab(IntPtr gestureHandler, IntPtr gestureData);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_swipe_cb_set")]
internal static extern ErrorCode SetEdgeSwipeCb(IntPtr gestureHandler, EdgeSwipeCb cbFunc, IntPtr usergestureData);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void EdgeSwipeCb(IntPtr usergestureData, int mode, int fingers, int sx, int sy, int edge);

[DllImport(lib, EntryPoint = "efl_util_gesture_edge_drag_cb_set")]
internal static extern ErrorCode SetEdgeDragCb(IntPtr gestureHandler, EdgeDragCb cbFunc, IntPtr usergestureData);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void EdgeDragCb(IntPtr usergestureData, int mode, int fingers, int cx, int cy, int edge);

[DllImport(lib, EntryPoint = "efl_util_gesture_tap_cb_set")]
internal static extern ErrorCode SetTapCb(IntPtr gestureHandler, TapCb cbFunc, IntPtr usergestureData);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void TapCb(IntPtr usergestureData, int mode, int fingers, int repeats);

[DllImport(lib, EntryPoint = "efl_util_gesture_palm_cover_cb_set")]
internal static extern ErrorCode SetPalmCoverCb(IntPtr gestureHandler, PalmCoverCb cbFunc, IntPtr usergestureData);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void PalmCoverCb(IntPtr usergestureData, int mode, int duration, int cx, int cy, int size, double pressure);

internal enum ErrorCode
{
None = Tizen.Internals.Errors.ErrorCode.None, // Successful
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, // Out of memory
InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, // Invalid parameter
InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation, // Invalid operation
PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, // Permission denied
NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported, // NOT supported
};
}
}
}
52 changes: 52 additions & 0 deletions src/Tizen.WindowSystem/src/internal/Interop/Interop.KVMService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem.Shell
{
internal static partial class Interop
{
internal static partial class KVMService
{
const string lib = "libtzsh_kvm_service.so.0";

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_create")]
internal static extern IntPtr Create(IntPtr tzsh, uint win);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_destroy")]
internal static extern int Destroy(IntPtr kvmService);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_perform_drop")]
internal static extern int PerformDrop(IntPtr kvmService);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_cancel_drag")]
internal static extern int CancelDrag(IntPtr kvmService);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_receive_drag_data")]
internal static extern int ReceiveDragData(IntPtr kvmService, string mimeType);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_get_source_mimetypes")]
internal static extern int GetSourceMimetypes(
IntPtr kvmService,
out string[] mimeTypes,
out int count);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_secondary_selection_set")]
internal static extern int SetSecondarySelection(IntPtr kvmService);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_secondary_selection_unset")]
internal static extern int UnsetSecondarySelection(IntPtr kvmService);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_perform_drop_target")]
internal static extern int PerformDropTarget(IntPtr kvmService, uint drop_target);

internal delegate void KVMDragStartEventCallback(IntPtr data, IntPtr kvmService);
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_drag_start_cb_set")]
internal static extern int SetDragStartEventHandler(IntPtr kvmService, KVMDragStartEventCallback func, IntPtr data);

internal delegate void KVMDragEndEventCallback(IntPtr data, IntPtr kvmService);
[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_kvm_service_drag_end_cb_set")]
internal static extern int SetDragEndEventHandler(IntPtr kvmService, KVMDragEndEventCallback func, IntPtr data);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem.Shell
{
internal static partial class Interop
{
internal static partial class QuickPanelClient
{
const string lib = "libtzsh_quickpanel.so.0";

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_create_with_type")]
internal static extern IntPtr CreateWithType(IntPtr tzsh, uint win, int type);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_destroy")]
internal static extern int Destroy(IntPtr qpClient);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_visible_get")]
internal static extern int GetVisible(IntPtr qpClient, out int vis);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_scrollable_state_get")]
internal static extern int GetScrollableState(IntPtr qpClient, out int scroll);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_scrollable_state_set")]
internal static extern int SetScrollableState(IntPtr qpClient, int scroll);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_orientation_get")]
internal static extern int GetOrientation(IntPtr qpClient, out int orientation);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_show")]
internal static extern int Show(IntPtr qpClient);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_hide")]
internal static extern int Hide(IntPtr qpClient);

internal delegate void QuickPanelEventCallback(int type, IntPtr ev_info, IntPtr data);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_handler_add")]
internal static extern IntPtr AddEventHandler(IntPtr qpClient, int type, QuickPanelEventCallback func, IntPtr data);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_handler_del")]
internal static extern int DelEventHandler(IntPtr qpClient, IntPtr eventHandler);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_visible_get")]
internal static extern int GetEventVisible(IntPtr ev_info, out int state);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_event_orientation_get")]
internal static extern int GetEventOrientation(IntPtr ev_info, out int state);

internal const string EventStringVisible = "tzsh_quickpanel_event_visible";
internal const string EventStringOrientation = "tzsh_quickpanel_event_orientation";
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Tizen.WindowSystem.Shell
{
internal static partial class Interop
{
internal static partial class QuickPanelService
{
const string lib = "libtzsh_quickpanel_service.so.0";

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_create_with_type")]
internal static extern IntPtr CreateWithType(IntPtr tzsh, uint win, int type);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_destroy")]
internal static extern int Destroy(IntPtr service);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_type_get")]
internal static extern int GetType(IntPtr service, out int type);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_show")]
internal static extern int Show(IntPtr service);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_hide")]
internal static extern int Hide(IntPtr service);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_content_region_set")]
internal static extern int SetContentRegion(IntPtr service, uint angle, IntPtr region);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_handler_region_set")]
internal static extern int SetHandlerRegion(IntPtr service, uint angle, IntPtr region);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_effect_type_set")]
internal static extern int SetEffectType(IntPtr service, int type);

[global::System.Runtime.InteropServices.DllImport(lib, EntryPoint = "tzsh_quickpanel_service_scroll_lock")]
internal static extern int LockScroll(IntPtr service, bool locked);
}
}
}
Loading
Loading