Merge lp:~bregma/geis/packaging-1.0.11 into lp:~oif-team/geis/packaging

Proposed by Stephen M. Webb
Status: Merged
Merged at revision: 84
Proposed branch: lp:~bregma/geis/packaging-1.0.11
Merge into: lp:~oif-team/geis/packaging
Diff against target: 2812 lines (+1641/-391)
24 files modified
ChangeLog (+169/-0)
Makefile.in (+4/-0)
configure (+177/-25)
configure.ac (+6/-1)
debian/changelog (+6/-2)
doc/Makefile.in (+4/-0)
doc/geistest.1 (+23/-5)
geis/Makefile.in (+4/-0)
geis/geis.h (+24/-2)
libutouch-geis-xcb/Makefile.am (+11/-6)
libutouch-geis-xcb/Makefile.in (+44/-16)
libutouch-geis-xcb/geis.c (+16/-5)
libutouch-geis-xcb/geis_debug.h (+0/-27)
libutouch-geis-xcb/geis_instance.c (+44/-24)
libutouch-geis-xcb/geis_instance.h (+7/-11)
libutouch-geis-xcb/geis_instance_table.c (+127/-0)
libutouch-geis-xcb/geis_instance_table.h (+41/-0)
libutouch-geis-xcb/geis_logging.c (+87/-0)
libutouch-geis-xcb/geis_logging.h (+64/-0)
libutouch-geis-xcb/geis_xcb.c (+530/-215)
libutouch-geis-xcb/geis_xcb.h (+25/-17)
testsuite/Makefile.in (+4/-0)
testsuite/geistest/Makefile.in (+4/-0)
testsuite/geistest/geistest.c (+220/-35)
To merge this branch: bzr merge lp:~bregma/geis/packaging-1.0.11
Reviewer Review Type Date Requested Status
Henrik Rydberg (community) Approve
Review via email: mp+35685@code.launchpad.net

Commit message

Packging utouch-geis release 1.0.11

Description of the change

Packages utouch-geis 1.0.11 for Ubuntu

This merge request supersedes the previous similar merge requires because a step was missed during upstream source merging.

To post a comment you must log in.
Revision history for this message
Henrik Rydberg (rydberg) wrote :

