gpointing-device-settings r131 - in trunk: src test
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r131 - in trunk: src test
- Date: Fri, 6 Mar 2009 14:47:48 +0000 (UTC)
Author: hiikezoe
Date: Fri Mar 6 14:47:48 2009
New Revision: 131
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=131&view=rev
Log:
add gpds_xinput_get_device_name().
Modified:
trunk/src/gpds-xinput.c
trunk/src/gpds-xinput.h
trunk/test/test-xinput.c
Modified: trunk/src/gpds-xinput.c
==============================================================================
--- trunk/src/gpds-xinput.c (original)
+++ trunk/src/gpds-xinput.c Fri Mar 6 14:47:48 2009
@@ -164,6 +164,14 @@
NULL);
}
+const gchar *
+gpds_xinput_get_device_name (GpdsXInput *xinput)
+{
+ g_return_val_if_fail(GPDS_IS_XINPUT(xinput), NULL);
+
+ return GPDS_XINPUT_GET_PRIVATE(xinput)->device_name;
+}
+
static XDevice *
get_device (GpdsXInput *xinput, GError **error)
{
Modified: trunk/src/gpds-xinput.h
==============================================================================
--- trunk/src/gpds-xinput.h (original)
+++ trunk/src/gpds-xinput.h Fri Mar 6 14:47:48 2009
@@ -53,31 +53,32 @@
GObjectClass parent_class;
};
-GQuark gpds_xinput_error_quark (void);
-GType gpds_xinput_get_type (void) G_GNUC_CONST;
+GQuark gpds_xinput_error_quark (void);
+GType gpds_xinput_get_type (void) G_GNUC_CONST;
-GpdsXInput *gpds_xinput_new (const gchar *device_name);
-gboolean gpds_xinput_set_int_properties (GpdsXInput *xinput,
- const gchar *property_name,
- gint format_type,
- GError **error,
- gint *properties,
- guint n_properties);
-gboolean gpds_xinput_get_int_properties (GpdsXInput *xinput,
- const gchar *property_name,
- GError **error,
- gint **values,
- gulong *n_values);
-gboolean gpds_xinput_set_float_properties (GpdsXInput *xinput,
- const gchar *property_name,
- GError **error,
- gdouble *properties,
- guint n_properties);
-gboolean gpds_xinput_get_float_properties (GpdsXInput *xinput,
- const gchar *property_name,
- GError **error,
- gdouble **properties,
- gulong *n_properties);
+GpdsXInput *gpds_xinput_new (const gchar *device_name);
+const gchar *gpds_xinput_get_device_name (GpdsXInput *xinput);
+gboolean gpds_xinput_set_int_properties (GpdsXInput *xinput,
+ const gchar *property_name,
+ gint format_type,
+ GError **error,
+ gint *properties,
+ guint n_properties);
+gboolean gpds_xinput_get_int_properties (GpdsXInput *xinput,
+ const gchar *property_name,
+ GError **error,
+ gint **values,
+ gulong *n_values);
+gboolean gpds_xinput_set_float_properties (GpdsXInput *xinput,
+ const gchar *property_name,
+ GError **error,
+ gdouble *properties,
+ guint n_properties);
+gboolean gpds_xinput_get_float_properties (GpdsXInput *xinput,
+ const gchar *property_name,
+ GError **error,
+ gdouble **properties,
+ gulong *n_properties);
G_END_DECLS
Modified: trunk/test/test-xinput.c
==============================================================================
--- trunk/test/test-xinput.c (original)
+++ trunk/test/test-xinput.c Fri Mar 6 14:47:48 2009
@@ -3,6 +3,7 @@
#include <gcutter.h>
void test_new (void);
+void test_device_name (void);
void test_set_int_properties (void);
static GpdsXInput *xinput;
@@ -36,6 +37,15 @@
}
void
+test_device_name (void)
+{
+ cut_trace(test_new());
+
+ cut_assert_equal_string("TPPS/2 IBM TrackPoint",
+ gpds_xinput_get_device_name(xinput));
+}
+
+void
test_set_int_properties (void)
{
cut_trace(test_new());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]