aboutsummaryrefslogtreecommitdiff
path: root/include/ansel/UserControls.h
diff options
context:
space:
mode:
authorDmitry Duka <[email protected]>2017-10-31 14:34:10 +0300
committerDmitry Duka <[email protected]>2017-10-31 14:34:10 +0300
commit4bc8034acac37e8493a5d166d9573543da149f94 (patch)
tree41059b185be6a1d65b13cc2240055fee26a17205 /include/ansel/UserControls.h
parentUpdating Ansel SDK to the latest revision (diff)
downloadanselsdk-4bc8034acac37e8493a5d166d9573543da149f94.tar.xz
anselsdk-4bc8034acac37e8493a5d166d9573543da149f94.zip
Updating Ansel SDK to v1.5v1.5.371
Diffstat (limited to 'include/ansel/UserControls.h')
-rw-r--r--include/ansel/UserControls.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/ansel/UserControls.h b/include/ansel/UserControls.h
index a19f0d5..daca6d3 100644
--- a/include/ansel/UserControls.h
+++ b/include/ansel/UserControls.h
@@ -64,9 +64,23 @@ namespace ansel
//
struct UserControlInfo
{
+ // Any ID user wants
uint32_t userControlId;
+ // A type of the user control (slider, boolean)
UserControlType userControlType;
+ // A value - boolean or float, depending on the control type
+ // Needs to be casted to the apropriate type and dereferenced
const void* value;
+ // User defined pointer which is then passed to all the callbacks (nullptr by default)
+ void* userPointer;
+
+ UserControlInfo()
+ {
+ userControlId = 0;
+ userControlType = UserControlType::kUserControlBoolean;
+ value = nullptr;
+ userPointer = nullptr;
+ }
};
typedef void(*UserControlCallback)(const UserControlInfo& info);
@@ -81,6 +95,12 @@ namespace ansel
const char* labelUtf8;
UserControlCallback callback;
UserControlInfo info;
+
+ UserControlDesc()
+ {
+ labelUtf8 = nullptr;
+ callback = nullptr;
+ }
};
// This function adds a user control defined with the UserControlDesc object