Look ok now. :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2010-08-23 14:34:23 +0000
+++ ChangeLog 2010-09-16 16:28:52 +0000
@@ -1,3 +1,172 @@
12010-09-14 Stephen M. Webb <stephen.webb@canonical.com>
2
3 Version bump tp 1.0.11
4
5 * configure.ac: bumped package version to 1.0.11
6 * libutouch-geis-xcb/Makefile.am: bumped shlib version to reflect changes
7
82010-09-01 Stephen M. Webb <stephen.webb@canonical.com>
9
10 Fixed typos in manpage.
11
12 * doc/geistest.1: fixed several typographical errors
13
142010-09-01 Stephen M. Webb <stephen.webb@canonical.com>
15
16 Fixed a memory leak when logging messages.
17
18 * libutouch-geis-xcb/geis_logging.c (_geis_message): fixed memory leak
19
202010-08-31 Stephen M. Webb <stephen.webb@canonical.com>
21
22 Fixed prefix string used in diagnostics.
23
24 * libutouch-geis-xcb/geis_logging.c (_geis_message): fixed which prefix string
25 gets used for which diagnostic level
26
272010-08-31 Stephen M. Webb <stephen.webb@canonical.com>
28
29 Removed input device enumeration handling until later.
30
31 * libutouch-geis-xcb/geis.c (geis_input_devices): removed #if 0 block
32 * libutouch-geis-xcb/geis_instance.h (geis_instance_input_devices): removed
33 * libutouch-geis-xcb/geis_instance.c (geis_instance_input_devices): removed
34 * libutouch-geis-xcb/geis_xcb.h (geis_xcb_input_devices): added funcs and
35 cookie parameters
36 * libutouch-geis-xcb/geis_xcb.c (_GeisXcb): added input_funcs and input_cookie
37 (geis_xcb_new): removed #if 0 blocks
38 (geis_xcb_input_devices): removed XInput handling until later
39
402010-08-30 Stephen M. Webb <stephen.webb@canonical.com>
41
42 Removed some debug code and fixed pasto.
43
44 * libutouch-geis-xcb/geis_instance.c: fixed a pasto
45 * testsuite/geistest/geistest.c: removed debug code
46
472010-08-30 Stephen M. Webb <stephen.webb@canonical.com>
48
49 Fixed so multiple windows will work.
50
51 Altered geistest to work with a single window or all windows, had to fix geis
52 implementation so this was possible.
53
54 * libutouch-geis-xcb/geis_instance_table.c: new file
55 * libutouch-geis-xcb/geis_instance_table.h: new file
56 * configure.ac: added package checks for x11-xcb and xi
57 * doc/geistest.1: documented new CLI switches
58 * geis/geis.h (geis_input_devices): fixed argument type
59 * libutouch-geis-xcb/Makefile.am (libutouch_geis_la_SOURCES): added new files
60 (libutouch_geis_la_CFLAGS): aded X11XCB_CFLAGS and XI2_CFLAGS
61 (libutouch_geis_la_LIBADD): aded X11XCB_LIBS and XI2LIBS_
62 * libutouch-geis-xcb/geis.c (s_geis_xcb): new static global
63 (geis_init): used it
64 * libutouch-geis-xcb/geis_instance.h (_GeisInstance): added window_id
65 (geis_instance_new): renamed from geis_instance_get
66 (geis_instance_input_devices): new function
67 (geis_instance_subscribe): added GeisXcb parameter
68 (geis_instance_get_window_id): new function
69 (geis_instance_fd): removed function
70 (geis_instance_event_dispatch): removed function
71 * libutouch-geis-xcb/geis_instance.c: implemented new functions
72 * libutouch-geis-xcb/geis_xcb.h (geis_xcb_new): renamed from geis_xcb_get
73 (geis_xcb_create_instance): new function
74 (geis_xcb_input_devices): new function
75 (geis_xcb_subscribe): added GeisInstance parameter
76 (geis_xcb_dispatch): changed parameter type to GeisXcb
77 * libutouch-geis-xcb/geis_xcb.c: Implemeneted new functions
78 * testsuite/geistest/geistest.c (parse_opts): added -w switch
79 (subscribe_window): new function
80 (subscribe_windows_preorder): new function
81 (subscribe_all_windows): new function
82 (main): used the new functions
83
842010-08-30 Stephen M. Webb <stephen.webb@canonical.com>
85
86 Added runtime diagnostic facility.
87
88 * libutouch-geis-xcb/geis_debug.h: replaced with
89 * libutouch-geis-xcb/geis_logging.h: mew file
90 * libutouch-geis-xcb/geis_logging.c: new file
91 * libutouch-geis-xcb/Makefile.am: replaced above files
92 * libutouch-geis-xcb/geis_xcb.c: replaced geis_debug calls with
93 geis_warning or geis_error as appropriate
94
952010-08-27 Stephen M. Webb <stephen.webb@canonical.com>
96
97 Fixed checking of gesture masks for multiple input devices.
98
99 * libutouch-geis-xcb/geis_instance.c (geis_instance_subscribe):
100 added missing index increment
101 * libutouch-geis-xcb/geis_xcb.c (geis_xcb_verify_event_selection):
102 added logic for iterating through multiple input devices
103
1042010-08-27 Stephen M. Webb <stephen.webb@canonical.com>
105
106 Move gesture-type-added callback until later in the subscription sequence.
107
108 * libutouch-geis-xcb/geis_xcb.c (geis_xcb_subscribe): move call to
109 geis_xcb_dispatch_gesture_type until later in sequence
110
1112010-08-27 Stephen M. Webb <stephen.webb@canonical.com>
112
113 Removed "Grab" gestire entirely from the list of known gestures.
114
115 * libutouch-geis-xcb/geis_xcb.c (s_grail_type_map): removed GRAIL_TYPE_SYSFLAG1
116 (geis_xcb_dispatch_gesture_type): removed references to GRAIL_TYPE_SYSFLAG1
117
1182010-08-26 Stephen M. Webb <stephen.webb@canonical.com>
119
120 Prevented "Grab" gesture from being propagated.
121
122 * libutouch-geis-xcb/geis_xcb.c (geis_xcb_dispatch_gesture_type): skipped
123 notification of the availability of the "Grab" gesture type.
124
1252010-08-26 Stephen M. Webb <stephen.webb@canonical.com>
126
127 Fixed an allocation size issue.
128
129 * libutouch-geis-xcb/geis_instance.c (geis_instance_get): fixed allocation
130 size issue
131
1322010-08-26 Stephen M. Webb <stephen.webb@canonical.com>
133
134 Minor style adjustments. Adjusted whitespace for consistency.
135
136 * libutouch-geis-xcb/geis_xcb.c (geis_xcb_verify_event_selection):
137 renamed function from geis_xcb_select_events
138 (geis_xcb_determine_primitive_type): renamed from
139 geis_xcb_determine_fundamental_gesture_type
140 (geis_xcb_get_gesture_type_primitive_name): renamed form
141 geis_xcb_get_gesture_type_fundamental_name
142
1432010-08-25 Stephen M. Webb <stephen.webb@canonical.com>
144
145 Reverted version bump.
146
147 * configure,.ac (AC_INIT): reverted to version 1.0.10
148
1492010-08-23 Stephen M. Webb <stephen.webb@canonical.com>
150
151 Implemented gesture and input device selection.
152
153 * geis/geis.h: new gesture definitions
154 * libutouch-geis-xcb/geis_xcb.h (geis_xcb_subscribe):
155 added device_id parameter
156 * libutouch-geis-xcb/geis_xcb.c (s_grail_type_map): new gesture definitions
157 (geis_xcb_map_gestures_to_mask): new function
158 (geis_xcb_select_events): new function
159 (geis_xcb_subscribe): used them
160 added device_id parameter
161 (geis_xcb_determine_gesture_type): renamed to
162 geis_xcb_determine_fundamental_gesture_type
163 (geis_xcb_get_gesture_type_fundamental_name): new function
164 (geis_xcb_dispatch_gesture_type): mapped public gesture definitions to
165 fundamental gesture types
166 * libutouch-geis-xcb/geis_instance.c (geis_instance_subscribe):
167 handled input_list argument
168 * testsuite/geistest/geistest.c: included an example of selecting gestures
169
12010-08-22 Chase Douglas <chase.douglas@canonical.com>1702010-08-22 Chase Douglas <chase.douglas@canonical.com>
2171
3 Bumped to version 1.0.10 for various fixes172 Bumped to version 1.0.10 for various fixes
4173
=== modified file 'Makefile.in'
--- Makefile.in 2010-08-20 22:03:52 +0000
+++ Makefile.in 2010-09-16 16:28:52 +0000
@@ -205,11 +205,15 @@
205SHELL = @SHELL@205SHELL = @SHELL@
206STRIP = @STRIP@206STRIP = @STRIP@
207VERSION = @VERSION@207VERSION = @VERSION@
208X11XCB_CFLAGS = @X11XCB_CFLAGS@
209X11XCB_LIBS = @X11XCB_LIBS@
208XCBINCLUDEDIR = @XCBINCLUDEDIR@210XCBINCLUDEDIR = @XCBINCLUDEDIR@
209XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@211XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
210XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@212XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
211XCB_CFLAGS = @XCB_CFLAGS@213XCB_CFLAGS = @XCB_CFLAGS@
212XCB_LIBS = @XCB_LIBS@214XCB_LIBS = @XCB_LIBS@
215XI2_CFLAGS = @XI2_CFLAGS@
216XI2_LIBS = @XI2_LIBS@
213abs_builddir = @abs_builddir@217abs_builddir = @abs_builddir@
214abs_srcdir = @abs_srcdir@218abs_srcdir = @abs_srcdir@
215abs_top_builddir = @abs_top_builddir@219abs_top_builddir = @abs_top_builddir@
216220
=== modified file 'configure'
--- configure 2010-08-23 14:54:15 +0000
+++ configure 2010-09-16 16:28:52 +0000
@@ -1,6 +1,6 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for utouch-geis 1.0.10.3# Generated by GNU Autoconf 2.67 for utouch-geis 1.0.11.
4#4#
5# Report bugs to <stephen.webb@canonical.com>.5# Report bugs to <stephen.webb@canonical.com>.
6#6#
@@ -701,8 +701,8 @@
701# Identity of this package.701# Identity of this package.
702PACKAGE_NAME='utouch-geis'702PACKAGE_NAME='utouch-geis'
703PACKAGE_TARNAME='utouch-geis'703PACKAGE_TARNAME='utouch-geis'
704PACKAGE_VERSION='1.0.10'704PACKAGE_VERSION='1.0.11'
705PACKAGE_STRING='utouch-geis 1.0.10'705PACKAGE_STRING='utouch-geis 1.0.11'
706PACKAGE_BUGREPORT='stephen.webb@canonical.com'706PACKAGE_BUGREPORT='stephen.webb@canonical.com'
707PACKAGE_URL='https://launchpad.net/utouch-geis'707PACKAGE_URL='https://launchpad.net/utouch-geis'
708708
@@ -749,6 +749,10 @@
749XCBINCLUDEDIR749XCBINCLUDEDIR
750XCBPROTO_XCBPYTHONDIR750XCBPROTO_XCBPYTHONDIR
751XCBPROTO_XCBINCLUDEDIR751XCBPROTO_XCBINCLUDEDIR
752XI2_LIBS
753XI2_CFLAGS
754X11XCB_LIBS
755X11XCB_CFLAGS
752XCB_LIBS756XCB_LIBS
753XCB_CFLAGS757XCB_CFLAGS
754GRAIL_LIBS758GRAIL_LIBS
@@ -896,7 +900,11 @@
896GRAIL_CFLAGS900GRAIL_CFLAGS
897GRAIL_LIBS901GRAIL_LIBS
898XCB_CFLAGS902XCB_CFLAGS
899XCB_LIBS'903XCB_LIBS
904X11XCB_CFLAGS
905X11XCB_LIBS
906XI2_CFLAGS
907XI2_LIBS'
900908
901909
902# Initialize some variables set by options.910# Initialize some variables set by options.
@@ -1439,7 +1447,7 @@
1439 # Omit some internal or obsolete options to make the list less imposing.1447 # Omit some internal or obsolete options to make the list less imposing.
1440 # This message is too long to be a string in the A/UX 3.1 sh.1448 # This message is too long to be a string in the A/UX 3.1 sh.
1441 cat <<_ACEOF1449 cat <<_ACEOF
1442\`configure' configures utouch-geis 1.0.10 to adapt to many kinds of systems.1450\`configure' configures utouch-geis 1.0.11 to adapt to many kinds of systems.
14431451
1444Usage: $0 [OPTION]... [VAR=VALUE]...1452Usage: $0 [OPTION]... [VAR=VALUE]...
14451453
@@ -1509,7 +1517,7 @@
15091517
1510if test -n "$ac_init_help"; then1518if test -n "$ac_init_help"; then
1511 case $ac_init_help in1519 case $ac_init_help in
1512 short | recursive ) echo "Configuration of utouch-geis 1.0.10:";;1520 short | recursive ) echo "Configuration of utouch-geis 1.0.11:";;
1513 esac1521 esac
1514 cat <<\_ACEOF1522 cat <<\_ACEOF
15151523
@@ -1551,6 +1559,11 @@
1551 GRAIL_LIBS linker flags for GRAIL, overriding pkg-config1559 GRAIL_LIBS linker flags for GRAIL, overriding pkg-config
1552 XCB_CFLAGS C compiler flags for XCB, overriding pkg-config1560 XCB_CFLAGS C compiler flags for XCB, overriding pkg-config
1553 XCB_LIBS linker flags for XCB, overriding pkg-config1561 XCB_LIBS linker flags for XCB, overriding pkg-config
1562 X11XCB_CFLAGS
1563 C compiler flags for X11XCB, overriding pkg-config
1564 X11XCB_LIBS linker flags for X11XCB, overriding pkg-config
1565 XI2_CFLAGS C compiler flags for XI2, overriding pkg-config
1566 XI2_LIBS linker flags for XI2, overriding pkg-config
15541567
1555Use these variables to override the choices made by `configure' or to help1568Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.1569it to find libraries and programs with nonstandard names/locations.
@@ -1619,7 +1632,7 @@
1619test -n "$ac_init_help" && exit $ac_status1632test -n "$ac_init_help" && exit $ac_status
1620if $ac_init_version; then1633if $ac_init_version; then
1621 cat <<\_ACEOF1634 cat <<\_ACEOF
1622utouch-geis configure 1.0.101635utouch-geis configure 1.0.11
1623generated by GNU Autoconf 2.671636generated by GNU Autoconf 2.67
16241637
1625Copyright (C) 2010 Free Software Foundation, Inc.1638Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1897,7 +1910,7 @@
1897This file contains any messages produced by compilers while1910This file contains any messages produced by compilers while
1898running configure, to aid debugging if configure makes a mistake.1911running configure, to aid debugging if configure makes a mistake.
18991912
1900It was created by utouch-geis $as_me 1.0.10, which was1913It was created by utouch-geis $as_me 1.0.11, which was
1901generated by GNU Autoconf 2.67. Invocation command line was1914generated by GNU Autoconf 2.67. Invocation command line was
19021915
1903 $ $0 $@1916 $ $0 $@
@@ -2715,7 +2728,7 @@
27152728
2716# Define the identity of the package.2729# Define the identity of the package.
2717 PACKAGE='utouch-geis'2730 PACKAGE='utouch-geis'
2718 VERSION='1.0.10'2731 VERSION='1.0.11'
27192732
27202733
2721cat >>confdefs.h <<_ACEOF2734cat >>confdefs.h <<_ACEOF
@@ -4770,13 +4783,13 @@
4770else4783else
4771 lt_cv_nm_interface="BSD nm"4784 lt_cv_nm_interface="BSD nm"
4772 echo "int some_variable = 0;" > conftest.$ac_ext4785 echo "int some_variable = 0;" > conftest.$ac_ext
4773 (eval echo "\"\$as_me:4773: $ac_compile\"" >&5)4786 (eval echo "\"\$as_me:4786: $ac_compile\"" >&5)
4774 (eval "$ac_compile" 2>conftest.err)4787 (eval "$ac_compile" 2>conftest.err)
4775 cat conftest.err >&54788 cat conftest.err >&5
4776 (eval echo "\"\$as_me:4776: $NM \\\"conftest.$ac_objext\\\"\"" >&5)4789 (eval echo "\"\$as_me:4789: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4777 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)4790 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4778 cat conftest.err >&54791 cat conftest.err >&5
4779 (eval echo "\"\$as_me:4779: output\"" >&5)4792 (eval echo "\"\$as_me:4792: output\"" >&5)
4780 cat conftest.out >&54793 cat conftest.out >&5
4781 if $GREP 'External.*some_variable' conftest.out > /dev/null; then4794 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4782 lt_cv_nm_interface="MS dumpbin"4795 lt_cv_nm_interface="MS dumpbin"
@@ -5982,7 +5995,7 @@
5982 ;;5995 ;;
5983*-*-irix6*)5996*-*-irix6*)
5984 # Find out which ABI we are using.5997 # Find out which ABI we are using.
5985 echo '#line 5985 "configure"' > conftest.$ac_ext5998 echo '#line 5998 "configure"' > conftest.$ac_ext
5986 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&55999 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5987 (eval $ac_compile) 2>&56000 (eval $ac_compile) 2>&5
5988 ac_status=$?6001 ac_status=$?
@@ -7511,11 +7524,11 @@
7511 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \7524 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7512 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \7525 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7513 -e 's:$: $lt_compiler_flag:'`7526 -e 's:$: $lt_compiler_flag:'`
7514 (eval echo "\"\$as_me:7514: $lt_compile\"" >&5)7527 (eval echo "\"\$as_me:7527: $lt_compile\"" >&5)
7515 (eval "$lt_compile" 2>conftest.err)7528 (eval "$lt_compile" 2>conftest.err)
7516 ac_status=$?7529 ac_status=$?
7517 cat conftest.err >&57530 cat conftest.err >&5
7518 echo "$as_me:7518: \$? = $ac_status" >&57531 echo "$as_me:7531: \$? = $ac_status" >&5
7519 if (exit $ac_status) && test -s "$ac_outfile"; then7532 if (exit $ac_status) && test -s "$ac_outfile"; then
7520 # The compiler can only warn and ignore the option if not recognized7533 # The compiler can only warn and ignore the option if not recognized
7521 # So say no if there are warnings other than the usual output.7534 # So say no if there are warnings other than the usual output.
@@ -7850,11 +7863,11 @@
7850 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \7863 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7851 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \7864 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7852 -e 's:$: $lt_compiler_flag:'`7865 -e 's:$: $lt_compiler_flag:'`
7853 (eval echo "\"\$as_me:7853: $lt_compile\"" >&5)7866 (eval echo "\"\$as_me:7866: $lt_compile\"" >&5)
7854 (eval "$lt_compile" 2>conftest.err)7867 (eval "$lt_compile" 2>conftest.err)
7855 ac_status=$?7868 ac_status=$?
7856 cat conftest.err >&57869 cat conftest.err >&5
7857 echo "$as_me:7857: \$? = $ac_status" >&57870 echo "$as_me:7870: \$? = $ac_status" >&5
7858 if (exit $ac_status) && test -s "$ac_outfile"; then7871 if (exit $ac_status) && test -s "$ac_outfile"; then
7859 # The compiler can only warn and ignore the option if not recognized7872 # The compiler can only warn and ignore the option if not recognized
7860 # So say no if there are warnings other than the usual output.7873 # So say no if there are warnings other than the usual output.
@@ -7955,11 +7968,11 @@
7955 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \7968 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7956 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \7969 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7957 -e 's:$: $lt_compiler_flag:'`7970 -e 's:$: $lt_compiler_flag:'`
7958 (eval echo "\"\$as_me:7958: $lt_compile\"" >&5)7971 (eval echo "\"\$as_me:7971: $lt_compile\"" >&5)
7959 (eval "$lt_compile" 2>out/conftest.err)7972 (eval "$lt_compile" 2>out/conftest.err)
7960 ac_status=$?7973 ac_status=$?
7961 cat out/conftest.err >&57974 cat out/conftest.err >&5
7962 echo "$as_me:7962: \$? = $ac_status" >&57975 echo "$as_me:7975: \$? = $ac_status" >&5
7963 if (exit $ac_status) && test -s out/conftest2.$ac_objext7976 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7964 then7977 then
7965 # The compiler can only warn and ignore the option if not recognized7978 # The compiler can only warn and ignore the option if not recognized
@@ -8010,11 +8023,11 @@
8010 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \8023 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8011 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \8024 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8012 -e 's:$: $lt_compiler_flag:'`8025 -e 's:$: $lt_compiler_flag:'`
8013 (eval echo "\"\$as_me:8013: $lt_compile\"" >&5)8026 (eval echo "\"\$as_me:8026: $lt_compile\"" >&5)
8014 (eval "$lt_compile" 2>out/conftest.err)8027 (eval "$lt_compile" 2>out/conftest.err)
8015 ac_status=$?8028 ac_status=$?
8016 cat out/conftest.err >&58029 cat out/conftest.err >&5
8017 echo "$as_me:8017: \$? = $ac_status" >&58030 echo "$as_me:8030: \$? = $ac_status" >&5
8018 if (exit $ac_status) && test -s out/conftest2.$ac_objext8031 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8019 then8032 then
8020 # The compiler can only warn and ignore the option if not recognized8033 # The compiler can only warn and ignore the option if not recognized
@@ -10394,7 +10407,7 @@
10394 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=210407 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10395 lt_status=$lt_dlunknown10408 lt_status=$lt_dlunknown
10396 cat > conftest.$ac_ext <<_LT_EOF10409 cat > conftest.$ac_ext <<_LT_EOF
10397#line 10397 "configure"10410#line 10410 "configure"
10398#include "confdefs.h"10411#include "confdefs.h"
1039910412
10400#if HAVE_DLFCN_H10413#if HAVE_DLFCN_H
@@ -10490,7 +10503,7 @@
10490 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=210503 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10491 lt_status=$lt_dlunknown10504 lt_status=$lt_dlunknown
10492 cat > conftest.$ac_ext <<_LT_EOF10505 cat > conftest.$ac_ext <<_LT_EOF
10493#line 10493 "configure"10506#line 10506 "configure"
10494#include "confdefs.h"10507#include "confdefs.h"
1049510508
10496#if HAVE_DLFCN_H10509#if HAVE_DLFCN_H
@@ -10978,6 +10991,145 @@
10978$as_echo "yes" >&6; }10991$as_echo "yes" >&6; }
1097910992
10980fi10993fi
10994
10995pkg_failed=no
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11XCB" >&5
10997$as_echo_n "checking for X11XCB... " >&6; }
10998
10999if test -n "$X11XCB_CFLAGS"; then
11000 pkg_cv_X11XCB_CFLAGS="$X11XCB_CFLAGS"
11001 elif test -n "$PKG_CONFIG"; then
11002 if test -n "$PKG_CONFIG" && \
11003 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb >= 1.3.3\""; } >&5
11004 ($PKG_CONFIG --exists --print-errors "x11-xcb >= 1.3.3") 2>&5
11005 ac_status=$?
11006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11007 test $ac_status = 0; }; then
11008 pkg_cv_X11XCB_CFLAGS=`$PKG_CONFIG --cflags "x11-xcb >= 1.3.3" 2>/dev/null`
11009else
11010 pkg_failed=yes
11011fi
11012 else
11013 pkg_failed=untried
11014fi
11015if test -n "$X11XCB_LIBS"; then
11016 pkg_cv_X11XCB_LIBS="$X11XCB_LIBS"
11017 elif test -n "$PKG_CONFIG"; then
11018 if test -n "$PKG_CONFIG" && \
11019 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb >= 1.3.3\""; } >&5
11020 ($PKG_CONFIG --exists --print-errors "x11-xcb >= 1.3.3") 2>&5
11021 ac_status=$?
11022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11023 test $ac_status = 0; }; then
11024 pkg_cv_X11XCB_LIBS=`$PKG_CONFIG --libs "x11-xcb >= 1.3.3" 2>/dev/null`
11025else
11026 pkg_failed=yes
11027fi
11028 else
11029 pkg_failed=untried
11030fi
11031
11032
11033
11034if test $pkg_failed = yes; then
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036$as_echo "no" >&6; }
11037
11038if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11039 _pkg_short_errors_supported=yes
11040else
11041 _pkg_short_errors_supported=no
11042fi
11043 if test $_pkg_short_errors_supported = yes; then
11044 X11XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb >= 1.3.3" 2>&1`
11045 else
11046 X11XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb >= 1.3.3" 2>&1`
11047 fi
11048 # Put the nasty error message in config.log where it belongs
11049 echo "$X11XCB_PKG_ERRORS" >&5
11050
11051 as_fn_error $? "X11-XCB development libraries not found" "$LINENO" 5
11052elif test $pkg_failed = untried; then
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
11055 as_fn_error $? "X11-XCB development libraries not found" "$LINENO" 5
11056else
11057 X11XCB_CFLAGS=$pkg_cv_X11XCB_CFLAGS
11058 X11XCB_LIBS=$pkg_cv_X11XCB_LIBS
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11060$as_echo "yes" >&6; }
11061
11062fi
11063
11064pkg_failed=no
11065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XI2" >&5
11066$as_echo_n "checking for XI2... " >&6; }
11067
11068if test -n "$XI2_CFLAGS"; then
11069 pkg_cv_XI2_CFLAGS="$XI2_CFLAGS"
11070 elif test -n "$PKG_CONFIG"; then
11071 if test -n "$PKG_CONFIG" && \
11072 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi >= 1.3\""; } >&5
11073 ($PKG_CONFIG --exists --print-errors "xi >= 1.3") 2>&5
11074 ac_status=$?
11075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11076 test $ac_status = 0; }; then
11077 pkg_cv_XI2_CFLAGS=`$PKG_CONFIG --cflags "xi >= 1.3" 2>/dev/null`
11078else
11079 pkg_failed=yes
11080fi
11081 else
11082 pkg_failed=untried
11083fi
11084if test -n "$XI2_LIBS"; then
11085 pkg_cv_XI2_LIBS="$XI2_LIBS"
11086 elif test -n "$PKG_CONFIG"; then
11087 if test -n "$PKG_CONFIG" && \
11088 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi >= 1.3\""; } >&5
11089 ($PKG_CONFIG --exists --print-errors "xi >= 1.3") 2>&5
11090 ac_status=$?
11091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11092 test $ac_status = 0; }; then
11093 pkg_cv_XI2_LIBS=`$PKG_CONFIG --libs "xi >= 1.3" 2>/dev/null`
11094else
11095 pkg_failed=yes
11096fi
11097 else
11098 pkg_failed=untried
11099fi
11100
11101
11102
11103if test $pkg_failed = yes; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106
11107if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11108 _pkg_short_errors_supported=yes
11109else
11110 _pkg_short_errors_supported=no
11111fi
11112 if test $_pkg_short_errors_supported = yes; then
11113 XI2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xi >= 1.3" 2>&1`
11114 else
11115 XI2_PKG_ERRORS=`$PKG_CONFIG --print-errors "xi >= 1.3" 2>&1`
11116 fi
11117 # Put the nasty error message in config.log where it belongs
11118 echo "$XI2_PKG_ERRORS" >&5
11119
11120 as_fn_error $? "XI2 development libraries not found" "$LINENO" 5
11121elif test $pkg_failed = untried; then
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
11124 as_fn_error $? "XI2 development libraries not found" "$LINENO" 5
11125else
11126 XI2_CFLAGS=$pkg_cv_XI2_CFLAGS
11127 XI2_LIBS=$pkg_cv_XI2_LIBS
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11129$as_echo "yes" >&6; }
11130
11131fi
11132
10981# XCB code generation configuration11133# XCB code generation configuration
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking XCBPROTO_XCBINCLUDEDIR" >&511134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking XCBPROTO_XCBINCLUDEDIR" >&5
10983$as_echo_n "checking XCBPROTO_XCBINCLUDEDIR... " >&6; }11135$as_echo_n "checking XCBPROTO_XCBINCLUDEDIR... " >&6; }
@@ -11552,7 +11704,7 @@
11552# report actual input values of CONFIG_FILES etc. instead of their11704# report actual input values of CONFIG_FILES etc. instead of their
11553# values after options handling.11705# values after options handling.
11554ac_log="11706ac_log="
11555This file was extended by utouch-geis $as_me 1.0.10, which was11707This file was extended by utouch-geis $as_me 1.0.11, which was
11556generated by GNU Autoconf 2.67. Invocation command line was11708generated by GNU Autoconf 2.67. Invocation command line was
1155711709
11558 CONFIG_FILES = $CONFIG_FILES11710 CONFIG_FILES = $CONFIG_FILES
@@ -11619,7 +11771,7 @@
11619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=111771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11620ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"11772ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11621ac_cs_version="\\11773ac_cs_version="\\
11622utouch-geis config.status 1.0.1011774utouch-geis config.status 1.0.11
11623configured by $0, generated by GNU Autoconf 2.67,11775configured by $0, generated by GNU Autoconf 2.67,
11624 with options \\"\$ac_cs_config\\"11776 with options \\"\$ac_cs_config\\"
1162511777
1162611778
=== modified file 'configure.ac'
--- configure.ac 2010-08-23 14:54:15 +0000
+++ configure.ac 2010-09-16 16:28:52 +0000
@@ -2,7 +2,7 @@
2# Process this file with autoconf to produce a configure script.2# Process this file with autoconf to produce a configure script.
33
4AC_PREREQ(2.65)4AC_PREREQ(2.65)
5AC_INIT([utouch-geis],[1.0.10],5AC_INIT([utouch-geis],[1.0.11],
6 [stephen.webb@canonical.com],,6 [stephen.webb@canonical.com],,
7 [https://launchpad.net/utouch-geis])7 [https://launchpad.net/utouch-geis])
8AC_CONFIG_HEADERS([geis_config.h])8AC_CONFIG_HEADERS([geis_config.h])
@@ -24,6 +24,11 @@
24 AC_MSG_ERROR([Grail development libraries not found]))24 AC_MSG_ERROR([Grail development libraries not found]))
25PKG_CHECK_MODULES([XCB], [xcb >= 1.6], ,25PKG_CHECK_MODULES([XCB], [xcb >= 1.6], ,
26 AC_MSG_ERROR([XCB development libraries not found]))26 AC_MSG_ERROR([XCB development libraries not found]))
27PKG_CHECK_MODULES([X11XCB], [x11-xcb >= 1.3.3], ,
28 AC_MSG_ERROR([X11-XCB development libraries not found]))
29PKG_CHECK_MODULES([XI2], [xi >= 1.3], ,
30 AC_MSG_ERROR([XI2 development libraries not found]))
31
27# XCB code generation configuration32# XCB code generation configuration
28AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)33AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
29XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`34XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
3035
=== modified file 'debian/changelog'
--- debian/changelog 2010-08-25 15:34:20 +0000
+++ debian/changelog 2010-09-16 16:28:52 +0000
@@ -1,8 +1,12 @@
1utouch-geis (1.0.10-0ubuntu2) UNRELEASED; urgency=low1utouch-geis (1.0.11-0ubuntu1) maverick; urgency=low
22
3 [ Ara Pulido ]
3 * Added apport hook for utouch-geis (LP: #622817) 4 * Added apport hook for utouch-geis (LP: #622817)
45
5 -- Ara Pulido <ara@ubuntu.com> Wed, 25 Aug 2010 15:47:49 +02006 [ Stephen M. Webb ]
7 * New upstream release (LP: #640530)
8
9 -- Stephen M. Webb <stephen.webb@canonical.com> Thu, 16 Sep 2010 12:10:13 -0400
610
7utouch-geis (1.0.10-0ubuntu1) maverick; urgency=low11utouch-geis (1.0.10-0ubuntu1) maverick; urgency=low
812
913
=== modified file 'doc/Makefile.in'
--- doc/Makefile.in 2010-08-20 22:03:52 +0000
+++ doc/Makefile.in 2010-09-16 16:28:52 +0000
@@ -146,11 +146,15 @@
146SHELL = @SHELL@146SHELL = @SHELL@
147STRIP = @STRIP@147STRIP = @STRIP@
148VERSION = @VERSION@148VERSION = @VERSION@
149X11XCB_CFLAGS = @X11XCB_CFLAGS@
150X11XCB_LIBS = @X11XCB_LIBS@
149XCBINCLUDEDIR = @XCBINCLUDEDIR@151XCBINCLUDEDIR = @XCBINCLUDEDIR@
150XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@152XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
151XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@153XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
152XCB_CFLAGS = @XCB_CFLAGS@154XCB_CFLAGS = @XCB_CFLAGS@
153XCB_LIBS = @XCB_LIBS@155XCB_LIBS = @XCB_LIBS@
156XI2_CFLAGS = @XI2_CFLAGS@
157XI2_LIBS = @XI2_LIBS@
154abs_builddir = @abs_builddir@158abs_builddir = @abs_builddir@
155abs_srcdir = @abs_srcdir@159abs_srcdir = @abs_srcdir@
156abs_top_builddir = @abs_top_builddir@160abs_top_builddir = @abs_top_builddir@
157161
=== modified file 'doc/geistest.1'
--- doc/geistest.1 2010-08-16 16:25:17 +0000
+++ doc/geistest.1 2010-09-16 16:28:52 +0000
@@ -1,10 +1,13 @@
1.TH geistest 1 "August 16, 2010" "" "geistest"1.TH geistest 1 "August 16, 2010" "" "geistest"
22
3.SH NAME3.SH NAME
4geistest \- test operatoin of the GEIS API4geistest \- test operation of the GEIS API
55
6.SH SYNOPSIS6.SH SYNOPSIS
7.B geistest windowid7.B geistest [
8.B -w
9.I windowid
10.B ]
8.br11.br
912
10.SH DESCRIPTION13.SH DESCRIPTION
@@ -12,8 +15,23 @@
12.B geistest15.B geistest
13program. This program is a test driver for verifying the recognition and propagation of gestures through the GEIS API.16program. This program is a test driver for verifying the recognition and propagation of gestures through the GEIS API.
1417
1518.SH OPTIONS
16.SH EXAMPLE19.IP -w
20Specifies the
21.I windowId
22of a specific window to associate with gestures.
23Particularly useful with touchscreens.
24
25The
26.I windowId
27can be determined using the program
28.BR xwininfo .
29
30If this argument is not set, the default action is to read gestures on all windows.
31
32.SH ENVIRONMENT
33.IP GEIS_DEBUG
34Enables GEIS library diagnostic messages on stderr.
1735
18.SH "SEE ALSO"36.SH "SEE ALSO"
19gesturetest(1)
20\ No newline at end of file37\ No newline at end of file
38gesturetest(1)
2139
=== modified file 'geis/Makefile.in'
--- geis/Makefile.in 2010-08-20 22:03:52 +0000
+++ geis/Makefile.in 2010-09-16 16:28:52 +0000
@@ -145,11 +145,15 @@
145SHELL = @SHELL@145SHELL = @SHELL@
146STRIP = @STRIP@146STRIP = @STRIP@
147VERSION = @VERSION@147VERSION = @VERSION@
148X11XCB_CFLAGS = @X11XCB_CFLAGS@
149X11XCB_LIBS = @X11XCB_LIBS@
148XCBINCLUDEDIR = @XCBINCLUDEDIR@150XCBINCLUDEDIR = @XCBINCLUDEDIR@
149XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@151XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
150XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@152XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
151XCB_CFLAGS = @XCB_CFLAGS@153XCB_CFLAGS = @XCB_CFLAGS@
152XCB_LIBS = @XCB_LIBS@154XCB_LIBS = @XCB_LIBS@
155XI2_CFLAGS = @XI2_CFLAGS@
156XI2_LIBS = @XI2_LIBS@
153abs_builddir = @abs_builddir@157abs_builddir = @abs_builddir@
154abs_srcdir = @abs_srcdir@158abs_srcdir = @abs_srcdir@
155abs_top_builddir = @abs_top_builddir@159abs_top_builddir = @abs_top_builddir@
156160
=== modified file 'geis/geis.h'
--- geis/geis.h 2010-08-23 14:54:18 +0000
+++ geis/geis.h 2010-09-16 16:28:52 +0000
@@ -30,6 +30,28 @@
30#define GEIS_GESTURE_ROTATE "Rotate"30#define GEIS_GESTURE_ROTATE "Rotate"
31#define GEIS_GESTURE_TAP "Tap"31#define GEIS_GESTURE_TAP "Tap"
3232
33/* Gesture names for the Simplified Interface */
34#define GEIS_GESTURE_TYPE_DRAG1 "Drag,touch=1"
35#define GEIS_GESTURE_TYPE_DRAG2 "Drag,touch=2"
36#define GEIS_GESTURE_TYPE_DRAG3 "Drag,touch=3"
37#define GEIS_GESTURE_TYPE_DRAG4 "Drag,touch=4"
38#define GEIS_GESTURE_TYPE_DRAG5 "Drag,touch=5"
39#define GEIS_GESTURE_TYPE_PINCH1 "Pinch,touch=1"
40#define GEIS_GESTURE_TYPE_PINCH2 "Pinch,touch=2"
41#define GEIS_GESTURE_TYPE_PINCH3 "Pinch,touch=3"
42#define GEIS_GESTURE_TYPE_PINCH4 "Pinch,touch=4"
43#define GEIS_GESTURE_TYPE_PINCH5 "Pinch,touch=5"
44#define GEIS_GESTURE_TYPE_ROTATE1 "Rotate,touch=1"
45#define GEIS_GESTURE_TYPE_ROTATE2 "Rotate,touch=2"
46#define GEIS_GESTURE_TYPE_ROTATE3 "Rotate,touch=3"
47#define GEIS_GESTURE_TYPE_ROTATE4 "Rotate,touch=4"
48#define GEIS_GESTURE_TYPE_ROTATE5 "Rotate,touch=5"
49#define GEIS_GESTURE_TYPE_TAP1 "Tap,touch=1"
50#define GEIS_GESTURE_TYPE_TAP2 "Tap,touch=2"
51#define GEIS_GESTURE_TYPE_TAP3 "Tap,touch=3"
52#define GEIS_GESTURE_TYPE_TAP4 "Tap,touch=4"
53#define GEIS_GESTURE_TYPE_TAP5 "Tap,touch=5"
54
33/* Standard fundamental gesture attributes */55/* Standard fundamental gesture attributes */
34#define GEIS_GESTURE_ATTRIBUTE_ANGLE "angle"56#define GEIS_GESTURE_ATTRIBUTE_ANGLE "angle"
35#define GEIS_GESTURE_ATTRIBUTE_ANGLE_DELTA "angle delta"57#define GEIS_GESTURE_ATTRIBUTE_ANGLE_DELTA "angle delta"
@@ -43,7 +65,6 @@
43#define GEIS_GESTURE_ATTRIBUTE_DELTA_Y "delta y"65#define GEIS_GESTURE_ATTRIBUTE_DELTA_Y "delta y"
44#define GEIS_GESTURE_ATTRIBUTE_DEVICE_ID "device id"66#define GEIS_GESTURE_ATTRIBUTE_DEVICE_ID "device id"
45#define GEIS_GESTURE_ATTRIBUTE_EVENT_WINDOW_ID "event window id"67#define GEIS_GESTURE_ATTRIBUTE_EVENT_WINDOW_ID "event window id"
46#define GEIS_GESTURE_ATTRIBUTE_FINGERS "fingers"
47#define GEIS_GESTURE_ATTRIBUTE_FOCUS_X "focus x"68#define GEIS_GESTURE_ATTRIBUTE_FOCUS_X "focus x"
48#define GEIS_GESTURE_ATTRIBUTE_FOCUS_Y "focus y"69#define GEIS_GESTURE_ATTRIBUTE_FOCUS_Y "focus y"
49#define GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME "gesture name"70#define GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME "gesture name"
@@ -55,6 +76,7 @@
55#define GEIS_GESTURE_ATTRIBUTE_ROOT_WINDOW_ID "root window id"76#define GEIS_GESTURE_ATTRIBUTE_ROOT_WINDOW_ID "root window id"
56#define GEIS_GESTURE_ATTRIBUTE_TAP_TIME "tap time"77#define GEIS_GESTURE_ATTRIBUTE_TAP_TIME "tap time"
57#define GEIS_GESTURE_ATTRIBUTE_TIMESTAMP "timestamp"78#define GEIS_GESTURE_ATTRIBUTE_TIMESTAMP "timestamp"
79#define GEIS_GESTURE_ATTRIBUTE_TOUCHES "touches"
58#define GEIS_GESTURE_ATTRIBUTE_VELOCITY_X "velocity x"80#define GEIS_GESTURE_ATTRIBUTE_VELOCITY_X "velocity x"
59#define GEIS_GESTURE_ATTRIBUTE_VELOCITY_Y "velocity y"81#define GEIS_GESTURE_ATTRIBUTE_VELOCITY_Y "velocity y"
60#define GEIS_GESTURE_ATTRIBUTE_TOUCH_0_ID "touch 0 id"82#define GEIS_GESTURE_ATTRIBUTE_TOUCH_0_ID "touch 0 id"
@@ -271,7 +293,7 @@
271 * @retval GEIS_STATUS_SUCCESS normal successful completion293 * @retval GEIS_STATUS_SUCCESS normal successful completion
272 */294 */
273GEIS_API GeisStatus geis_input_devices(GeisInstance geis_instance,295GEIS_API GeisStatus geis_input_devices(GeisInstance geis_instance,
274 GeisInputFuncs func,296 GeisInputFuncs *func,
275 void *cookie);297 void *cookie);
276298
277/* @} */299/* @} */
278300
=== modified file 'libutouch-geis-xcb/Makefile.am'
--- libutouch-geis-xcb/Makefile.am 2010-08-23 14:54:15 +0000
+++ libutouch-geis-xcb/Makefile.am 2010-09-16 16:28:52 +0000
@@ -16,9 +16,10 @@
1616
17libutouch_geis_la_SOURCES = \17libutouch_geis_la_SOURCES = \
18 geis.c \18 geis.c \
19 geis_debug.h \19 geis_logging.h geis_logging.c \
20 geis_xcb.h geis_xcb.c \20 geis_instance.h geis_instance.c \
21 geis_instance.h geis_instance.c21 geis_instance_table.h geis_instance_table.c \
22 geis_xcb.h geis_xcb.c
2223
23dist_libutouch_geis_la_SOURCES = \24dist_libutouch_geis_la_SOURCES = \
24 xcb_gesture.h xcb_gesture.c25 xcb_gesture.h xcb_gesture.c
@@ -29,15 +30,19 @@
29 -DGEIS_BUILDING_DSO=1 \30 -DGEIS_BUILDING_DSO=1 \
30 -I$(top_srcdir) \31 -I$(top_srcdir) \
31 $(GRAIL_CFLAGS) \32 $(GRAIL_CFLAGS) \
32 $(XCB_CFLAGS)33 $(X11XCB_CFLAGS) \
34 $(XCB_CFLAGS) \
35 $(XI2_CFLAGS)
3336
34libutouch_geis_la_LDFLAGS = \37libutouch_geis_la_LDFLAGS = \
35 -Wl,-z,defs -Wl,--as-needed \38 -Wl,-z,defs -Wl,--as-needed \
36 -version-info 1:0:0 \39 -version-info 1:1:0 \
37 -Wl,--version-script=$(version_script)40 -Wl,--version-script=$(version_script)
3841
39libutouch_geis_la_LIBADD = \42libutouch_geis_la_LIBADD = \
40 $(XCB_LIBS)43 $(X11XCB_LIBS) \
44 $(XCB_LIBS) \
45 $(XI2_LIBS)
4146
42BUILT_SOURCES = $(dist_libutouch_geis_la_SOURCES)47BUILT_SOURCES = $(dist_libutouch_geis_la_SOURCES)
43CLEANFILES = $(dist_libutouch_geis_la_SOURCES)48CLEANFILES = $(dist_libutouch_geis_la_SOURCES)
4449
=== modified file 'libutouch-geis-xcb/Makefile.in'
--- libutouch-geis-xcb/Makefile.in 2010-08-20 22:03:52 +0000
+++ libutouch-geis-xcb/Makefile.in 2010-09-16 16:28:52 +0000
@@ -73,10 +73,13 @@
73am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(incdir)"73am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(incdir)"
74LTLIBRARIES = $(lib_LTLIBRARIES)74LTLIBRARIES = $(lib_LTLIBRARIES)
75am__DEPENDENCIES_1 =75am__DEPENDENCIES_1 =
76libutouch_geis_la_DEPENDENCIES = $(am__DEPENDENCIES_1)76libutouch_geis_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
77 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
77am_libutouch_geis_la_OBJECTS = libutouch_geis_la-geis.lo \78am_libutouch_geis_la_OBJECTS = libutouch_geis_la-geis.lo \
78 libutouch_geis_la-geis_xcb.lo \79 libutouch_geis_la-geis_logging.lo \
79 libutouch_geis_la-geis_instance.lo80 libutouch_geis_la-geis_instance.lo \
81 libutouch_geis_la-geis_instance_table.lo \
82 libutouch_geis_la-geis_xcb.lo
80dist_libutouch_geis_la_OBJECTS = libutouch_geis_la-xcb_gesture.lo83dist_libutouch_geis_la_OBJECTS = libutouch_geis_la-xcb_gesture.lo
81libutouch_geis_la_OBJECTS = $(am_libutouch_geis_la_OBJECTS) \84libutouch_geis_la_OBJECTS = $(am_libutouch_geis_la_OBJECTS) \
82 $(dist_libutouch_geis_la_OBJECTS)85 $(dist_libutouch_geis_la_OBJECTS)
@@ -173,6 +176,8 @@
173SHELL = @SHELL@176SHELL = @SHELL@
174STRIP = @STRIP@177STRIP = @STRIP@
175VERSION = @VERSION@178VERSION = @VERSION@
179X11XCB_CFLAGS = @X11XCB_CFLAGS@
180X11XCB_LIBS = @X11XCB_LIBS@
176XCBINCLUDEDIR = @XCBINCLUDEDIR@181XCBINCLUDEDIR = @XCBINCLUDEDIR@
177XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@182XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
178XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@183XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
@@ -180,6 +185,8 @@
180# work around a problem with XCB tools185# work around a problem with XCB tools
181XCB_CFLAGS = @XCB_CFLAGS@ -I$(includedir)/xcb -I$(XCBINCLUDEDIR)/xcb186XCB_CFLAGS = @XCB_CFLAGS@ -I$(includedir)/xcb -I$(XCBINCLUDEDIR)/xcb
182XCB_LIBS = @XCB_LIBS@187XCB_LIBS = @XCB_LIBS@
188XI2_CFLAGS = @XI2_CFLAGS@
189XI2_LIBS = @XI2_LIBS@
183abs_builddir = @abs_builddir@190abs_builddir = @abs_builddir@
184abs_srcdir = @abs_srcdir@191abs_srcdir = @abs_srcdir@
185abs_top_builddir = @abs_top_builddir@192abs_top_builddir = @abs_top_builddir@
@@ -248,9 +255,10 @@
248lib_LTLIBRARIES = libutouch-geis.la255lib_LTLIBRARIES = libutouch-geis.la
249libutouch_geis_la_SOURCES = \256libutouch_geis_la_SOURCES = \
250 geis.c \257 geis.c \
251 geis_debug.h \258 geis_logging.h geis_logging.c \
252 geis_xcb.h geis_xcb.c \259 geis_instance.h geis_instance.c \
253 geis_instance.h geis_instance.c260 geis_instance_table.h geis_instance_table.c \
261 geis_xcb.h geis_xcb.c
254262
255dist_libutouch_geis_la_SOURCES = \263dist_libutouch_geis_la_SOURCES = \
256 xcb_gesture.h xcb_gesture.c264 xcb_gesture.h xcb_gesture.c
@@ -261,15 +269,19 @@
261 -DGEIS_BUILDING_DSO=1 \269 -DGEIS_BUILDING_DSO=1 \
262 -I$(top_srcdir) \270 -I$(top_srcdir) \
263 $(GRAIL_CFLAGS) \271 $(GRAIL_CFLAGS) \
264 $(XCB_CFLAGS)272 $(X11XCB_CFLAGS) \
273 $(XCB_CFLAGS) \
274 $(XI2_CFLAGS)
265275
266libutouch_geis_la_LDFLAGS = \276libutouch_geis_la_LDFLAGS = \
267 -Wl,-z,defs -Wl,--as-needed \277 -Wl,-z,defs -Wl,--as-needed \
268 -version-info 1:0:0 \278 -version-info 1:1:0 \
269 -Wl,--version-script=$(version_script)279 -Wl,--version-script=$(version_script)
270280
271libutouch_geis_la_LIBADD = \281libutouch_geis_la_LIBADD = \
272 $(XCB_LIBS)282 $(X11XCB_LIBS) \
283 $(XCB_LIBS) \
284 $(XI2_LIBS)
273285
274BUILT_SOURCES = $(dist_libutouch_geis_la_SOURCES)286BUILT_SOURCES = $(dist_libutouch_geis_la_SOURCES)
275CLEANFILES = $(dist_libutouch_geis_la_SOURCES)287CLEANFILES = $(dist_libutouch_geis_la_SOURCES)
@@ -354,6 +366,8 @@
354366
355@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis.Plo@am__quote@367@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis.Plo@am__quote@
356@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_instance.Plo@am__quote@368@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_instance.Plo@am__quote@
369@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_instance_table.Plo@am__quote@
370@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_logging.Plo@am__quote@
357@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_xcb.Plo@am__quote@371@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-geis_xcb.Plo@am__quote@
358@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-xcb_gesture.Plo@am__quote@372@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutouch_geis_la-xcb_gesture.Plo@am__quote@
359373
@@ -385,6 +399,27 @@
385@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@399@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
386@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis.lo `test -f 'geis.c' || echo '$(srcdir)/'`geis.c400@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis.lo `test -f 'geis.c' || echo '$(srcdir)/'`geis.c
387401
402libutouch_geis_la-geis_logging.lo: geis_logging.c
403@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_logging.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_logging.Tpo -c -o libutouch_geis_la-geis_logging.lo `test -f 'geis_logging.c' || echo '$(srcdir)/'`geis_logging.c
404@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_logging.Tpo $(DEPDIR)/libutouch_geis_la-geis_logging.Plo
405@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='geis_logging.c' object='libutouch_geis_la-geis_logging.lo' libtool=yes @AMDEPBACKSLASH@
406@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
407@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_logging.lo `test -f 'geis_logging.c' || echo '$(srcdir)/'`geis_logging.c
408
409libutouch_geis_la-geis_instance.lo: geis_instance.c
410@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_instance.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_instance.Tpo -c -o libutouch_geis_la-geis_instance.lo `test -f 'geis_instance.c' || echo '$(srcdir)/'`geis_instance.c
411@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_instance.Tpo $(DEPDIR)/libutouch_geis_la-geis_instance.Plo
412@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='geis_instance.c' object='libutouch_geis_la-geis_instance.lo' libtool=yes @AMDEPBACKSLASH@
413@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
414@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_instance.lo `test -f 'geis_instance.c' || echo '$(srcdir)/'`geis_instance.c
415
416libutouch_geis_la-geis_instance_table.lo: geis_instance_table.c
417@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_instance_table.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_instance_table.Tpo -c -o libutouch_geis_la-geis_instance_table.lo `test -f 'geis_instance_table.c' || echo '$(srcdir)/'`geis_instance_table.c
418@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_instance_table.Tpo $(DEPDIR)/libutouch_geis_la-geis_instance_table.Plo
419@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='geis_instance_table.c' object='libutouch_geis_la-geis_instance_table.lo' libtool=yes @AMDEPBACKSLASH@
420@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
421@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_instance_table.lo `test -f 'geis_instance_table.c' || echo '$(srcdir)/'`geis_instance_table.c
422
388libutouch_geis_la-geis_xcb.lo: geis_xcb.c423libutouch_geis_la-geis_xcb.lo: geis_xcb.c
389@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_xcb.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_xcb.Tpo -c -o libutouch_geis_la-geis_xcb.lo `test -f 'geis_xcb.c' || echo '$(srcdir)/'`geis_xcb.c424@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_xcb.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_xcb.Tpo -c -o libutouch_geis_la-geis_xcb.lo `test -f 'geis_xcb.c' || echo '$(srcdir)/'`geis_xcb.c
390@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_xcb.Tpo $(DEPDIR)/libutouch_geis_la-geis_xcb.Plo425@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_xcb.Tpo $(DEPDIR)/libutouch_geis_la-geis_xcb.Plo
@@ -392,13 +427,6 @@
392@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@427@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
393@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_xcb.lo `test -f 'geis_xcb.c' || echo '$(srcdir)/'`geis_xcb.c428@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_xcb.lo `test -f 'geis_xcb.c' || echo '$(srcdir)/'`geis_xcb.c
394429
395libutouch_geis_la-geis_instance.lo: geis_instance.c
396@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-geis_instance.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-geis_instance.Tpo -c -o libutouch_geis_la-geis_instance.lo `test -f 'geis_instance.c' || echo '$(srcdir)/'`geis_instance.c
397@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-geis_instance.Tpo $(DEPDIR)/libutouch_geis_la-geis_instance.Plo
398@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='geis_instance.c' object='libutouch_geis_la-geis_instance.lo' libtool=yes @AMDEPBACKSLASH@
399@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
400@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libutouch_geis_la-geis_instance.lo `test -f 'geis_instance.c' || echo '$(srcdir)/'`geis_instance.c
401
402libutouch_geis_la-xcb_gesture.lo: xcb_gesture.c430libutouch_geis_la-xcb_gesture.lo: xcb_gesture.c
403@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-xcb_gesture.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-xcb_gesture.Tpo -c -o libutouch_geis_la-xcb_gesture.lo `test -f 'xcb_gesture.c' || echo '$(srcdir)/'`xcb_gesture.c431@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutouch_geis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libutouch_geis_la-xcb_gesture.lo -MD -MP -MF $(DEPDIR)/libutouch_geis_la-xcb_gesture.Tpo -c -o libutouch_geis_la-xcb_gesture.lo `test -f 'xcb_gesture.c' || echo '$(srcdir)/'`xcb_gesture.c
404@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-xcb_gesture.Tpo $(DEPDIR)/libutouch_geis_la-xcb_gesture.Plo432@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutouch_geis_la-xcb_gesture.Tpo $(DEPDIR)/libutouch_geis_la-xcb_gesture.Plo
405433
=== modified file 'libutouch-geis-xcb/geis.c'
--- libutouch-geis-xcb/geis.c 2010-08-11 13:54:54 +0000
+++ libutouch-geis-xcb/geis.c 2010-09-16 16:28:52 +0000
@@ -20,9 +20,13 @@
20#include <geis/geis.h>20#include <geis/geis.h>
2121
22#include "geis_instance.h"22#include "geis_instance.h"
23#include "geis_xcb.h"
23#include <stdlib.h>24#include <stdlib.h>
2425
2526
27static GeisXcb s_geis_xcb = NULL;
28
29
26/**30/**
27 * @param[in] win_info31 * @param[in] win_info
28 * @param[out] geis_instance32 * @param[out] geis_instance
@@ -34,13 +38,19 @@
34geis_init(GeisWinInfo *win_info, GeisInstance *geis_instance)38geis_init(GeisWinInfo *win_info, GeisInstance *geis_instance)
35{39{
36 *geis_instance = NULL;40 *geis_instance = NULL;
41 GeisXcbWinInfo *xcb_win_info = (GeisXcbWinInfo*)win_info->win_info;
3742
38 if (win_info->win_type != GEIS_XCB_FULL_WINDOW)43 if (win_info->win_type != GEIS_XCB_FULL_WINDOW)
39 {44 {
40 return GEIS_BAD_ARGUMENT;45 return GEIS_BAD_ARGUMENT;
41 }46 }
4247
43 *geis_instance = geis_instance_get((GeisXcbWinInfo*)win_info->win_info);48 if (!s_geis_xcb)
49 {
50 s_geis_xcb = geis_xcb_new(xcb_win_info);
51 }
52
53 *geis_instance = geis_xcb_create_instance(s_geis_xcb, xcb_win_info->window_id);
44 return GEIS_STATUS_SUCCESS;54 return GEIS_STATUS_SUCCESS;
45}55}
4656
@@ -109,7 +119,7 @@
109 switch (configuration_item)119 switch (configuration_item)
110 {120 {
111 case GEIS_CONFIG_UNIX_FD:121 case GEIS_CONFIG_UNIX_FD:
112 *(int *)value = geis_instance_fd(geis_instance);122 *(int *)value = geis_xcb_fd(s_geis_xcb);
113 status = GEIS_STATUS_SUCCESS;123 status = GEIS_STATUS_SUCCESS;
114 break;124 break;
115 }125 }
@@ -147,7 +157,7 @@
147 return GEIS_BAD_ARGUMENT;157 return GEIS_BAD_ARGUMENT;
148 }158 }
149159
150 geis_instance_event_dispatch(geis_instance);160 geis_xcb_dispatch(s_geis_xcb);
151 return GEIS_STATUS_SUCCESS;161 return GEIS_STATUS_SUCCESS;
152}162}
153163
@@ -159,7 +169,7 @@
159 */169 */
160GeisStatus170GeisStatus
161geis_input_devices(GeisInstance geis_instance,171geis_input_devices(GeisInstance geis_instance,
162 GeisInputFuncs funcs,172 GeisInputFuncs *funcs,
163 void *cookie)173 void *cookie)
164{174{
165 if (!geis_instance_is_valid(geis_instance))175 if (!geis_instance_is_valid(geis_instance))
@@ -167,7 +177,7 @@
167 return GEIS_BAD_ARGUMENT;177 return GEIS_BAD_ARGUMENT;
168 }178 }
169179
170 return GEIS_UNKNOWN_ERROR;180 return geis_xcb_input_devices(s_geis_xcb, funcs, cookie);
171}181}
172182
173183
@@ -191,6 +201,7 @@
191 }201 }
192202
193 return geis_instance_subscribe(geis_instance,203 return geis_instance_subscribe(geis_instance,
204 s_geis_xcb,
194 input_list,205 input_list,
195 gesture_list,206 gesture_list,
196 funcs,207 funcs,
197208
=== removed file 'libutouch-geis-xcb/geis_debug.h'
--- libutouch-geis-xcb/geis_debug.h 2010-08-11 13:54:54 +0000
+++ libutouch-geis-xcb/geis_debug.h 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1/**
2 * @file geis_debug,h
3 *
4 * Copyright 2010 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#ifndef GEIS_DEBUG_H_
21#define GEIS_DEBUG_H_
22
23#include <stdio.h>
24
25#define geis_debug printf
26
27#endif /* GEIS_DEBUG_H_ */
280
=== modified file 'libutouch-geis-xcb/geis_instance.c'
--- libutouch-geis-xcb/geis_instance.c 2010-08-11 13:54:54 +0000
+++ libutouch-geis-xcb/geis_instance.c 2010-09-16 16:28:52 +0000
@@ -19,17 +19,27 @@
19 */19 */
20#include "geis_instance.h"20#include "geis_instance.h"
2121
22#include "geis_logging.h"
22#include <stdlib.h>23#include <stdlib.h>
2324
2425
26/**
27 * Creates a new GeisInstance for an X11 windowId.
28 *
29 * @param[in] An X11 windowId.
30 *
31 * @returns a new GeisInstance or NULL on failure.
32 */
25GeisInstance33GeisInstance
26geis_instance_get(GeisXcbWinInfo* win_info)34geis_instance_new(uint32_t window_id)
27{35{
28 GeisInstance instance = calloc(1, sizeof(GeisInstance));36 GeisInstance instance = calloc(1, sizeof(struct _GeisInstance));
29 if (instance)37 if (!instance)
30 {38 {
31 instance->xcb = geis_xcb_get(win_info);39 geis_error("allocating GeisInstance");
40 return NULL;
32 }41 }
42 instance->window_id = window_id;
33 return instance;43 return instance;
34}44}
3545
@@ -44,42 +54,52 @@
44int54int
45geis_instance_is_valid(GeisInstance instance)55geis_instance_is_valid(GeisInstance instance)
46{56{
47 return (instance != 0 && instance->xcb != 0);57 return (instance != 0 && instance->window_id != 0);
48}58}
4959
5060
51GeisStatus61GeisStatus
52geis_instance_subscribe(GeisInstance instance,62geis_instance_subscribe(GeisInstance instance,
63 GeisXcb xcb,
53 GeisInputDeviceId *input_list,64 GeisInputDeviceId *input_list,
54 const char* *gesture_list,65 const char* *gesture_list,
55 GeisGestureFuncs *funcs,66 GeisGestureFuncs *funcs,
56 void *cookie)67 void *cookie)
57{68{
69 GeisStatus result = GEIS_UNKNOWN_ERROR;
58 instance->gesture_funcs = funcs;70 instance->gesture_funcs = funcs;
59 instance->gesture_cookie = cookie;71 instance->gesture_cookie = cookie;
60 return geis_xcb_subscribe(instance, gesture_list);72 if (input_list == GEIS_ALL_INPUT_DEVICES)
61}73 {
6274 result = geis_xcb_subscribe(xcb, instance, 0, gesture_list);
6375 }
64int76 else
65geis_instance_fd(GeisInstance instance)77 {
66{78 GeisInputDeviceId *device_id = input_list;
67 if (instance == NULL)79 for (; *device_id; ++device_id)
68 return -1;80 {
69 81 GeisStatus a_result = geis_xcb_subscribe(xcb, instance,
70 return geis_xcb_fd(instance->xcb);82 (uint16_t)*device_id,
71}83 gesture_list);
7284 if (a_result == GEIS_STATUS_SUCCESS)
7385 {
74void86 result = a_result;
75geis_instance_event_dispatch(GeisInstance instance)87 }
76{88 }
77 geis_xcb_dispatch(instance);89 }
90 return result;
91}
92
93
94uint32_t
95geis_instance_get_window_id(GeisInstance instance)
96{
97 return instance->window_id;
78}98}
7999
80100
81void101void
82geis_instance_free(GeisInstance instance)102geis_instance_free(GeisInstance instance)
83{103{
84 geis_xcb_free(instance->xcb);104 free(instance);
85}105}
86106
=== modified file 'libutouch-geis-xcb/geis_instance.h'
--- libutouch-geis-xcb/geis_instance.h 2010-08-23 14:54:18 +0000
+++ libutouch-geis-xcb/geis_instance.h 2010-09-16 16:28:52 +0000
@@ -26,31 +26,27 @@
2626
27struct _GeisInstance27struct _GeisInstance
28{28{
29 GeisXcb *xcb;29 uint32_t window_id;
30 GeisInputCallback input_callback;30 GeisGestureFuncs *gesture_funcs;
31 void *input_cookie;31 void *gesture_cookie;
32 GeisGestureFuncs *gesture_funcs;
33 void *gesture_cookie;
34};32};
3533
36/** @brief Constructs a GeisInstance. */34/** @brief Constructs a GeisInstance. */
37GeisInstance geis_instance_get(GeisXcbWinInfo* win_info);35GeisInstance geis_instance_new(uint32_t win_info);
36
3837
39/** @brief Indicates if the GeisInstance is valid. */38/** @brief Indicates if the GeisInstance is valid. */
40int geis_instance_is_valid(GeisInstance instance);39int geis_instance_is_valid(GeisInstance instance);
4140
42/** @brief Subscribe to gestures. */41/** @brief Subscribe to gestures. */
43GeisStatus geis_instance_subscribe(GeisInstance instance,42GeisStatus geis_instance_subscribe(GeisInstance instance,
43 GeisXcb xcb,
44 GeisInputDeviceId *input_list,44 GeisInputDeviceId *input_list,
45 const char* *gesture_list,45 const char* *gesture_list,
46 GeisGestureFuncs *funcs,46 GeisGestureFuncs *funcs,
47 void *cookie);47 void *cookie);
4848
49/** @brief Gets the event file descriptor. */49uint32_t geis_instance_get_window_id(GeisInstance instance);
50int geis_instance_fd(GeisInstance instance);
51
52/** @brief Dispatches events. */
53void geis_instance_event_dispatch(GeisInstance instance);
5450
55/** @brief Tears down the GeisInstance. */51/** @brief Tears down the GeisInstance. */
56void geis_instance_free(GeisInstance instance);52void geis_instance_free(GeisInstance instance);
5753
=== added file 'libutouch-geis-xcb/geis_instance_table.c'
--- libutouch-geis-xcb/geis_instance_table.c 1970-01-01 00:00:00 +0000
+++ libutouch-geis-xcb/geis_instance_table.c 2010-09-16 16:28:52 +0000
@@ -0,0 +1,127 @@
1/**
2 * geis_instance_table.h
3 *
4 * Copyright 2010 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 51
18 * Franklin St, Fifth Floor, Boston, MA 02110-1301 US
19 */
20#include "geis_instance_table.h"
21
22#include "geis_instance.h"
23#include <stdlib.h>
24
25#define GROWTH_FACTOR 2
26
27
28typedef struct _GeisInstanceTableEntry
29{
30 uint32_t id;
31 GeisInstance type;
32} *GeisInstanceTableEntry;
33
34struct _GeisInstanceTable
35{
36 size_t capacity;
37 size_t size;
38 GeisInstanceTableEntry data;
39};
40
41
42GeisInstanceTable
43geis_instance_table_new(int size_hint)
44{
45 GeisInstanceTable table = malloc(sizeof(struct _GeisInstanceTable));
46 if (!table)
47 {
48 /* TODO: report error */
49 }
50
51 table->capacity = size_hint;
52 table->size = 0;
53 table->data = calloc(table->capacity,
54 size_hint * sizeof(struct _GeisInstanceTableEntry));
55 if (!table->data)
56 {
57 /* TODO: report error */
58 }
59
60 return table;
61}
62
63
64/**
65 * Adds (or replaces) a gesture type in the table.
66 */
67void
68geis_instance_table_add(GeisInstanceTable table,
69 GeisInstance instance)
70{
71 size_t i;
72 uint32_t window_id = geis_instance_get_window_id(instance);
73
74 /* If the ID is already present, just replace the gesture type */
75 for (i = 0; i < table->size; ++i)
76 {
77 if (table->data[i].id == window_id)
78 {
79 table->data[i].type = instance;
80 return;
81 }
82 }
83
84 /* If there is no space to insert, grow the table. */
85 if (table->size >= table->capacity)
86 {
87 size_t new_capacity = table->capacity * GROWTH_FACTOR;
88 GeisInstanceTableEntry new_data = realloc(table->data,
89 new_capacity * sizeof(struct _GeisInstanceTableEntry));
90 if (!new_data)
91 {
92 /* TODO: report error */
93 }
94
95 table->capacity = new_capacity;
96 table->data = new_data;
97 }
98
99 table->data[table->size].id = window_id;
100 table->data[table->size].type = instance;
101 ++table->size;
102}
103
104
105GeisInstance
106geis_instance_table_get(GeisInstanceTable table,
107 uint32_t window_id)
108{
109 size_t i;
110 for (i = 0; i < table->size; ++i)
111 {
112 if (table->data[i].id == window_id)
113 {
114 return table->data[i].type;
115 }
116 }
117 return NULL;
118}
119
120
121void
122geis_instance_table_free(GeisInstanceTable table)
123{
124 free(table->data);
125 free(table);
126}
127
0128
=== added file 'libutouch-geis-xcb/geis_instance_table.h'
--- libutouch-geis-xcb/geis_instance_table.h 1970-01-01 00:00:00 +0000
+++ libutouch-geis-xcb/geis_instance_table.h 2010-09-16 16:28:52 +0000
@@ -0,0 +1,41 @@
1/**
2 * geis_instance_table.h
3 *
4 * Copyright 2010 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 51
18 * Franklin St, Fifth Floor, Boston, MA 02110-1301 US
19 */
20#ifndef GEIS_INSTANCE_TABLE_H_
21#define GEIS_INSTANCE_TABLE_H_
22
23#include "geis_config.h"
24#include <geis/geis.h>
25
26/**
27 * A map from XCB window IDs to geisInstances.
28 */
29typedef struct _GeisInstanceTable *GeisInstanceTable;
30
31GeisInstanceTable geis_instance_table_new(int size_hint);
32
33void geis_instance_table_add(GeisInstanceTable type_table,
34 GeisInstance instance);
35
36GeisInstance geis_instance_table_get(GeisInstanceTable type_table,
37 uint32_t window_id);
38
39void geis_instance_table_free(GeisInstanceTable type_table);
40
41#endif /* GEIS_INSTANCE_TABLE_H_ */
042
=== added file 'libutouch-geis-xcb/geis_logging.c'
--- libutouch-geis-xcb/geis_logging.c 1970-01-01 00:00:00 +0000
+++ libutouch-geis-xcb/geis_logging.c 2010-09-16 16:28:52 +0000
@@ -0,0 +1,87 @@
1/**
2 * @file geis_logging.h
3 *
4 * Copyright 2010 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include "geis_logging.h"
21
22#include <stdarg.h>
23#include <stdio.h>
24#include <stdlib.h>
25#include <string.h>
26
27
28static const char *prefix_format = "GEIS(%s)-%s:%d ";
29static const char *debug_marker = "debug";
30static const char *warning_marker = "warning";
31static const char *error_marker = "error";
32
33
34static int
35reporting_level()
36{
37 char *level = getenv("GEIS_DEBUG");
38 if (level)
39 {
40 return atoi(level);
41 }
42 return 0;
43}
44
45static int
46level_is_enabled(int desired_level)
47{
48 static int level = -1;
49 if (level < 0)
50 level = reporting_level();
51 return level >= desired_level;
52}
53
54
55int
56_geis_message(int level, const char* function, int line, const char *format, ...)
57{
58 int count = 0;
59 if (level_is_enabled(level))
60 {
61 const char *marker = NULL;
62 switch (level)
63 {
64 case _GEIS_LOG_LEVEL_DEBUG:
65 marker = debug_marker;
66 break;
67 case _GEIS_LOG_LEVEL_WARNING:
68 marker = warning_marker;
69 break;
70 default:
71 marker = error_marker;
72 break;
73 }
74
75 fprintf(stderr, prefix_format, marker, function, line);
76
77 va_list ap;
78 va_start(ap, format);
79 count = vfprintf(stderr, format, ap);
80 va_end(ap);
81
82 fprintf(stderr, "\n");
83 }
84 return count;
85}
86
87
088
=== added file 'libutouch-geis-xcb/geis_logging.h'
--- libutouch-geis-xcb/geis_logging.h 1970-01-01 00:00:00 +0000
+++ libutouch-geis-xcb/geis_logging.h 2010-09-16 16:28:52 +0000
@@ -0,0 +1,64 @@
1/**
2 * @file geis_logging.h
3 * @brief internal GEIS debug/logging facilities
4 *
5 * Copyright 2010 Canonical Ltd.
6 *
7 * This library is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Lesser General Public License as published by the Free
9 * Software Foundation; either version 3 of the License, or (at your option) any
10 * later version.
11 *
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21#ifndef GEIS_LOGGING_H_
22#define GEIS_LOGGING_H_
23
24/**
25 * @defgroup geis_logging GEIS Logging Facilities
26 *
27 * This facility allows the run-time delivery of debugging and error emssages
28 * from the library. By default, no debug or error diagnostics are emitted by
29 * the library. However, if the environment variable GEIS_DEBUG is set to an
30 * appropriate value, these diagnostic messages will be emitted to stderr.
31 *
32 * The following GEIS_DEBUG values are supported.
33 *
34 * GEIS_DEBUG=1 error messages only are emitted
35 * GEIS_DEBUG=2 error and warning messages are emitted
36 * GEIS_DEBUG=3 error, warning, and debug messages are emitted
37 *
38 * @{
39 */
40
41#define _GEIS_LOG_LEVEL_ERROR 1
42#define _GEIS_LOG_LEVEL_WARNING 2
43#define _GEIS_LOG_LEVEL_DEBUG 3
44
45/**
46 * Emits a message at the DEBUG logging level.
47 * @param[in] fmt printf-style format string
48 */
49#define geis_debug(...) _geis_message(_GEIS_LOG_LEVEL_DEBUG, \
50 __FUNCTION__, __LINE__, \
51 __VA_ARGS__)
52#define geis_warning(...) _geis_message(_GEIS_LOG_LEVEL_WARNING, \
53 __FUNCTION__, __LINE__, \
54 __VA_ARGS__)
55#define geis_error(...) _geis_message(_GEIS_LOG_LEVEL_ERROR, \
56 __FUNCTION__, __LINE__, \
57 __VA_ARGS__)
58int _geis_message(int level,
59 const char *function, int line,
60 const char *format, ...) __attribute__((format(printf, 4, 5)));
61
62/* @} */
63
64#endif /* GEIS_LOGGING_H_ */
065
=== modified file 'libutouch-geis-xcb/geis_xcb.c'
--- libutouch-geis-xcb/geis_xcb.c 2010-08-23 14:54:15 +0000
+++ libutouch-geis-xcb/geis_xcb.c 2010-09-16 16:28:52 +0000
@@ -19,12 +19,14 @@
19 */19 */
20#include "geis_xcb.h"20#include "geis_xcb.h"
2121
22#include "geis_debug.h"
23#include "geis_instance.h"22#include "geis_instance.h"
23#include "geis_instance_table.h"
24#include "geis_logging.h"
24#include <grail.h>25#include <grail.h>
25#include <grail-types.h>26#include <grail-types.h>
26#include <stdlib.h>27#include <stdlib.h>
27#include <string.h>28#include <string.h>
29#include <X11/Xlib-xcb.h>
28#include <X11/X.h>30#include <X11/X.h>
29#include "xcb_gesture.h"31#include "xcb_gesture.h"
30#include <xcb/xcb.h>32#include <xcb/xcb.h>
@@ -32,15 +34,12 @@
32struct _GeisXcb34struct _GeisXcb
33{35{
34 GeisXcbWinInfo *win_info;36 GeisXcbWinInfo *win_info;
37 Display *display;
35 xcb_connection_t *connection;38 xcb_connection_t *connection;
36 int fd;39 int fd;
37};40 GeisInstanceTable instance_table;
3841 GeisInputFuncs *input_funcs;
39static GeisXcb s_geis_xcb =42 void *input_cookie;
40{
41 NULL,
42 NULL,
43 -1
44};43};
4544
46typedef struct _GrailAttrMap45typedef struct _GrailAttrMap
@@ -171,71 +170,182 @@
171170
172static const GrailTypeMap s_grail_type_map[] =171static const GrailTypeMap s_grail_type_map[] =
173{172{
174 { GEIS_GESTURE_TYPE_DRAG, GEIS_GESTURE_DRAG, sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap), s_grail_drag_attrs },173 {
175 { GEIS_GESTURE_TYPE_PINCH, GEIS_GESTURE_PINCH, sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap), s_grail_pinch_attrs },174 GEIS_GESTURE_TYPE_DRAG,
176 { GEIS_GESTURE_TYPE_ROTATE, GEIS_GESTURE_ROTATE, sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap), s_grail_rotate_attrs },175 GEIS_GESTURE_DRAG,
177 { GEIS_GESTURE_TYPE_TAP, GEIS_GESTURE_TAP, sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap), s_grail_tap_attrs },176 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
178 { 0, 0, 0, 0 }177 s_grail_drag_attrs
179};178 },
180179 {
181180 GEIS_GESTURE_TYPE_PINCH,
182GeisGestureAttr s_name_attr =181 GEIS_GESTURE_PINCH,
183{182 sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap),
184 .name="name",183 s_grail_pinch_attrs
185 .type=GEIS_ATTR_TYPE_STRING184 },
186};185 {
187186 GEIS_GESTURE_TYPE_ROTATE,
188/**187 GEIS_GESTURE_ROTATE,
189 * Dispatches gesture events to the instance's callback.188 sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap),
190 */189 s_grail_rotate_attrs
191static void190 },
192geis_xcb_dispatch_gesture_type(GeisInstance instance,191 {
193 const char **gesture_list)192 GEIS_GESTURE_TYPE_TAP,
194{193 GEIS_GESTURE_TAP,
195 if (gesture_list == GEIS_ALL_GESTURES)194 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
196 {195 s_grail_tap_attrs
197 const GrailTypeMap *type = s_grail_type_map;196 },
198 for (; type->name; ++type)197 {
199 {198 GRAIL_TYPE_DRAG2,
200 s_name_attr.string_val = type->name;199 GEIS_GESTURE_TYPE_DRAG2,
201 if (instance->gesture_funcs &&200 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
202 instance->gesture_funcs->added)201 s_grail_drag_attrs
203 {202 },
204 instance->gesture_funcs->added (instance->gesture_cookie,203 {
205 type->type,204 GRAIL_TYPE_PINCH2,
206 0,205 GEIS_GESTURE_TYPE_PINCH2,
207 1, &s_name_attr);206 sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap),
208 }207 s_grail_pinch_attrs
209 }208 },
210 }209 {
211 else210 GRAIL_TYPE_ROTATE2,
212 {211 GEIS_GESTURE_TYPE_ROTATE2,
213 const char **gesture = NULL;212 sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap),
214 for (gesture = gesture_list; *gesture; ++gesture)213 s_grail_rotate_attrs
215 {214 },
216 const GrailTypeMap *type = s_grail_type_map;215 {
217 for (; type->name; ++type)216 GRAIL_TYPE_DRAG3,
218 {217 GEIS_GESTURE_TYPE_DRAG3,
219 if (strcmp(type->name, *gesture) == 0)218 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
220 {219 s_grail_drag_attrs
221 s_name_attr.string_val = type->name;220 },
222 if (instance->gesture_funcs && instance->gesture_funcs->added)221 {
223 {222 GRAIL_TYPE_PINCH3,
224 instance->gesture_funcs->added (instance->gesture_cookie,223 GEIS_GESTURE_TYPE_PINCH3,
225 type->type,224 sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap),
226 0,225 s_grail_pinch_attrs
227 1, &s_name_attr);226 },
228 }227 {
229228 GRAIL_TYPE_ROTATE3,
230 break;229 GEIS_GESTURE_TYPE_ROTATE3,
231 }230 sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap),
232 }231 s_grail_rotate_attrs
233 }232 },
234 }233 {
235}234 GRAIL_TYPE_DRAG4,
235 GEIS_GESTURE_TYPE_DRAG4,
236 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
237 s_grail_drag_attrs
238 },
239 {
240 GRAIL_TYPE_PINCH4,
241 GEIS_GESTURE_TYPE_PINCH4,
242 sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap),
243 s_grail_pinch_attrs
244 },
245 {
246 GRAIL_TYPE_ROTATE4,
247 GEIS_GESTURE_TYPE_ROTATE4,
248 sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap),
249 s_grail_rotate_attrs
250 },
251 {
252 GRAIL_TYPE_DRAG5,
253 GEIS_GESTURE_TYPE_DRAG5,
254 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
255 s_grail_drag_attrs
256 },
257 {
258 GRAIL_TYPE_PINCH5,
259 GEIS_GESTURE_TYPE_PINCH5,
260 sizeof(s_grail_pinch_attrs) / sizeof(GrailAttrMap),
261 s_grail_pinch_attrs
262 },
263 {
264 GRAIL_TYPE_ROTATE5,
265 GEIS_GESTURE_TYPE_ROTATE5,
266 sizeof(s_grail_rotate_attrs) / sizeof(GrailAttrMap),
267 s_grail_rotate_attrs
268 },
269 {
270 GRAIL_TYPE_TAP1,
271 GEIS_GESTURE_TYPE_TAP1,
272 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
273 s_grail_tap_attrs
274 },
275 {
276 GRAIL_TYPE_TAP2,
277 GEIS_GESTURE_TYPE_TAP2,
278 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
279 s_grail_tap_attrs
280 },
281 {
282 GRAIL_TYPE_TAP3,
283 GEIS_GESTURE_TYPE_TAP3,
284 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
285 s_grail_tap_attrs
286 },
287 {
288 GRAIL_TYPE_TAP4,
289 GEIS_GESTURE_TYPE_TAP4,
290 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
291 s_grail_tap_attrs
292 },
293 {
294 GRAIL_TYPE_TAP5,
295 GEIS_GESTURE_TYPE_TAP5,
296 sizeof(s_grail_tap_attrs) / sizeof(GrailAttrMap),
297 s_grail_tap_attrs
298 },
299 // special (undocumented) gestures available in Grail
300 {
301 GRAIL_TYPE_EDRAG,
302 "EDrag",
303 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
304 s_grail_drag_attrs
305 },
306 {
307 GRAIL_TYPE_EPINCH,
308 "EPinch",
309 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
310 s_grail_drag_attrs
311 },
312 {
313 GRAIL_TYPE_EROTATE,
314 "ERotate",
315 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
316 s_grail_drag_attrs
317 },
318 {
319 GRAIL_TYPE_MDRAG,
320 "MDrag",
321 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
322 s_grail_drag_attrs
323 },
324 {
325 GRAIL_TYPE_MPINCH,
326 "MPinch",
327 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
328 s_grail_drag_attrs
329 },
330 {
331 GRAIL_TYPE_MROTATE,
332 "MRotate",
333 sizeof(s_grail_drag_attrs) / sizeof(GrailAttrMap),
334 s_grail_drag_attrs
335 },
336 { 0, NULL, 0, NULL }
337};
338
339
340
341GeisGestureAttr s_name_attr[2] =
342{
343 { GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME, GEIS_ATTR_TYPE_STRING, 0 },
344 { GEIS_GESTURE_ATTRIBUTE_TOUCHES, GEIS_ATTR_TYPE_INTEGER, 0 }
345};
236346
237static GeisInteger347static GeisInteger
238geis_xcb_determine_gesture_type(int xcb_gesture_type)348geis_xcb_determine_primitive_type(int xcb_gesture_type)
239{349{
240 switch (xcb_gesture_type)350 switch (xcb_gesture_type)
241 {351 {
@@ -322,6 +432,75 @@
322 return 0;432 return 0;
323}433}
324434
435static const char *
436geis_xcb_get_gesture_type_primitive_name(GeisInteger gesture_type)
437{
438 GeisInteger primitive_type = geis_xcb_determine_primitive_type(gesture_type);
439 const GrailTypeMap *type = s_grail_type_map;
440 for (; type->name; ++type)
441 {
442 if (type->type == primitive_type)
443 {
444 return type->name;
445 }
446 }
447 return "unknown";
448}
449
450/**
451 * Dispatches gesture events to the instance's callback.
452 */
453static void
454geis_xcb_dispatch_gesture_type(GeisInstance instance,
455 const char **gesture_list)
456{
457 if (gesture_list == GEIS_ALL_GESTURES)
458 {
459 const GrailTypeMap *type = s_grail_type_map;
460 for (; type->name; ++type)
461 {
462 s_name_attr[0].string_val =
463 geis_xcb_get_gesture_type_primitive_name(type->type);
464 s_name_attr[1].integer_val = geis_xcb_determine_fingers(type->type);
465 if (instance->gesture_funcs && instance->gesture_funcs->added)
466 {
467 instance->gesture_funcs->added(instance->gesture_cookie,
468 type->type,
469 0,
470 sizeof(s_name_attr) / sizeof(GeisGestureAttr),
471 s_name_attr);
472 }
473 }
474 }
475 else
476 {
477 const char **gesture = NULL;
478 for (gesture = gesture_list; *gesture; ++gesture)
479 {
480 const GrailTypeMap *type = s_grail_type_map;
481 for (; type->name; ++type)
482 {
483 if (strcmp(type->name, *gesture) == 0)
484 {
485 s_name_attr[0].string_val =
486 geis_xcb_get_gesture_type_primitive_name(type->type);
487 s_name_attr[1].integer_val = geis_xcb_determine_fingers(type->type);
488 if (instance->gesture_funcs && instance->gesture_funcs->added)
489 {
490 instance->gesture_funcs->added(instance->gesture_cookie,
491 type->type,
492 0,
493 sizeof(s_name_attr) / sizeof(GeisGestureAttr),
494 s_name_attr);
495 }
496
497 break;
498 }
499 }
500 }
501 }
502}
503
325/**504/**
326 * Dispatches gesture events to the instance's callback.505 * Dispatches gesture events to the instance's callback.
327 */506 */
@@ -332,7 +511,7 @@
332 static const int num_standard_attrs = 9;511 static const int num_standard_attrs = 9;
333 int num_attrs = num_standard_attrs + event->num_props;512 int num_attrs = num_standard_attrs + event->num_props;
334 float *properties = NULL;513 float *properties = NULL;
335 GeisInteger gesture_type = geis_xcb_determine_gesture_type(event->gesture_type);514 GeisInteger gesture_type = geis_xcb_determine_primitive_type(event->gesture_type);
336515
337 GeisGestureAttr *attrs = calloc(num_attrs, sizeof(GeisGestureAttr));516 GeisGestureAttr *attrs = calloc(num_attrs, sizeof(GeisGestureAttr));
338 if (!attrs)517 if (!attrs)
@@ -362,7 +541,7 @@
362 attrs[6].type = GEIS_ATTR_TYPE_FLOAT;541 attrs[6].type = GEIS_ATTR_TYPE_FLOAT;
363 attrs[6].float_val = event->focus_y;542 attrs[6].float_val = event->focus_y;
364543
365 attrs[8].name = GEIS_GESTURE_ATTRIBUTE_FINGERS;544 attrs[8].name = GEIS_GESTURE_ATTRIBUTE_TOUCHES;
366 attrs[8].type = GEIS_ATTR_TYPE_INTEGER;545 attrs[8].type = GEIS_ATTR_TYPE_INTEGER;
367 attrs[8].integer_val = geis_xcb_determine_fingers(event->gesture_type);546 attrs[8].integer_val = geis_xcb_determine_fingers(event->gesture_type);
368547
@@ -442,82 +621,114 @@
442}621}
443622
444623
445/**624GeisXcb
446 * @param[in] win_info625geis_xcb_new(GeisXcbWinInfo *win_info)
447 */626{
448GeisXcb *627 GeisXcb xcb = calloc(1, sizeof(struct _GeisXcb));
449geis_xcb_get(GeisXcbWinInfo *win_info)628 if (!xcb)
450{629 {
451 if (!s_geis_xcb.connection)630 geis_error("error allocating GeisXcb");
452 {631 return NULL;
453 xcb_generic_error_t *error;632 }
454633
455 s_geis_xcb.win_info = win_info;634 xcb->win_info = win_info;
456 s_geis_xcb.connection = xcb_connect(win_info->display_name,635 xcb->display = XOpenDisplay(win_info->display_name);
457 win_info->screenp);636 if (!xcb->display)
458 if (!s_geis_xcb.connection)637 {
459 {638 geis_error("error opening X server.");
460 geis_debug("error connecting to X server.");639 goto error_exit;
461 return NULL;640 }
462 }641
463642 xcb->connection = XGetXCBConnection(xcb->display);
464#if 0643 if (!xcb->connection)
465 {644 {
466 char buffer[128];645 geis_error("error connecting to X server.");
467 xcb_input_get_extension_version_cookie_t input_version_cookie;646 goto error_exit;
468647 }
469 input_version_cookie = xcb_input_get_extension_version(s_geis_xcb.connection,648
470 127,649 {
471 buffer);650 xcb_gesture_query_version_cookie_t version_cookie;
472 }651 xcb_gesture_query_version_reply_t *version_reply = NULL;
473#endif652 xcb_generic_error_t *error = NULL;
474653
475 {654 version_cookie = xcb_gesture_query_version(xcb->connection,
476 xcb_gesture_query_version_cookie_t version_cookie;655 XCB_GESTURE_MAJOR_VERSION,
477 xcb_gesture_query_version_reply_t *version_reply = NULL;656 XCB_GESTURE_MINOR_VERSION);
478657 version_reply = xcb_gesture_query_version_reply(xcb->connection,
479 version_cookie = xcb_gesture_query_version(s_geis_xcb.connection,658 version_cookie,
480 XCB_GESTURE_MAJOR_VERSION,659 &error);
481 XCB_GESTURE_MINOR_VERSION);660 if (!version_reply)
482 version_reply = xcb_gesture_query_version_reply(s_geis_xcb.connection,661 {
483 version_cookie,662 geis_error("failed to receive gesture version reply\n");
484 &error);663 goto error_exit;
485 if (!version_reply)664 }
486 {665
487 geis_debug("failed to receive gesture version reply\n");666 if (version_reply->major_version != XCB_GESTURE_MAJOR_VERSION
488 return NULL;667 && version_reply->minor_version != XCB_GESTURE_MINOR_VERSION)
489 }668 {
490669 geis_error("server supports unrecognized version: %d.%d\n",
491 if (version_reply->major_version != XCB_GESTURE_MAJOR_VERSION670 version_reply->major_version, version_reply->minor_version);
492 && version_reply->minor_version != XCB_GESTURE_MINOR_VERSION)671 }
493 {672
494 geis_debug("server supports unrecognized version: %d.%d\n",673 free(version_reply);
495 version_reply->major_version, version_reply->minor_version);674 }
496 return NULL;675
497 }676
498677 xcb->fd = xcb_get_file_descriptor(xcb->connection);
499 free(version_reply);678 xcb->instance_table = geis_instance_table_new(1);
500 }679 if (!xcb->instance_table)
501680 {
502681 geis_error("error constructing instance table");
503 s_geis_xcb.fd = xcb_get_file_descriptor(s_geis_xcb.connection);682 goto error_exit;
504 }683 }
505684
506 return &s_geis_xcb;685 goto final_exit;
507}686
508687error_exit:
509688 free(xcb);
689
690final_exit:
691 return xcb;
692}
693
694
695/**
696 * Create a new GeisInstance for a windowId.
697 *
698 * @param[in] An X11 windowId.
699 */
700GeisInstance
701geis_xcb_create_instance(GeisXcb xcb, uint32_t window_id)
702{
703 GeisInstance instance = geis_instance_new(window_id);
704 if (!instance)
705 {
706 geis_error("failure to create GeisInstance");
707 }
708 else
709 {
710 geis_instance_table_add(xcb->instance_table, instance);
711 }
712 return instance;
713}
714
715
716/**
717 * Gets the file description on which events will appear.
718 */
510int719int
511geis_xcb_fd(GeisXcb *xcb)720geis_xcb_fd(GeisXcb xcb)
512{721{
513 return xcb->fd;722 return xcb->fd;
514}723}
515724
516725
726/**
727 * Dispatches events.
728 */
517void729void
518geis_xcb_dispatch(GeisInstance instance)730geis_xcb_dispatch(GeisXcb xcb)
519{731{
520 GeisXcb *xcb = instance->xcb;
521 if (xcb->connection)732 if (xcb->connection)
522 {733 {
523 const xcb_query_extension_reply_t *extension_info;734 const xcb_query_extension_reply_t *extension_info;
@@ -528,27 +739,37 @@
528 {739 {
529 xcb_gesture_notify_event_t *gesture_event = NULL;740 xcb_gesture_notify_event_t *gesture_event = NULL;
530 if (event->response_type != GenericEvent) {741 if (event->response_type != GenericEvent) {
531 geis_debug("warning: Received non-generic event type: %d\n",742 geis_warning("received non-generic event type: %d\n",
532 event->response_type);743 event->response_type);
533 continue;744 continue;
534 }745 }
535746
536 gesture_event = (xcb_gesture_notify_event_t*)event;747 gesture_event = (xcb_gesture_notify_event_t*)event;
537 if (gesture_event->extension != extension_info->major_opcode)748 if (gesture_event->extension != extension_info->major_opcode)
538 {749 {
539 geis_debug("warning: Received non-gesture extension event: %d\n",750 geis_warning("received non-gesture extension event: %d\n",
540 gesture_event->extension);751 gesture_event->extension);
541 continue;752 continue;
542 }753 }
543754
544 if (gesture_event->event_type != XCB_GESTURE_NOTIFY)755 if (gesture_event->event_type != XCB_GESTURE_NOTIFY)
545 {756 {
546 geis_debug("warning: Received unrecognized gesture event type: %d\n",757 geis_warning("received unrecognized gesture event type: %d\n",
547 gesture_event->event_type);758 gesture_event->event_type);
548 continue;759 continue;
549 }760 }
550761
551 geis_xcb_dispatch_gesture(instance, gesture_event);762 GeisInstance instance = geis_instance_table_get(xcb->instance_table,
763 gesture_event->event);
764 if (!instance)
765 {
766 geis_error("no instance found for window_id 0x%08x\n",
767 gesture_event->event);
768 }
769 else
770 {
771 geis_xcb_dispatch_gesture(instance, gesture_event);
772 }
552773
553 event = xcb_poll_for_event(xcb->connection);774 event = xcb_poll_for_event(xcb->connection);
554 }775 }
@@ -557,89 +778,183 @@
557778
558779
559void780void
560geis_xcb_free(GeisXcb* xcb)781geis_xcb_free(GeisXcb xcb)
561{782{
562 xcb_disconnect(xcb->connection);783 xcb_disconnect(xcb->connection);
784 XCloseDisplay(xcb->display);
785}
786
787
788static void
789geis_xcb_map_gestures_to_mask(const char **gesture_list,
790 uint32_t **gesture_mask,
791 uint32_t *gesture_mask_len)
792{
793 *gesture_mask_len = 1;
794 *gesture_mask = calloc(sizeof(uint32_t), *gesture_mask_len);
795 if (!gesture_mask)
796 return;
797
798 const char **g = gesture_list;
799 if (g == GEIS_ALL_GESTURES)
800 {
801 uint32_t all = 0xffffffff;
802 memcpy(*gesture_mask, &all, sizeof(uint32_t));
803 }
804 else
805 {
806 while (*g)
807 {
808 const GrailTypeMap *type = s_grail_type_map;
809 for (; type->name; ++type)
810 {
811 if (strcmp(type->name, *g) == 0)
812 {
813 if (type->type < 32)
814 {
815 **gesture_mask |= (1 << type->type);
816 }
817 break;
818 }
819 }
820 ++g;
821 }
822 }
823}
824
825
826static GeisStatus
827geis_xcb_verify_event_selection(GeisXcb xcb,
828 uint32_t window_id,
829 uint16_t device_id,
830 uint32_t mask_len,
831 uint32_t *mask)
832{
833 GeisStatus result = GEIS_UNKNOWN_ERROR;
834 xcb_generic_error_t *error;
835 xcb_gesture_get_selected_events_cookie_t events_cookie;
836 xcb_gesture_get_selected_events_reply_t *events_reply = NULL;
837 xcb_gesture_event_mask_iterator_t event_mask_it;
838 uint32_t mask_len_reply = 0;
839 uint32_t *mask_reply = NULL;
840 int device_is_found = 0;
841
842 events_cookie = xcb_gesture_get_selected_events(xcb->connection,
843 window_id);
844 events_reply = xcb_gesture_get_selected_events_reply(xcb->connection,
845 events_cookie,
846 &error);
847 if (!events_reply)
848 {
849 geis_error("failed to receive selected events reply\n");
850 goto really_done;
851 }
852
853 for (event_mask_it = xcb_gesture_get_selected_events_masks_iterator(events_reply);
854 event_mask_it.rem;
855 xcb_gesture_event_mask_next(&event_mask_it))
856 {
857 xcb_gesture_event_mask_t *event_mask = event_mask_it.data;
858 if (event_mask->device_id == device_id)
859 {
860 mask_len_reply = xcb_gesture_event_mask_mask_data_length(event_mask);
861 if (mask_len_reply != mask_len)
862 {
863 geis_error("incorrect mask length returned by server - expected %d, got %d\n",
864 mask_len, mask_len_reply);
865 goto done;
866 }
867
868 mask_reply = xcb_gesture_event_mask_mask_data(event_mask);
869 if (memcmp(mask, mask_reply, mask_len * 4) != 0)
870 {
871 geis_error("incorrect mask returned by server\n");
872 goto done;
873 }
874
875 device_is_found = 1;
876 }
877 }
878
879 if (!device_is_found)
880 {
881 geis_error("gesture mask for device %d not returned by server\n", device_id);
882 goto done;
883 }
884
885 result = GEIS_STATUS_SUCCESS;
886done:
887 free(events_reply);
888really_done:
889 return result;
563}890}
564891
565892
566GeisStatus893GeisStatus
567geis_xcb_subscribe(GeisInstance instance,894geis_xcb_subscribe(GeisXcb xcb,
895 GeisInstance instance,
896 uint16_t device_id,
568 const char **gesture_list)897 const char **gesture_list)
569{898{
570 uint16_t device_id = 0; //< temporary for dev testing899 GeisStatus result = GEIS_UNKNOWN_ERROR;
571 uint32_t mask_len = 1; //< temporary for dev testing900 uint32_t mask_len = 1;
572 uint32_t mask[] = { 0xffffffff }; //< temporary for dev testing901 uint32_t *mask = 0;
573902 const char **g;
574 xcb_generic_error_t *error;903 xcb_generic_error_t *error;
575 xcb_void_cookie_t select_cookie;904 xcb_void_cookie_t select_cookie;
576 GeisXcb *xcb = instance->xcb;905 xcb_window_t window_id = geis_instance_get_window_id(instance);
577906
578 geis_xcb_dispatch_gesture_type(instance, gesture_list);907 if (gesture_list == GEIS_ALL_GESTURES)
908 {
909 geis_debug("subscribing device %d for the all gestures\n", device_id);
910 }
911 else
912 {
913 geis_debug("subscribing device %d for the following gestures:\n", device_id);
914 for (g = gesture_list; *g; ++g)
915 {
916 geis_debug("\t\"%s\"\n", *g);
917 }
918 }
919
920 geis_xcb_map_gestures_to_mask(gesture_list, &mask, &mask_len);
921 if (!mask)
922 {
923 geis_error("failed to allocate mask\n");
924 goto really_done;
925 }
579926
580 select_cookie = xcb_gesture_select_events_checked(xcb->connection,927 select_cookie = xcb_gesture_select_events_checked(xcb->connection,
581 xcb->win_info->window_id,928 window_id,
582 device_id,929 device_id,
583 mask_len,930 mask_len,
584 mask);931 mask);
585 error = xcb_request_check(xcb->connection, select_cookie);932 error = xcb_request_check(xcb->connection, select_cookie);
586 if (error)933 if (error)
587 {934 {
588 geis_debug("failed to select events\n");935 geis_error("failed to select events for window 0x%08x\n", window_id);
589 return GEIS_UNKNOWN_ERROR;936 goto done;
590 }937 }
591938
939 result = geis_xcb_verify_event_selection(xcb, window_id, device_id, mask_len, mask);
940 if (result == GEIS_STATUS_SUCCESS)
592 {941 {
593 xcb_gesture_get_selected_events_cookie_t events_cookie;942 geis_xcb_dispatch_gesture_type(instance, gesture_list);
594 xcb_gesture_get_selected_events_reply_t *events_reply = NULL;
595 xcb_gesture_event_mask_iterator_t events_iterator;
596 unsigned masks_len_reply = 0;
597 unsigned mask_len_reply = 0;
598 uint32_t *mask_reply;
599
600 events_cookie = xcb_gesture_get_selected_events(xcb->connection,
601 xcb->win_info->window_id);
602 events_reply = xcb_gesture_get_selected_events_reply(xcb->connection,
603 events_cookie,
604 &error);
605 if (!events_reply)
606 {
607 geis_debug("failed to receive selected events reply\n");
608 return GEIS_UNKNOWN_ERROR;
609 }
610
611 masks_len_reply = xcb_gesture_get_selected_events_masks_length(events_reply);
612 if (masks_len_reply != 1)
613 {
614 geis_debug("wrong selected masks length returned: %d\n", masks_len_reply);
615 return GEIS_UNKNOWN_ERROR;
616 }
617
618 events_iterator = xcb_gesture_get_selected_events_masks_iterator(events_reply);
619 if (events_iterator.data->device_id != device_id)
620 {
621 geis_debug("incorrect device id returned by server: %d\n",
622 events_iterator.data->device_id);
623 return GEIS_UNKNOWN_ERROR;
624 }
625
626 mask_len_reply = xcb_gesture_event_mask_mask_data_length(events_iterator.data);
627 if (mask_len_reply != mask_len)
628 {
629 geis_debug("incorrect mask length returned by server: %d\n",
630 mask_len_reply);
631 return GEIS_UNKNOWN_ERROR;
632 }
633
634 mask_reply = xcb_gesture_event_mask_mask_data(events_iterator.data);
635 if (memcmp(mask, mask_reply, mask_len * 4) != 0)
636 {
637 geis_debug("incorrect mask returned by server\n");
638 return GEIS_UNKNOWN_ERROR;
639 }
640
641 free(events_reply);
642 }943 }
643944
945done:
946 free(mask);
947really_done:
948 return result;
949}
950
951
952GeisStatus
953geis_xcb_input_devices(GeisXcb xcb, GeisInputFuncs *funcs, void *cookie)
954{
955 xcb->input_funcs = funcs;
956 xcb->input_cookie = cookie;
644 return GEIS_STATUS_SUCCESS;957 return GEIS_STATUS_SUCCESS;
645}958}
959
960
646961
=== modified file 'libutouch-geis-xcb/geis_xcb.h'
--- libutouch-geis-xcb/geis_xcb.h 2010-08-11 13:54:54 +0000
+++ libutouch-geis-xcb/geis_xcb.h 2010-09-16 16:28:52 +0000
@@ -4,18 +4,18 @@
4 * Copyright 2010 Canonical Ltd.4 * Copyright 2010 Canonical Ltd.
5 *5 *
6 * This library is free software; you can redistribute it and/or modify it under6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free Software7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Foundation; either version 3 of the License, or (at your option) any later8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * version.9 * later version.
10 *10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * more details.14 * details.
15 *15 *
16 * You should have received a copy of the GNU Lesser General Public License16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software17 * along with this program; if not, write to the Free Software Foundation, Inc.,
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */19 */
20#ifndef GEIS_XCB_H_20#ifndef GEIS_XCB_H_
21#define GEIS_XCB_H_21#define GEIS_XCB_H_
@@ -23,17 +23,25 @@
23#include "geis_config.h"23#include "geis_config.h"
24#include <geis/geis.h>24#include <geis/geis.h>
2525
26typedef struct _GeisXcb GeisXcb;26typedef struct _GeisXcb *GeisXcb;
2727
28GeisXcb *geis_xcb_get(GeisXcbWinInfo *win_info);28GeisXcb geis_xcb_new(GeisXcbWinInfo *win_info);
2929
30GeisStatus geis_xcb_subscribe(GeisInstance instance,30GeisInstance geis_xcb_create_instance(GeisXcb xcb, uint32_t window_id);
31
32GeisStatus geis_xcb_input_devices(GeisXcb xcb,
33 GeisInputFuncs *funcs,
34 void *cookie);
35
36GeisStatus geis_xcb_subscribe(GeisXcb xcb,
37 GeisInstance instance,
38 uint16_t device_id,
31 const char **gesture_list);39 const char **gesture_list);
3240
33int geis_xcb_fd(GeisXcb* xcb);41int geis_xcb_fd(GeisXcb xcb);
3442
35void geis_xcb_dispatch(GeisInstance instance);43void geis_xcb_dispatch(GeisXcb xcb);
3644
37void geis_xcb_free(GeisXcb *xcb);45void geis_xcb_free(GeisXcb xcb);
3846
39#endif /* GEIS_XCB_H_ */47#endif /* GEIS_XCB_H_ */
4048
=== modified file 'testsuite/Makefile.in'
--- testsuite/Makefile.in 2010-08-20 22:03:52 +0000
+++ testsuite/Makefile.in 2010-09-16 16:28:52 +0000
@@ -158,11 +158,15 @@
158SHELL = @SHELL@158SHELL = @SHELL@
159STRIP = @STRIP@159STRIP = @STRIP@
160VERSION = @VERSION@160VERSION = @VERSION@
161X11XCB_CFLAGS = @X11XCB_CFLAGS@
162X11XCB_LIBS = @X11XCB_LIBS@
161XCBINCLUDEDIR = @XCBINCLUDEDIR@163XCBINCLUDEDIR = @XCBINCLUDEDIR@
162XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@164XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
163XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@165XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
164XCB_CFLAGS = @XCB_CFLAGS@166XCB_CFLAGS = @XCB_CFLAGS@
165XCB_LIBS = @XCB_LIBS@167XCB_LIBS = @XCB_LIBS@
168XI2_CFLAGS = @XI2_CFLAGS@
169XI2_LIBS = @XI2_LIBS@
166abs_builddir = @abs_builddir@170abs_builddir = @abs_builddir@
167abs_srcdir = @abs_srcdir@171abs_srcdir = @abs_srcdir@
168abs_top_builddir = @abs_top_builddir@172abs_top_builddir = @abs_top_builddir@
169173
=== modified file 'testsuite/geistest/Makefile.in'
--- testsuite/geistest/Makefile.in 2010-08-20 22:03:52 +0000
+++ testsuite/geistest/Makefile.in 2010-09-16 16:28:52 +0000
@@ -141,11 +141,15 @@
141SHELL = @SHELL@141SHELL = @SHELL@
142STRIP = @STRIP@142STRIP = @STRIP@
143VERSION = @VERSION@143VERSION = @VERSION@
144X11XCB_CFLAGS = @X11XCB_CFLAGS@
145X11XCB_LIBS = @X11XCB_LIBS@
144XCBINCLUDEDIR = @XCBINCLUDEDIR@146XCBINCLUDEDIR = @XCBINCLUDEDIR@
145XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@147XCBPROTO_XCBINCLUDEDIR = @XCBPROTO_XCBINCLUDEDIR@
146XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@148XCBPROTO_XCBPYTHONDIR = @XCBPROTO_XCBPYTHONDIR@
147XCB_CFLAGS = @XCB_CFLAGS@149XCB_CFLAGS = @XCB_CFLAGS@
148XCB_LIBS = @XCB_LIBS@150XCB_LIBS = @XCB_LIBS@
151XI2_CFLAGS = @XI2_CFLAGS@
152XI2_LIBS = @XI2_LIBS@
149abs_builddir = @abs_builddir@153abs_builddir = @abs_builddir@
150abs_srcdir = @abs_srcdir@154abs_srcdir = @abs_srcdir@
151abs_top_builddir = @abs_top_builddir@155abs_top_builddir = @abs_top_builddir@
152156
=== modified file 'testsuite/geistest/geistest.c'
--- testsuite/geistest/geistest.c 2010-08-11 13:54:54 +0000
+++ testsuite/geistest/geistest.c 2010-09-16 16:28:52 +0000
@@ -23,6 +23,8 @@
23#include <stdlib.h>23#include <stdlib.h>
24#include <string.h>24#include <string.h>
25#include <sys/select.h>25#include <sys/select.h>
26#include <unistd.h>
27#include <xcb/xcb.h>
2628
2729
28static void30static void
@@ -51,6 +53,24 @@
5153
5254
53static void55static void
56input_device_added(void *cookie, GeisInputDeviceId device_id, void *attrs)
57{
58}
59
60
61static void
62input_device_changed(void *cookie, GeisInputDeviceId device_id, void *attrs)
63{
64}
65
66
67static void
68input_device_removed(void *cookie, GeisInputDeviceId device_id, void *attrs)
69{
70}
71
72
73static void
54gesture_added(void *cookie,74gesture_added(void *cookie,
55 GeisGestureType gesture_type,75 GeisGestureType gesture_type,
56 GeisGestureId gesture_id,76 GeisGestureId gesture_id,
@@ -116,6 +136,12 @@
116}136}
117137
118138
139GeisInputFuncs input_funcs = {
140 input_device_added,
141 input_device_changed,
142 input_device_removed
143};
144
119GeisGestureFuncs gesture_funcs = {145GeisGestureFuncs gesture_funcs = {
120 gesture_added,146 gesture_added,
121 gesture_removed,147 gesture_removed,
@@ -128,22 +154,33 @@
128int154int
129parse_opts(int argc, char* argv[], uint32_t *window_id)155parse_opts(int argc, char* argv[], uint32_t *window_id)
130{156{
131 if (argc != 2)157 int opt;
132 return 0;158
133159 while ((opt = getopt(argc, argv, "w:")) != -1)
134 *window_id = strtol(argv[1], NULL, 0);160 {
161 switch (opt)
162 {
163 case 'w':
164 *window_id = strtol(optarg, NULL, 0);
165 break;
166
167 default:
168 return 0;
169 }
170 }
171
135 return 1;172 return 1;
136}173}
137174
138175
139int176static GeisInstance
140main(int argc, char* argv[])177subscribe_window(uint32_t window_id)
141{178{
142 GeisStatus status = GEIS_UNKNOWN_ERROR;179 GeisStatus status = GEIS_UNKNOWN_ERROR;
143 GeisXcbWinInfo xcb_win_info = {180 GeisXcbWinInfo xcb_win_info = {
144 .display_name = NULL,181 .display_name = NULL,
145 .screenp = NULL,182 .screenp = NULL,
146 .window_id = 0x296183 .window_id = window_id
147 };184 };
148 GeisWinInfo win_info = {185 GeisWinInfo win_info = {
149 GEIS_XCB_FULL_WINDOW,186 GEIS_XCB_FULL_WINDOW,
@@ -151,32 +188,18 @@
151 };188 };
152 GeisInstance instance;189 GeisInstance instance;
153190
154 if (!parse_opts(argc, argv, &xcb_win_info.window_id))
155 {
156 fprintf(stderr, "usage: %s windowid\n", argv[0]);
157 return -1;
158 }
159
160 status = geis_init(&win_info, &instance);191 status = geis_init(&win_info, &instance);
161 if (status != GEIS_STATUS_SUCCESS)192 if (status != GEIS_STATUS_SUCCESS)
162 {193 {
163 fprintf(stderr, "error in geis_init\n");194 fprintf(stderr, "error in geis_init\n");
164 return 1;195 return NULL;
165 }196 }
166197
167 status = geis_configuration_supported(instance, GEIS_CONFIG_UNIX_FD);198 status = geis_input_devices(instance, &input_funcs, NULL);
168 if (status != GEIS_STATUS_SUCCESS)199 if (status != GEIS_STATUS_SUCCESS)
169 {200 {
170 fprintf(stderr, "GEIS does not support Unix fd\n");201 fprintf(stderr, "error subscribing to input devices\n");
171 return 1;202 return NULL;
172 }
173
174 int fd = -1;
175 status = geis_configuration_get_value(instance, GEIS_CONFIG_UNIX_FD, &fd);
176 if (status != GEIS_STATUS_SUCCESS)
177 {
178 fprintf(stderr, "error retrieving GEIS fd\n");
179 return 1;
180 }203 }
181204
182 status = geis_subscribe(instance,205 status = geis_subscribe(instance,
@@ -187,7 +210,155 @@
187 if (status != GEIS_STATUS_SUCCESS)210 if (status != GEIS_STATUS_SUCCESS)
188 {211 {
189 fprintf(stderr, "error subscribing to gestures\n");212 fprintf(stderr, "error subscribing to gestures\n");
190 return 1;213 return NULL;
214 }
215
216 return instance;
217}
218
219
220static size_t
221subscribe_windows_preorder(xcb_connection_t *xcb,
222 xcb_window_t window,
223 size_t instance_table_size,
224 GeisInstance **instance_table)
225{
226 ++instance_table_size;
227 GeisInstance *new_instance_table;
228 new_instance_table = realloc(*instance_table,
229 instance_table_size * sizeof(GeisInstance));
230 new_instance_table[instance_table_size-1] = subscribe_window(window);
231 if (!new_instance_table[instance_table_size-1])
232 {
233 fprintf(stderr, "error creating geis instance for window 0x%08x\n", window);
234 free(new_instance_table);
235 instance_table_size = 0;
236 goto error_exit;
237 }
238
239 xcb_generic_error_t *error;
240 xcb_query_tree_cookie_t tree_cookie = xcb_query_tree(xcb, window);
241 xcb_query_tree_reply_t *tree_reply = xcb_query_tree_reply(xcb,
242 tree_cookie,
243 &error);
244 if (!tree_reply)
245 {
246 fprintf(stderr, "failed to query tree for window 0x%x\n", window);
247 goto error_exit;
248 }
249
250 int num_children = xcb_query_tree_children_length(tree_reply);
251 if (num_children <= 0)
252 goto tree_exit;
253
254 xcb_window_t *children = xcb_query_tree_children(tree_reply);
255 if (!children)
256 {
257 fprintf(stderr, "failed to retrieve children of window 0x%x\n", window);
258 goto tree_exit;
259 }
260
261 int i;
262 for (i = 0; i < num_children; i++)
263 {
264 instance_table_size = subscribe_windows_preorder(xcb,
265 children[i],
266 instance_table_size,
267 &new_instance_table);
268 if (instance_table_size == 0)
269 break;
270 }
271
272tree_exit:
273 free(tree_reply);
274error_exit:
275 *instance_table = new_instance_table;
276 return instance_table_size;
277}
278
279
280static size_t
281subscribe_all_windows(GeisInstance **instance_table)
282{
283 int instance_table_size = 0;
284
285 xcb_connection_t *xcb = xcb_connect(NULL, NULL);
286 if (!xcb) {
287 fprintf(stderr, "error connecting to X server\n");
288 return -1;
289 }
290
291 const xcb_setup_t *setup = xcb_get_setup(xcb);
292 if (!setup)
293 {
294 fprintf(stderr, "error getting xcb setup\n");
295 return -1;
296 }
297
298 xcb_screen_iterator_t screen = xcb_setup_roots_iterator(setup);
299 while (screen.rem)
300 {
301 instance_table_size = subscribe_windows_preorder(xcb,
302 screen.data->root,
303 instance_table_size,
304 instance_table);
305
306 xcb_screen_next(&screen);
307 }
308
309 xcb_disconnect(xcb);
310 return instance_table_size;
311}
312
313int
314main(int argc, char* argv[])
315{
316 int result = -1;
317 uint32_t window_id = 0;
318 int fd = -1;
319 GeisStatus status = GEIS_UNKNOWN_ERROR;
320 GeisInstance *instance_table = NULL;
321 size_t instance_table_size = 0;
322
323 if (!parse_opts(argc, argv, &window_id))
324 {
325 fprintf(stderr, "usage: %s windowid\n", argv[0]);
326 return -1;
327 }
328
329 if (window_id != 0)
330 {
331 instance_table_size = 1;
332 instance_table = calloc(instance_table_size, sizeof(GeisInstance));
333 instance_table[0] = subscribe_window(window_id);
334 if (!instance_table[0])
335 {
336 fprintf(stderr, "can not continue, exiting....\n");
337 goto error_exit;
338 }
339 }
340 else
341 {
342 instance_table_size = subscribe_all_windows(&instance_table);
343 if (instance_table_size == 0)
344 {
345 fprintf(stderr, "can not continue, exiting....\n");
346 goto error_exit;
347 }
348 }
349
350 status = geis_configuration_supported(instance_table[0], GEIS_CONFIG_UNIX_FD);
351 if (status != GEIS_STATUS_SUCCESS)
352 {
353 fprintf(stderr, "GEIS does not support Unix fd\n");
354 goto fail_exit;
355 }
356
357 status = geis_configuration_get_value(instance_table[0], GEIS_CONFIG_UNIX_FD, &fd);
358 if (status != GEIS_STATUS_SUCCESS)
359 {
360 fprintf(stderr, "error retrieving GEIS fd\n");
361 goto fail_exit;
191 }362 }
192363
193 while(1)364 while(1)
@@ -204,10 +375,24 @@
204375
205 if (FD_ISSET(fd, &read_fds))376 if (FD_ISSET(fd, &read_fds))
206 {377 {
207 geis_event_dispatch(instance);378 geis_event_dispatch(instance_table[0]);
208 }379 }
209 }380 }
210381
211 geis_finish(instance);382fail_exit:
383 {
384 int i;
385 for (i = 0; i < instance_table_size; ++i)
386 {
387 geis_finish(instance_table[i]);
388 }
389 }
390
391error_exit:
392 if (instance_table_size > 0)
393 {
394 free(instance_table);
395 }
396 return result;
212}397}
213398

Subscribers

People subscribed via source and target branches