]> diplodocus.org Git - xorg-xinput/commitdiff
Clean up xinput.h a bit.
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 26 Feb 2009 05:53:24 +0000 (15:53 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sat, 21 Mar 2009 12:05:32 +0000 (22:05 +1000)
All functions have to look the same anyway, so might as well use a one-line
macro to declare them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/xinput.h

index 3c36497..4e0f345 100644 (file)
 
 XDeviceInfo*
 find_device_info(
 
 XDeviceInfo*
 find_device_info(
-#if NeedFunctionPrototypes
                 Display        *display,
                 char           *name,
                 Bool           only_extended
                 Display        *display,
                 char           *name,
                 Bool           only_extended
-#endif
                 );
                 );
-int
-get_feedbacks(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_ptr_feedback(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-get_button_map(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_button_map(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_pointer(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_mode(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-list(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-test(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-version(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_integer_feedback(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-query_state(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
 
 
-int
-create_master(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-remove_master(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-change_attachment(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-float_device(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_clientpointer(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-list_props(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-
-int
-set_int_prop(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_float_prop(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-set_atom_prop(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-watch_props(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
-
-int
-delete_prop(
-#if NeedFunctionPrototypes
-                Display*       display,
-                int            argc,
-                char           *argv[],
-                char           *prog_name,
-                char           *prog_desc
-#endif
-);
 
 
+#define DECLARE(name) \
+    int (name) ( \
+                Display*       display, \
+                int            argc, \
+                char           *argv[], \
+                char           *prog_name, \
+                char           *prog_desc \
+)
+
+DECLARE(get_feedbacks);
+DECLARE(set_ptr_feedback);
+DECLARE(get_button_map);
+DECLARE(set_button_map);
+DECLARE(set_pointer);
+DECLARE(set_mode);
+DECLARE(list);
+DECLARE(test);
+DECLARE(version);
+DECLARE(set_integer_feedback);
+DECLARE(query_state);
+DECLARE(create_master);
+DECLARE(remove_master);
+DECLARE(change_attachment);
+DECLARE(float_device);
+DECLARE(set_clientpointer);
+DECLARE(list_props);
+DECLARE(set_int_prop);
+DECLARE(set_float_prop);
+DECLARE(set_atom_prop);
+DECLARE(watch_props);
+DECLARE(delete_prop);
 /* end of xinput.h */
 /* end of xinput.h */