Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0fee537
Remove delay between press & release
Mrcubix Jun 29, 2025
358fc87
update TODO
Mrcubix Jun 29, 2025
83d39b4
Add some logs & fix potential Null Reference in Installer
Mrcubix Jun 29, 2025
c43da79
Implemented GestureType Enum in Gestures
Mrcubix Aug 6, 2025
0650f49
Implement IsActivated
Mrcubix Aug 9, 2025
9c7fb8d
Move duplicated code in handlers to GesturesHandlerBase
Mrcubix Aug 10, 2025
5dd99b0
Run tests sequentially
Mrcubix Aug 13, 2025
f3052ce
Implementing ITouchesCountDependant
Mrcubix Aug 13, 2025
009f89d
Rewrite Swipe & Pan Gestures
Mrcubix Aug 13, 2025
3648bc2
Fix "some" formatting issues
Mrcubix Aug 13, 2025
d9a2bce
Add some comment in axaml files
Mrcubix Aug 14, 2025
aa4b791
Implement recorsing in the handler & daemon
Mrcubix Aug 15, 2025
9a7aae7
Fix CI build by not using C#12 features when .NET 8 isn't installed
Mrcubix Aug 15, 2025
cd85616
Merge branch 'master' of github.com:Mrcubix/Touch-Gestures into gestu…
Mrcubix Aug 15, 2025
9d39234
Update Serializable part of settings to version 2, as they should be
Mrcubix Aug 18, 2025
d4e85e5
Implement Plugin part of Gesture debugger
Mrcubix Aug 18, 2025
fc8a0dd
Rework Gesture Setups & Add Touch Count properties in new setups
Mrcubix Aug 19, 2025
e65873a
Serialize & Deserialize Touch Count
Mrcubix Aug 19, 2025
c3e0266
Fix codefactor, add some comments & remove unused properties
Mrcubix Aug 19, 2025
c1fc63d
Fix more Codefactor issues
Mrcubix Aug 19, 2025
02e95f4
Also Add the handlers to the uploaded Artifacts
Mrcubix Aug 19, 2025
ddf195e
Add some logs to build-ux
Mrcubix Aug 19, 2025
81f97c6
Also compute hashes for the handlers in build.sh
Mrcubix Aug 19, 2025
134da1c
Add missing newline in hashes.txt
Mrcubix Aug 19, 2025
4eb907e
Remove unused Nullable Enable Tag, also make SetupArea Nullable
Mrcubix Aug 20, 2025
7220988
Early Implementation of debugger
Mrcubix Aug 20, 2025
6ecfe2e
Move DataTemplates into UserControl.DataTemplates for cleaner Body
Mrcubix Aug 20, 2025
904719a
Move Tablet Selector to another file
Mrcubix Aug 20, 2025
5a443e9
Remove stray newline in BindingsOverview.axaml
Mrcubix Aug 20, 2025
433affa
Rework setup system to use Tasks instead of events
Mrcubix Aug 21, 2025
bc3f95d
Remove more duplicate questions
Mrcubix Aug 21, 2025
407ba0a
Implement Property Serialization (Backend & Frontend)
Mrcubix Aug 24, 2025
2687422
Fix Plugin CI
Mrcubix Aug 24, 2025
a606dfd
Update TODO.md
Mrcubix Aug 24, 2025
9051d87
Remove some unused classes & code
Mrcubix Aug 24, 2025
84727a2
Fix some formatting issues
Mrcubix Aug 25, 2025
822c2ff
Simplify TogglableMarginConverter
Mrcubix Aug 25, 2025
40db628
Disable search bar when not ready
Mrcubix Aug 25, 2025
a5ce6bb
Disable Binding display on Gesture Overview when IsReady = false
Mrcubix Aug 25, 2025
e8845b9
Add Conversion from Avalonia keys to Eto
Mrcubix Oct 2, 2025
2bab1ae
Add some logging for the Installer's constructor
Mrcubix Nov 24, 2025
196fdb6
Add try catch for plugin directory first usage to log potential issue…
Mrcubix Nov 26, 2025
88e3080
Try to safely get the plugin directory in static constructor
Mrcubix Nov 27, 2025
fbdf686
Remove log per files from installer
Mrcubix Nov 27, 2025
2252ac2
Merge pull request #24 from Mrcubix/Installer-troubleshooting
Mrcubix Nov 27, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
dotnet-version: |
5.0.x
6.0.x
8.0.x

