summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Cutts <hcutts@chromium.org>2023-01-10 16:00:16 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-13 13:42:49 +0000
commit372345be50642ec4dfc25a77f3cb84fe6ea6bb19 (patch)
treea713387603105ba1f6761754e47e11923e28c522
parentc37522a3d43349b7f5c7f63c40fbf3e0c3a94bca (diff)
downloadlibchrome-gestures-372345be50642ec4dfc25a77f3cb84fe6ea6bb19.tar.gz
docs: Clarify situation with read-only properties
Though the comments in gestures.h talk about read-only properties where loc is null, these are actually only used by Chromium creating its own properties. Clarify that other clients don't need to support them. BUG=b:251196347 TEST=none Change-Id: Ie3c8125cc7de4a8b31db7661e9180f9defdd3024 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/4151716 Reviewed-by: Sean O'Brien <seobrien@chromium.org> Commit-Queue: Harry Cutts <hcutts@chromium.org> Tested-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--docs/gesture_properties.md9
-rw-r--r--include/gestures.h6
2 files changed, 10 insertions, 5 deletions
diff --git a/docs/gesture_properties.md b/docs/gesture_properties.md
index 813601c..28eda53 100644
--- a/docs/gesture_properties.md
+++ b/docs/gesture_properties.md
@@ -18,9 +18,12 @@ such as "Scroll Accel Curve", "Mouse Reverse Scrolling", or "Palm Pressure".
Each property has a type (integer, double, boolean, or string), and a size,
which is the number of values of that type that it stores. (For strings, the
-size is always 1.) Some properties are read-only, which normally means that
-modifying them wouldn't make sense (for example, the "Device Vendor ID"
-property, which reflects a hardware ID).
+size is always 1.)
+
+Chromium creates some read-only properties, which normally means that modifying
+them wouldn't make sense (for example, the "Device Vendor ID" property, which
+reflects a hardware ID). However, the Gestures library itself does not do this,
+so other clients don't need to support them.
## Changing properties without recompiling
diff --git a/include/gestures.h b/include/gestures.h
index 31e6f57..51317c2 100644
--- a/include/gestures.h
+++ b/include/gestures.h
@@ -540,8 +540,10 @@ typedef unsigned char GesturesPropBool;
// These functions create a named property of given type.
// data - data used by PropProvider
-// loc - location of a variable to be updated by PropProvider.
-// Set to NULL to create a ReadOnly property
+// loc - location of a variable to be updated by PropProvider
+// (Chromium calls its own GesturesPropCreate... functions with loc set
+// to null to create read-only properties, but the Gestures library
+// itself doesn't, so other clients don't need to support them.)
// init - initial value for the property.
// If the PropProvider has an alternate configuration source, it may
// override this initial value, in which case *loc returns the