summaryrefslogtreecommitdiff
path: root/wrapper/wrapper.hpp
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-08-31 19:41:21 -0400
committera1xd <[email protected]>2020-08-31 19:41:21 -0400
commit9010cc593af419dd824dba0ade6a2022aea6143f (patch)
tree90a82ee14dbb112621657efbd2523ed35f59d154 /wrapper/wrapper.hpp
parentclean up wrapper, minimize heap alloc (diff)
downloadrawaccel-9010cc593af419dd824dba0ade6a2022aea6143f.tar.xz
rawaccel-9010cc593af419dd824dba0ade6a2022aea6143f.zip
add independent xy accel to driver
other changes: modifier_args type name is now settings, which is now the type passed in driver ioctl remove most settings/args verification from driver, plan to let gui handle most of it add another accel arg, rate, which is used to set the 'accel' parameter of types which call exp (nat/sig), might want to cap it add (update) serializable DriverSettings (ModifierArgs) class to gui and static methods for interop remove properties from ManagedAccel, its now just a black box for accessing modifier methods add exception handling in wrapper_io to throw proper managed types change SettingsManager::Startup to make a new settings file if an error occurs during deserialization change structure of accel types; how offset and weight are applied now depend on additivity of types remove tagged_union and add a handrolled variant/visit impl AccelGui::UpdateActiveValueLabels currently broken for caps and a few other args remove gui default layout and initial natural accel setup cli not updated
Diffstat (limited to 'wrapper/wrapper.hpp')
-rw-r--r--wrapper/wrapper.hpp74
1 files changed, 0 insertions, 74 deletions
diff --git a/wrapper/wrapper.hpp b/wrapper/wrapper.hpp
deleted file mode 100644
index 45647e8..0000000
--- a/wrapper/wrapper.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-#pragma once
-
-#include "wrapper_io.hpp"
-
-using namespace System;
-
-public ref class ManagedAccel
-{
- mouse_modifier* const modifier_instance;
-
-public:
-
- ManagedAccel(System::IntPtr args) :
- modifier_instance(new mouse_modifier(*reinterpret_cast<modifier_args*>(args.ToPointer())))
- {}
-
- // Empty constructor needed for serialization
- ManagedAccel() : modifier_instance(nullptr) {}
-
- virtual ~ManagedAccel()
- {
- if (modifier_instance != nullptr)
- {
- delete modifier_instance;
- }
- }
-
- !ManagedAccel()
- {
- if (modifier_instance != nullptr)
- {
- delete modifier_instance;
- }
- }
-
- // Duplicate all relevant rawaccel struct members here for access and display in GUI
- property double SensitivityX { double get(); }
- property double SensitivityY { double get(); }
- property double Rotation { double get(); }
- property int Type { int get(); }
- property double Acceleration { double get(); }
- property bool GainCapEnabled { bool get(); }
- property double CapX { double get(); }
- property double CapY { double get(); }
- property double GainCap { double get(); }
- property double WeightX { double get(); }
- property double WeightY { double get(); }
- property double Offset { double get(); }
- property double LimitExp { double get(); }
- property double Midpoint { double get(); }
- property double MinimumTime { double get(); }
- property double PowerScale { double get(); }
-
- Tuple<double, double>^ Accelerate(int x, int y, double time);
-
- void UpdateAccel(
- int mode,
- double rotation,
- double sensitivityX,
- double sensitivityY,
- double weightX,
- double weightY,
- double capX,
- double capY,
- double offset,
- double accel,
- double lim_exp,
- double midpoint,
- double gain_cap);
-
- void WriteToDriver();
-
- void ReadFromDriver();
-}; \ No newline at end of file