- name: Build
run: bash ./build-plugin.sh --no-zip
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
declare -a files
# Add the Handlers
files+=("build/plugin/0.5.x/Touch-Gestures-0.5.x.zip")
files+=("build/plugin/0.6.x/Touch-Gestures-0.6.x.zip")
# Add Installers
files+=("build/installer/0.5.x/Touch-Gestures.Installer-0.5.x.zip")
files+=("build/installer/0.6.x/Touch-Gestures.Installer-0.6.x.zip")
Expand Down
2 changes: 1 addition & 1 deletion .modules/OpenTabletDriver.External
Submodule OpenTabletDriver.External updated 64 files
+1 −1 .vscode/launch.json
+1 −1 Directory.Build.props
+3 −0 OpenTabletDriver.External.Avalonia.Catalog/MainView.axaml
+1 −1 OpenTabletDriver.External.Avalonia.Catalog/MainWindow.axaml
+51 −71 OpenTabletDriver.External.Avalonia.Catalog/MainWindow.axaml.cs
+1 −2 OpenTabletDriver.External.Avalonia.Catalog/OpenTabletDriver.External.Avalonia.Catalog.csproj
+13 −10 OpenTabletDriver.External.Avalonia.Catalog/Pages/InputContainersPage.axaml
+20 −0 OpenTabletDriver.External.Avalonia.Catalog/Pages/PluginSettingsStoreEditorPage.axaml
+11 −0 OpenTabletDriver.External.Avalonia.Catalog/Pages/PluginSettingsStoreEditorPage.axaml.cs
+1 −3 OpenTabletDriver.External.Avalonia.Catalog/Program.cs
+179 −7 OpenTabletDriver.External.Avalonia.Catalog/ViewModels/MainViewModel.cs
+6 −2 OpenTabletDriver.External.Avalonia/Controls/AreaDisplay.axaml.cs
+56 −0 OpenTabletDriver.External.Avalonia/Controls/DoubleGeneratedControl.axaml
+11 −0 OpenTabletDriver.External.Avalonia/Controls/DoubleGeneratedControl.axaml.cs
+118 −0 OpenTabletDriver.External.Avalonia/Controls/GeneratedControl.axaml
+11 −0 OpenTabletDriver.External.Avalonia/Controls/GeneratedControl.axaml.cs
+31 −0 OpenTabletDriver.External.Avalonia/Controls/PluginSettingStoreEditor.axaml
+27 −0 OpenTabletDriver.External.Avalonia/Controls/PluginSettingStoreEditor.axaml.cs
+30 −0 OpenTabletDriver.External.Avalonia/Converters/JTokenConverter.cs
+35 −0 OpenTabletDriver.External.Avalonia/Converters/JTokenMultiConverter.cs
+27 −0 OpenTabletDriver.External.Avalonia/Converters/ModifierFromEnumConverter.cs
+26 −0 OpenTabletDriver.External.Avalonia/Converters/PropertyTypeToPrecisionConverter.cs
+31 −0 OpenTabletDriver.External.Avalonia/Converters/SliderPropertyConverter.cs
+22 −0 OpenTabletDriver.External.Avalonia/Converters/ValidatedPropertyConverter.cs
+35 −0 OpenTabletDriver.External.Avalonia/DataTemplates/DoublePropertyDataTemplate.cs
+36 −0 OpenTabletDriver.External.Avalonia/DataTemplates/PropertySettingPairDataTemplate.cs
+23 −20 OpenTabletDriver.External.Avalonia/Dialogs/AdvancedBindingEditorDialog.axaml
+70 −19 OpenTabletDriver.External.Avalonia/Dialogs/AdvancedBindingEditorDialog.axaml.cs
+1 −1 OpenTabletDriver.External.Avalonia/Dialogs/BindingEditorDialog.axaml
+73 −21 OpenTabletDriver.External.Avalonia/Dialogs/BindingEditorDialog.axaml.cs
+128 −0 OpenTabletDriver.External.Avalonia/Extensions/AvaloniaKeyExtensions.cs
+14 −0 OpenTabletDriver.External.Avalonia/Extensions/ObservableCollectionExtensions.cs
+14 −0 OpenTabletDriver.External.Avalonia/Models/PropertySettingPair.cs
+1 −1 OpenTabletDriver.External.Avalonia/OpenTabletDriver.External.Avalonia.csproj
+32 −0 OpenTabletDriver.External.Avalonia/TemplatedControls/BooleanInput.cs
+9 −0 OpenTabletDriver.External.Avalonia/TemplatedControls/DescribedInput.cs
+0 −9 OpenTabletDriver.External.Avalonia/TemplatedControls/DoubleInput.cs
+82 −0 OpenTabletDriver.External.Avalonia/TemplatedControls/EnumInput.cs
+87 −0 OpenTabletDriver.External.Avalonia/TemplatedControls/RangedInput.cs
+32 −0 OpenTabletDriver.External.Avalonia/TemplatedControls/StringInput.cs
+28 −0 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/BooleanInput.axaml
+4 −0 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/Default.axaml
+3 −2 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/DoubleInput.axaml
+30 −0 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/EnumInput.axaml
+40 −0 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/RangedInput.axaml
+27 −0 OpenTabletDriver.External.Avalonia/Themes/Default/Controls/StringInput.axaml
+8 −14 OpenTabletDriver.External.Avalonia/ViewModels/AdvancedBindingEditorDialogViewModel.cs
+20 −7 OpenTabletDriver.External.Avalonia/ViewModels/BindingDisplayViewModel.cs
+7 −6 OpenTabletDriver.External.Avalonia/ViewModels/BindingEditorViewModel.cs
+44 −0 OpenTabletDriver.External.Avalonia/ViewModels/PluginSettingStoreEditorViewModel.cs
+15 −0 OpenTabletDriver.External.Avalonia/ViewModels/PropertyViewModel.cs
+4 −0 OpenTabletDriver.External.Common/Contracts/IPluginDaemon.cs
+13 −0 OpenTabletDriver.External.Common/Enums/AttributeModifierType.cs
+12 −0 OpenTabletDriver.External.Common/Enums/PluginType.cs
+13 −0 OpenTabletDriver.External.Common/Extensions/CollectionExtensions.cs
+8 −2 OpenTabletDriver.External.Common/RPC/RPCClient.cs
+6 −7 OpenTabletDriver.External.Common/RPC/RPCServer.cs
+28 −0 OpenTabletDriver.External.Common/Serializables/Properties/SerializableProperty.cs
+23 −0 OpenTabletDriver.External.Common/Serializables/Properties/SerializableSliderProperty.cs
+22 −0 OpenTabletDriver.External.Common/Serializables/Properties/SerializableValidatedProperty.cs
+14 −0 OpenTabletDriver.External.Common/Serializables/SerializableAttributeModifier.cs
+60 −4 OpenTabletDriver.External.Common/Serializables/SerializablePlugin.cs
+57 −2 OpenTabletDriver.External.Common/Serializables/SerializablePluginSetting.cs
+133 −0 OpenTabletDriver.External.Common/Serializables/SerializablePluginSettingsStore.cs
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "coreclr",
"request": "attach",
"requireExactSource": false,
"enableStepFiltering": false,
"processName": "OpenTabletDriver.Daemon.exe",
"logging": {
"moduleLoad": false
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<NoWarn>$(NoWarn); NETSDK1138</NoWarn>
<NuGetAuditLevel>critical</NuGetAuditLevel>
<AvaloniaVersion>11.0.10</AvaloniaVersion>
<AvaloniaVersion>11.3.0</AvaloniaVersion>
</PropertyGroup>

<!-- Only Embed debug symbols for the Release configuration -->
Expand Down
18 changes: 17 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,32 @@

~~Add a `OnExternalGestureCompleted` event to `IGestures` with as parameter an GestureCompletedEventArgs that contains the gesture type and the gesture data.~~

## High Priority Tasks

- Rewrite gestures to properly handle areas.
- Draw used areas in the Gesture Setup View
- Indicate when new gesture area overlap with an existing gesture area.
- A gesture is invalidated depending on gesture type or finger count.

## Medium Priority Tasks

### Bindings Rework

- [ ] Wrap different versions of Binding under a single generic interface, with a `Press()` and `Release()` method.
- [x] Wrap different versions of Binding under a single generic interface, with a `Press()` and `Release()` method.

### Debugger

- [ ] Implement an In-app gesture debugger, draw the inputs as well as state changes when they happen. (Simillar to osu!lazer's replay analyzer or Rewind)

### Support for multiple Plugin Properties

- [x] Implement having multiple settings per binding as done in OpenTabletDriver
(will make it easier to convert settings to serializable form, ~~because i won't have to check which property is the validated property~~ will still have to do so when serializing)
~~(This will be harder to handle on the UX side as i now need to create a viewmodel & control for each setting, depending on the plugin)~~
Handled in OpenTabletDriver.External/property-serialization

## Low Priority Tasks

## Documentation

### Dev Documentation (Github Wiki)
Expand Down
58 changes: 58 additions & 0 deletions Touch-Gestures-0.6.x/Bindings/BulletproofBinding.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Reflection;
using OpenTabletDriver.Desktop.Reflection;
using OpenTabletDriver.Plugin;
using OpenTabletDriver.Plugin.Tablet;
using Newtonsoft.Json;
using OpenTabletDriver.External.Common.Serializables;
using TouchGestures.Lib.Bindings;
using System.Collections.Generic;
using TouchGestures.Lib.Extensions.Reflection;

namespace TouchGestures.Bindings
{
public class BulletproofBinding : Binding
{
public BulletproofBinding() { }

public BulletproofBinding(SerializablePluginSettingsStore? store, TabletReference? tablet = null, IServiceManager? provider = null)
: base(store, null!)
{
Tablet = tablet;
Provider = provider;
}

public IServiceManager? Provider { get; set; }
public TabletReference? Tablet { get; set; }

[JsonProperty]
public PluginSettingStore? Store { get; set; }

public IBinding? Binding { get; protected set; }

public override void Construct() => Binding = Store?.Construct<IBinding>(Provider, Tablet);

public override void Press(IDeviceReport report)
{
if (Binding is IStateBinding stateBinding)
stateBinding.Press(Tablet, report);
}

public override void Release(IDeviceReport report)
{
if (Binding is IStateBinding stateBinding)
stateBinding.Release(Tablet, report);
}

public override SerializablePluginSettingsStore? ToSerializable(Dictionary<int, TypeInfo> identifierToPlugin)
{
return Store?.ToSerializable();
}

public override void FromSerializable(SerializablePluginSettingsStore? store, Dictionary<int, TypeInfo> identifierToPlugin)
{
Store = store?.FromSerializable();
}

public override string ToString() => Binding?.ToString() ?? string.Empty;
}
}
58 changes: 58 additions & 0 deletions Touch-Gestures-0.6.x/Bindings/BulletproofThresholdBinding.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Reflection;
using OpenTabletDriver.Desktop.Reflection;
using OpenTabletDriver.Plugin;
using OpenTabletDriver.Plugin.Tablet;
using Newtonsoft.Json;
using OpenTabletDriver.External.Common.Serializables;
using TouchGestures.Lib.Bindings;
using System.Collections.Generic;
using TouchGestures.Extensions;
using TouchGestures.Lib.Extensions.Reflection;

namespace TouchGestures.Bindings
{
public class BulletproofThresholdBinding : ThresholdBinding
{
public BulletproofThresholdBinding() { }

public BulletproofThresholdBinding(float activationThreshold, SerializablePluginSettingsStore store,
Dictionary<int, TypeInfo> identifierToPlugin, TabletReference? tablet = null, IServiceManager? provider = null)
: base(activationThreshold, store, identifierToPlugin)
{
Tablet = tablet;
Provider = provider;
}

public IServiceManager? Provider { get; set; }
public TabletReference? Tablet { get; set; }

[JsonProperty]
public PluginSettingStore? Store { get; set; }

public IBinding? Binding { get; protected set; }

public override void Construct() => Binding = Store?.Construct<IBinding>(Provider, Tablet);

public override void Press(IDeviceReport report)
{
if (Binding is IStateBinding stateBinding)
stateBinding.Press(Tablet, report);
}

public override void Release(IDeviceReport report)
{
if (Binding is IStateBinding stateBinding)
stateBinding.Release(Tablet, report);
}

public override SerializablePluginSettingsStore? ToSerializable(Dictionary<int, TypeInfo> identifierToPlugin)
{
return Store?.ToSerializable();
}

public override void FromSerializable(SerializablePluginSettingsStore? store, Dictionary<int, TypeInfo> identifierToPlugin)
{
Store = store?.FromSerializable();
}
}
}
27 changes: 27 additions & 0 deletions Touch-Gestures-0.6.x/Converters/Json/GestureProfileConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using TouchGestures.Lib.Entities;

namespace TouchGestures.Converters
{
public class GestureProfileConverter : JsonConverter<GestureProfile>
{
public override bool CanWrite => false;

public override GestureProfile? ReadJson(JsonReader reader, Type objectType, GestureProfile? existingValue, bool hasExistingValue, JsonSerializer serializer)
{
var value = JObject.Load(reader);

if (value == null)
return null!;

BulletproofGestureProfile profile = new();
serializer.Populate(value.CreateReader(), profile);
return profile;
}

public override void WriteJson(JsonWriter writer, GestureProfile? value, JsonSerializer serializer)
=> throw new NotImplementedException();
}
}
32 changes: 10 additions & 22 deletions Touch-Gestures-0.6.x/Entities/BulletproofBindableProfile.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
using OpenTabletDriver.Plugin;
using TouchGestures.Bindings;
using TouchGestures.Entities;
using TouchGestures.Extensions;
using TouchGestures.Lib.Entities.Tablet;

namespace TouchGestures.Lib.Entities
{
public class BulletproofBindableProfile : BindableProfile
public class BulletproofGestureProfile : GestureProfile
{
public override void ConstructBindings(SharedTabletReference? tablet = null)
public override void ConstructBindings(SharedTabletReference tablet)
{
if (tablet is not BulletproofSharedTabletReference bTablet)
return;
if (tablet is not BulletproofSharedTabletReference btablet) return;

foreach (var gesture in TapGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);

foreach (var gesture in SwipeGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);

foreach (var gesture in HoldGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);

foreach (var gesture in PanGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);

foreach (var gesture in PinchGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);

foreach (var gesture in RotateGestures)
gesture.Binding = gesture.Store?.Construct<IBinding>(bTablet?.ServiceProvider);
foreach (var gesture in this)
{
gesture.Binding = new BulletproofBinding(gesture.Store, btablet.ToState(), btablet.ServiceProvider);
gesture.Binding?.Construct();
}
}
}
}
24 changes: 0 additions & 24 deletions Touch-Gestures-0.6.x/Entities/BulletproofBindingBuilder.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Numerics;
using Newtonsoft.Json;
using OpenTabletDriver.Desktop.Reflection;
using TouchGestures.Lib.Entities.Tablet;

Expand All @@ -12,14 +10,14 @@ public BulletproofSharedTabletReference() : base()
ServiceProvider = new ServiceManager();
}

public BulletproofSharedTabletReference(string name, SharedTabletDigitizer digitizer,
public BulletproofSharedTabletReference(string name, SharedTabletDigitizer digitizer,
SharedTabletDigitizer touchDigitizer, IServiceManager serviceProvider)
: base(name, digitizer, touchDigitizer)
{
ServiceProvider = serviceProvider;
}

public BulletproofSharedTabletReference(string name, SharedTabletDigitizer digitizer,
public BulletproofSharedTabletReference(string name, SharedTabletDigitizer digitizer,
SharedTabletDigitizer touchDigitizer, SharedDeviceIdentifier deviceIdentifier,
IServiceManager serviceProvider)
: base(name, digitizer, touchDigitizer, deviceIdentifier)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Reflection;
using OpenTabletDriver.External.Common.Serializables.Properties;

namespace TouchGestures.Extensions.Reflection
{
public static class PropertyInfoExtensions
{
public static SerializableProperty ToSerializable(this PropertyInfo property) => SerializablePropertyExtension.SerializableFrom(property);
}
}
Loading
Loading