aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/ServoApp/ServoControl/Servo.h
diff options
context:
space:
mode:
authorPaul Rouget <me@paulrouget.com>2020-06-05 14:03:49 +0200
committerPaul Rouget <me@paulrouget.com>2020-06-10 09:38:14 +0200
commitdd2ebce57ef8e5846bc887b767cb32a6fa6d5733 (patch)
tree7abe2d30971b0ac868858bf055f4699f4261ed1c /support/hololens/ServoApp/ServoControl/Servo.h
parent479afcfb8e9882f7b0c6e3b99d148654ea39e576 (diff)
downloadservo-dd2ebce57ef8e5846bc887b767cb32a6fa6d5733.tar.gz
servo-dd2ebce57ef8e5846bc887b767cb32a6fa6d5733.zip
UWP: Preference panel
Diffstat (limited to 'support/hololens/ServoApp/ServoControl/Servo.h')
-rw-r--r--support/hololens/ServoApp/ServoControl/Servo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/support/hololens/ServoApp/ServoControl/Servo.h b/support/hololens/ServoApp/ServoControl/Servo.h
index a61adf81f49..c3d1c9cca3d 100644
--- a/support/hololens/ServoApp/ServoControl/Servo.h
+++ b/support/hololens/ServoApp/ServoControl/Servo.h
@@ -29,12 +29,23 @@ public:
~Servo();
ServoDelegate &Delegate() { return mDelegate; }
+ typedef std::tuple<hstring, winrt::Windows::Foundation::IInspectable, bool>
+ PrefTuple;
+ static std::vector<PrefTuple> GetPrefs();
+ static PrefTuple GetPref(hstring key);
+ static PrefTuple SetBoolPref(hstring key, bool val);
+ static PrefTuple SetStringPref(hstring key, hstring val);
+ static PrefTuple SetIntPref(hstring key, int64_t val);
+ static PrefTuple SetFloatPref(hstring key, double val);
+ static PrefTuple ResetPref(hstring key);
+
typedef capi::CMouseButton MouseButton;
typedef capi::CPromptResult PromptResult;
typedef capi::CContextMenuResult ContextMenuResult;
typedef capi::CMediaSessionActionType MediaSessionActionType;
typedef capi::CMediaSessionPlaybackState MediaSessionPlaybackState;
typedef capi::CDevtoolsServerState DevtoolsServerState;
+ typedef capi::CPrefType CPrefType;
void PerformUpdates() { capi::perform_updates(); }
void DeInit() { capi::deinit(); }
@@ -85,6 +96,8 @@ private:
ServoDelegate &mDelegate;
GLsizei mWindowWidth;
GLsizei mWindowHeight;
+ static void SaveUserPref(PrefTuple);
+ static PrefTuple WrapPref(capi::CPref cpref);
};
class ServoDelegate {