summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Tyrychtr <lukastyrychtr@gmail.com>2022-09-15 18:09:53 +0200
committerLukáš Tyrychtr <lukastyrychtr@gmail.com>2022-09-29 09:36:08 +0200
commit006b473c0cff1a91396a0ce42150c4ec15af2bab (patch)
tree676f7cbcb7ab85a24583a1040c4cb6b43cf5f693
parent5e1af6d7d58a5edb18951022f58253e4ec5e4003 (diff)
downloadgtk+-006b473c0cff1a91396a0ce42150c4ec15af2bab.tar.gz
Improve documentation
-rw-r--r--gtk/gtkaccessiblerange.c4
-rw-r--r--gtk/gtkaccessiblerange.h17
2 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkaccessiblerange.c b/gtk/gtkaccessiblerange.c
index 363e954515..7593012cf2 100644
--- a/gtk/gtkaccessiblerange.c
+++ b/gtk/gtkaccessiblerange.c
@@ -32,6 +32,10 @@
* In addition to this interface, its implementors are expected to provide the
* correct values for the following properties: %GTK_ACCESSIBLE_PROPERTY_VALUE_MAX,
* %GTK_ACCESSIBLE_PROPERTY_VALUE_MIN and %GTK_ACCESSIBLE_PROPERTY_VALUE_NOW.
+ *
+ * For controls where a minimum increment makes no sense and which do not allow
+ * setting the current value from the user, the default implementation of this
+ * interface suffices.
*/
#include "config.h"
diff --git a/gtk/gtkaccessiblerange.h b/gtk/gtkaccessiblerange.h
index 45ffefc257..55da3d688c 100644
--- a/gtk/gtkaccessiblerange.h
+++ b/gtk/gtkaccessiblerange.h
@@ -37,7 +37,24 @@ struct _GtkAccessibleRangeInterface
{
GTypeInterface g_iface;
+ /**
+ * GtkAccessibleRangeInterface::get_minimum_increment:
+ * @self: a `GtkAccessibleRange`
+ *
+ * Returns the minimum increment for this `GtkAccessibleRange`.
+ * The default implementation returns 0.0, which indicates that a minimum
+ * increment does not make sense for this implementation.
+ * @returns: the minimum increment
+ */
double (* get_minimum_increment) (GtkAccessibleRange *self);
+ /**
+ * GtkAccessibleRangeInterface::set_current_value:
+ * @self: a `GtkAccessibleRange`
+ * @value: the value to set
+ *
+ * Sets the current value of @self to @value.
+ * This operation should behave similarly as if the user performed the action.
+ */
void (* set_current_value) (GtkAccessibleRange *self, double value);
};