[gpointing-device-settings] add gpds_xinput_ui_get_xinput_float_property.



commit d6cba5b7d8eae343cab865941f3addb86d3325dc
Author: Hiroyuki Ikezoe <poincare ikezoe net>
Date:   Thu Jan 14 19:21:25 2010 +0900

    add gpds_xinput_ui_get_xinput_float_property.

 src/gpds-xinput-ui.c |   27 +++++++++++++++++++++++++++
 src/gpds-xinput-ui.h |    5 +++++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/src/gpds-xinput-ui.c b/src/gpds-xinput-ui.c
index 5227ff2..7abd86c 100644
--- a/src/gpds-xinput-ui.c
+++ b/src/gpds-xinput-ui.c
@@ -152,6 +152,33 @@ gpds_xinput_ui_get_xinput_int_property (GpdsXInputUI *ui,
     return TRUE;
 }
 
+gboolean
+gpds_xinput_ui_get_xinput_float_property (GpdsXInputUI *ui,
+                                          gint property,
+                                          gdouble **values,
+                                          gulong *n_values)
+{
+    GError *error = NULL;
+    GpdsXInputUIPriv *priv;
+
+    g_return_val_if_fail(GPDS_IS_XINPUT_UI(ui), FALSE);
+
+    priv = GPDS_XINPUT_UI_GET_PRIVATE(ui);
+    g_return_val_if_fail(priv->xinput, FALSE);
+
+    if (!gpds_xinput_get_float_properties(priv->xinput,
+                                          property,
+                                          &error,
+                                          values, n_values)) {
+        if (error) {
+            show_error(error);
+            g_error_free(error);
+        }
+        return FALSE;
+    }
+    return TRUE;
+}
+
 void
 gpds_xinput_ui_set_xinput_property_from_toggle_button_state (GpdsXInputUI *ui,
                                                              gint property,
diff --git a/src/gpds-xinput-ui.h b/src/gpds-xinput-ui.h
index 11e77a2..61f6edc 100644
--- a/src/gpds-xinput-ui.h
+++ b/src/gpds-xinput-ui.h
@@ -56,6 +56,11 @@ gboolean    gpds_xinput_ui_get_xinput_int_property
                                              gint property,
                                              gint **values,
                                              gulong *n_values);
+gboolean    gpds_xinput_ui_get_xinput_float_property
+                                            (GpdsXInputUI *ui,
+                                             gint property,
+                                             gdouble **values,
+                                             gulong *n_values);
 void        gpds_xinput_ui_set_xinput_property_from_toggle_button_state
                                             (GpdsXInputUI *ui,
                                              gint property,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]