Merge lp:~dandrader/frame/release_2.4.3-0ubuntu1 into lp:frame/ubuntu
- release_2.4.3-0ubuntu1
- Merge into ubuntu
Proposed by
Daniel d'Andrada
Status: | Merged |
---|---|
Approved by: | Stephen M. Webb |
Approved revision: | 86 |
Merged at revision: | 86 |
Proposed branch: | lp:~dandrader/frame/release_2.4.3-0ubuntu1 |
Merge into: | lp:frame/ubuntu |
Diff against target: |
2035 lines (+1137/-190) 35 files modified
INSTALL (+2/-2) Makefile.in (+2/-2) aclocal.m4 (+3/-3) config-aux/ltmain.sh (+2/-2) configure (+18/-124) configure.ac (+1/-4) debian/changelog (+7/-2) debian/libframe6.symbols (+35/-0) doc/Makefile.in (+1/-1) include/oif/frame.h (+1/-0) include/oif/frame_backend.h (+291/-0) src/Makefile.am (+1/-2) src/Makefile.in (+3/-4) src/device.cpp (+93/-6) src/device.h (+7/-1) src/event.cpp (+37/-0) src/event.h (+1/-0) src/frame.cpp (+142/-17) src/frame.h (+12/-3) src/libframe.ver (+39/-0) src/touch.cpp (+96/-0) src/touch.h (+19/-3) src/window.h (+1/-1) src/x11/device_x11.cpp (+0/-3) src/x11/window_x11.cpp (+2/-2) test/Makefile.in (+1/-1) test/gtest/Makefile.in (+1/-1) test/integration/Makefile.in (+1/-1) test/regular/Makefile.am (+1/-0) test/regular/Makefile.in (+18/-1) test/regular/backend.cpp (+289/-0) test/regular/frame-fixture.cpp (+6/-0) test/x11_mocks/Makefile.in (+1/-1) tools/Makefile.in (+1/-1) tools/frame-test-x11.1 (+2/-2) |
To merge this branch: | bzr merge lp:~dandrader/frame/release_2.4.3-0ubuntu1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb (community) | Approve | ||
Review via email: mp+133514@code.launchpad.net |
Commit message
Description of the change
Release 2.4.3-0ubuntu1
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'INSTALL' | |||
2 | --- INSTALL 2012-07-26 18:35:10 +0000 | |||
3 | +++ INSTALL 2012-11-08 16:29:22 +0000 | |||
4 | @@ -1,7 +1,7 @@ | |||
5 | 1 | frame - Touch Frame Library | 1 | frame - Touch Frame Library |
6 | 2 | 2 | ||
9 | 3 | To build, you need to have the autoconf, libtool, libevemu-dev | 3 | To build, you need to have the autoconf, libtool, and x11 developer |
10 | 4 | and mtdev-dev packages installed. Then, do | 4 | packages installed. Then, do |
11 | 5 | 5 | ||
12 | 6 | ./autogen.sh | 6 | ./autogen.sh |
13 | 7 | ./configure | 7 | ./configure |
14 | 8 | 8 | ||
15 | === modified file 'Makefile.in' | |||
16 | --- Makefile.in 2012-07-26 18:35:10 +0000 | |||
17 | +++ Makefile.in 2012-11-08 16:29:22 +0000 | |||
18 | @@ -1,4 +1,4 @@ | |||
20 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
21 | 2 | # @configure_input@ | 2 | # @configure_input@ |
22 | 3 | 3 | ||
23 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
24 | @@ -691,7 +691,7 @@ | |||
25 | 691 | *.zip*) \ | 691 | *.zip*) \ |
26 | 692 | unzip $(distdir).zip ;;\ | 692 | unzip $(distdir).zip ;;\ |
27 | 693 | esac | 693 | esac |
29 | 694 | chmod -R a-w $(distdir); chmod a+w $(distdir) | 694 | chmod -R a-w $(distdir); chmod u+w $(distdir) |
30 | 695 | mkdir $(distdir)/_build | 695 | mkdir $(distdir)/_build |
31 | 696 | mkdir $(distdir)/_inst | 696 | mkdir $(distdir)/_inst |
32 | 697 | chmod a-w $(distdir) | 697 | chmod a-w $(distdir) |
33 | 698 | 698 | ||
34 | === modified file 'aclocal.m4' | |||
35 | --- aclocal.m4 2012-07-26 18:35:10 +0000 | |||
36 | +++ aclocal.m4 2012-11-08 16:29:22 +0000 | |||
37 | @@ -1,4 +1,4 @@ | |||
39 | 1 | # generated automatically by aclocal 1.11.5 -*- Autoconf -*- | 1 | # generated automatically by aclocal 1.11.6 -*- Autoconf -*- |
40 | 2 | 2 | ||
41 | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
42 | 4 | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, | 4 | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, |
43 | @@ -38,7 +38,7 @@ | |||
44 | 38 | [am__api_version='1.11' | 38 | [am__api_version='1.11' |
45 | 39 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | 39 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
46 | 40 | dnl require some minimum version. Point them to the right macro. | 40 | dnl require some minimum version. Point them to the right macro. |
48 | 41 | m4_if([$1], [1.11.5], [], | 41 | m4_if([$1], [1.11.6], [], |
49 | 42 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | 42 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
50 | 43 | ]) | 43 | ]) |
51 | 44 | 44 | ||
52 | @@ -54,7 +54,7 @@ | |||
53 | 54 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | 54 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
54 | 55 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | 55 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
55 | 56 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | 56 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
57 | 57 | [AM_AUTOMAKE_VERSION([1.11.5])dnl | 57 | [AM_AUTOMAKE_VERSION([1.11.6])dnl |
58 | 58 | m4_ifndef([AC_AUTOCONF_VERSION], | 58 | m4_ifndef([AC_AUTOCONF_VERSION], |
59 | 59 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 59 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
60 | 60 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | 60 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
61 | 61 | 61 | ||
62 | === modified file 'config-aux/ltmain.sh' | |||
63 | --- config-aux/ltmain.sh 2012-01-30 22:35:59 +0000 | |||
64 | +++ config-aux/ltmain.sh 2012-11-08 16:29:22 +0000 | |||
65 | @@ -70,7 +70,7 @@ | |||
66 | 70 | # compiler: $LTCC | 70 | # compiler: $LTCC |
67 | 71 | # compiler flags: $LTCFLAGS | 71 | # compiler flags: $LTCFLAGS |
68 | 72 | # linker: $LD (gnu? $with_gnu_ld) | 72 | # linker: $LD (gnu? $with_gnu_ld) |
70 | 73 | # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 | 73 | # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu2 |
71 | 74 | # automake: $automake_version | 74 | # automake: $automake_version |
72 | 75 | # autoconf: $autoconf_version | 75 | # autoconf: $autoconf_version |
73 | 76 | # | 76 | # |
74 | @@ -80,7 +80,7 @@ | |||
75 | 80 | 80 | ||
76 | 81 | PROGRAM=libtool | 81 | PROGRAM=libtool |
77 | 82 | PACKAGE=libtool | 82 | PACKAGE=libtool |
79 | 83 | VERSION="2.4.2 Debian-2.4.2-1ubuntu1" | 83 | VERSION="2.4.2 Debian-2.4.2-1ubuntu2" |
80 | 84 | TIMESTAMP="" | 84 | TIMESTAMP="" |
81 | 85 | package_revision=1.3337 | 85 | package_revision=1.3337 |
82 | 86 | 86 | ||
83 | 87 | 87 | ||
84 | === modified file 'configure' | |||
85 | --- configure 2012-07-26 18:43:01 +0000 | |||
86 | +++ configure 2012-11-08 16:29:22 +0000 | |||
87 | @@ -1,6 +1,6 @@ | |||
88 | 1 | #! /bin/sh | 1 | #! /bin/sh |
89 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
91 | 3 | # Generated by GNU Autoconf 2.69 for Touch Frame Library 2.2.4. | 3 | # Generated by GNU Autoconf 2.69 for Touch Frame Library 2.4.3. |
92 | 4 | # | 4 | # |
93 | 5 | # | 5 | # |
94 | 6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | 6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
95 | @@ -587,8 +587,8 @@ | |||
96 | 587 | # Identity of this package. | 587 | # Identity of this package. |
97 | 588 | PACKAGE_NAME='Touch Frame Library' | 588 | PACKAGE_NAME='Touch Frame Library' |
98 | 589 | PACKAGE_TARNAME='frame' | 589 | PACKAGE_TARNAME='frame' |
101 | 590 | PACKAGE_VERSION='2.2.4' | 590 | PACKAGE_VERSION='2.4.3' |
102 | 591 | PACKAGE_STRING='Touch Frame Library 2.2.4' | 591 | PACKAGE_STRING='Touch Frame Library 2.4.3' |
103 | 592 | PACKAGE_BUGREPORT='' | 592 | PACKAGE_BUGREPORT='' |
104 | 593 | PACKAGE_URL='' | 593 | PACKAGE_URL='' |
105 | 594 | 594 | ||
106 | @@ -670,6 +670,8 @@ | |||
107 | 670 | BASE_CXXFLAGS | 670 | BASE_CXXFLAGS |
108 | 671 | XORG_GTEST_CPPFLAGS | 671 | XORG_GTEST_CPPFLAGS |
109 | 672 | XORG_GTEST_SOURCE | 672 | XORG_GTEST_SOURCE |
110 | 673 | EVEMU_LIBS | ||
111 | 674 | EVEMU_CFLAGS | ||
112 | 673 | X11_LIBS | 675 | X11_LIBS |
113 | 674 | X11_CFLAGS | 676 | X11_CFLAGS |
114 | 675 | HAVE_GTEST_FALSE | 677 | HAVE_GTEST_FALSE |
115 | @@ -682,10 +684,6 @@ | |||
116 | 682 | ASCIIDOC | 684 | ASCIIDOC |
117 | 683 | XINPUT_LIBS | 685 | XINPUT_LIBS |
118 | 684 | XINPUT_CFLAGS | 686 | XINPUT_CFLAGS |
119 | 685 | HAVE_EVEMU_FALSE | ||
120 | 686 | HAVE_EVEMU_TRUE | ||
121 | 687 | EVEMU_LIBS | ||
122 | 688 | EVEMU_CFLAGS | ||
123 | 689 | PKG_CONFIG_LIBDIR | 687 | PKG_CONFIG_LIBDIR |
124 | 690 | PKG_CONFIG_PATH | 688 | PKG_CONFIG_PATH |
125 | 691 | PKG_CONFIG | 689 | PKG_CONFIG |
126 | @@ -849,12 +847,12 @@ | |||
127 | 849 | PKG_CONFIG | 847 | PKG_CONFIG |
128 | 850 | PKG_CONFIG_PATH | 848 | PKG_CONFIG_PATH |
129 | 851 | PKG_CONFIG_LIBDIR | 849 | PKG_CONFIG_LIBDIR |
130 | 852 | EVEMU_CFLAGS | ||
131 | 853 | EVEMU_LIBS | ||
132 | 854 | XINPUT_CFLAGS | 850 | XINPUT_CFLAGS |
133 | 855 | XINPUT_LIBS | 851 | XINPUT_LIBS |
134 | 856 | X11_CFLAGS | 852 | X11_CFLAGS |
136 | 857 | X11_LIBS' | 853 | X11_LIBS |
137 | 854 | EVEMU_CFLAGS | ||
138 | 855 | EVEMU_LIBS' | ||
139 | 858 | 856 | ||
140 | 859 | 857 | ||
141 | 860 | # Initialize some variables set by options. | 858 | # Initialize some variables set by options. |
142 | @@ -1395,7 +1393,7 @@ | |||
143 | 1395 | # Omit some internal or obsolete options to make the list less imposing. | 1393 | # Omit some internal or obsolete options to make the list less imposing. |
144 | 1396 | # This message is too long to be a string in the A/UX 3.1 sh. | 1394 | # This message is too long to be a string in the A/UX 3.1 sh. |
145 | 1397 | cat <<_ACEOF | 1395 | cat <<_ACEOF |
147 | 1398 | \`configure' configures Touch Frame Library 2.2.4 to adapt to many kinds of systems. | 1396 | \`configure' configures Touch Frame Library 2.4.3 to adapt to many kinds of systems. |
148 | 1399 | 1397 | ||
149 | 1400 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1398 | Usage: $0 [OPTION]... [VAR=VALUE]... |
150 | 1401 | 1399 | ||
151 | @@ -1465,7 +1463,7 @@ | |||
152 | 1465 | 1463 | ||
153 | 1466 | if test -n "$ac_init_help"; then | 1464 | if test -n "$ac_init_help"; then |
154 | 1467 | case $ac_init_help in | 1465 | case $ac_init_help in |
156 | 1468 | short | recursive ) echo "Configuration of Touch Frame Library 2.2.4:";; | 1466 | short | recursive ) echo "Configuration of Touch Frame Library 2.4.3:";; |
157 | 1469 | esac | 1467 | esac |
158 | 1470 | cat <<\_ACEOF | 1468 | cat <<\_ACEOF |
159 | 1471 | 1469 | ||
160 | @@ -1528,14 +1526,14 @@ | |||
161 | 1528 | directories to add to pkg-config's search path | 1526 | directories to add to pkg-config's search path |
162 | 1529 | PKG_CONFIG_LIBDIR | 1527 | PKG_CONFIG_LIBDIR |
163 | 1530 | path overriding pkg-config's built-in search path | 1528 | path overriding pkg-config's built-in search path |
164 | 1531 | EVEMU_CFLAGS | ||
165 | 1532 | C compiler flags for EVEMU, overriding pkg-config | ||
166 | 1533 | EVEMU_LIBS linker flags for EVEMU, overriding pkg-config | ||
167 | 1534 | XINPUT_CFLAGS | 1529 | XINPUT_CFLAGS |
168 | 1535 | C compiler flags for XINPUT, overriding pkg-config | 1530 | C compiler flags for XINPUT, overriding pkg-config |
169 | 1536 | XINPUT_LIBS linker flags for XINPUT, overriding pkg-config | 1531 | XINPUT_LIBS linker flags for XINPUT, overriding pkg-config |
170 | 1537 | X11_CFLAGS C compiler flags for X11, overriding pkg-config | 1532 | X11_CFLAGS C compiler flags for X11, overriding pkg-config |
171 | 1538 | X11_LIBS linker flags for X11, overriding pkg-config | 1533 | X11_LIBS linker flags for X11, overriding pkg-config |
172 | 1534 | EVEMU_CFLAGS | ||
173 | 1535 | C compiler flags for EVEMU, overriding pkg-config | ||
174 | 1536 | EVEMU_LIBS linker flags for EVEMU, overriding pkg-config | ||
175 | 1539 | 1537 | ||
176 | 1540 | Use these variables to override the choices made by `configure' or to help | 1538 | Use these variables to override the choices made by `configure' or to help |
177 | 1541 | it to find libraries and programs with nonstandard names/locations. | 1539 | it to find libraries and programs with nonstandard names/locations. |
178 | @@ -1603,7 +1601,7 @@ | |||
179 | 1603 | test -n "$ac_init_help" && exit $ac_status | 1601 | test -n "$ac_init_help" && exit $ac_status |
180 | 1604 | if $ac_init_version; then | 1602 | if $ac_init_version; then |
181 | 1605 | cat <<\_ACEOF | 1603 | cat <<\_ACEOF |
183 | 1606 | Touch Frame Library configure 2.2.4 | 1604 | Touch Frame Library configure 2.4.3 |
184 | 1607 | generated by GNU Autoconf 2.69 | 1605 | generated by GNU Autoconf 2.69 |
185 | 1608 | 1606 | ||
186 | 1609 | Copyright (C) 2012 Free Software Foundation, Inc. | 1607 | Copyright (C) 2012 Free Software Foundation, Inc. |
187 | @@ -2048,7 +2046,7 @@ | |||
188 | 2048 | This file contains any messages produced by compilers while | 2046 | This file contains any messages produced by compilers while |
189 | 2049 | running configure, to aid debugging if configure makes a mistake. | 2047 | running configure, to aid debugging if configure makes a mistake. |
190 | 2050 | 2048 | ||
192 | 2051 | It was created by Touch Frame Library $as_me 2.2.4, which was | 2049 | It was created by Touch Frame Library $as_me 2.4.3, which was |
193 | 2052 | generated by GNU Autoconf 2.69. Invocation command line was | 2050 | generated by GNU Autoconf 2.69. Invocation command line was |
194 | 2053 | 2051 | ||
195 | 2054 | $ $0 $@ | 2052 | $ $0 $@ |
196 | @@ -2869,7 +2867,7 @@ | |||
197 | 2869 | 2867 | ||
198 | 2870 | # Define the identity of the package. | 2868 | # Define the identity of the package. |
199 | 2871 | PACKAGE='frame' | 2869 | PACKAGE='frame' |
201 | 2872 | VERSION='2.2.4' | 2870 | VERSION='2.4.3' |
202 | 2873 | 2871 | ||
203 | 2874 | 2872 | ||
204 | 2875 | cat >>confdefs.h <<_ACEOF | 2873 | cat >>confdefs.h <<_ACEOF |
205 | @@ -15946,106 +15944,6 @@ | |||
206 | 15946 | fi | 15944 | fi |
207 | 15947 | 15945 | ||
208 | 15948 | pkg_failed=no | 15946 | pkg_failed=no |
209 | 15949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVEMU" >&5 | ||
210 | 15950 | $as_echo_n "checking for EVEMU... " >&6; } | ||
211 | 15951 | |||
212 | 15952 | if test -n "$EVEMU_CFLAGS"; then | ||
213 | 15953 | pkg_cv_EVEMU_CFLAGS="$EVEMU_CFLAGS" | ||
214 | 15954 | elif test -n "$PKG_CONFIG"; then | ||
215 | 15955 | if test -n "$PKG_CONFIG" && \ | ||
216 | 15956 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evemu >= 1.0.5\""; } >&5 | ||
217 | 15957 | ($PKG_CONFIG --exists --print-errors "evemu >= 1.0.5") 2>&5 | ||
218 | 15958 | ac_status=$? | ||
219 | 15959 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
220 | 15960 | test $ac_status = 0; }; then | ||
221 | 15961 | pkg_cv_EVEMU_CFLAGS=`$PKG_CONFIG --cflags "evemu >= 1.0.5" 2>/dev/null` | ||
222 | 15962 | test "x$?" != "x0" && pkg_failed=yes | ||
223 | 15963 | else | ||
224 | 15964 | pkg_failed=yes | ||
225 | 15965 | fi | ||
226 | 15966 | else | ||
227 | 15967 | pkg_failed=untried | ||
228 | 15968 | fi | ||
229 | 15969 | if test -n "$EVEMU_LIBS"; then | ||
230 | 15970 | pkg_cv_EVEMU_LIBS="$EVEMU_LIBS" | ||
231 | 15971 | elif test -n "$PKG_CONFIG"; then | ||
232 | 15972 | if test -n "$PKG_CONFIG" && \ | ||
233 | 15973 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evemu >= 1.0.5\""; } >&5 | ||
234 | 15974 | ($PKG_CONFIG --exists --print-errors "evemu >= 1.0.5") 2>&5 | ||
235 | 15975 | ac_status=$? | ||
236 | 15976 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
237 | 15977 | test $ac_status = 0; }; then | ||
238 | 15978 | pkg_cv_EVEMU_LIBS=`$PKG_CONFIG --libs "evemu >= 1.0.5" 2>/dev/null` | ||
239 | 15979 | test "x$?" != "x0" && pkg_failed=yes | ||
240 | 15980 | else | ||
241 | 15981 | pkg_failed=yes | ||
242 | 15982 | fi | ||
243 | 15983 | else | ||
244 | 15984 | pkg_failed=untried | ||
245 | 15985 | fi | ||
246 | 15986 | |||
247 | 15987 | |||
248 | 15988 | |||
249 | 15989 | if test $pkg_failed = yes; then | ||
250 | 15990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
251 | 15991 | $as_echo "no" >&6; } | ||
252 | 15992 | |||
253 | 15993 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
254 | 15994 | _pkg_short_errors_supported=yes | ||
255 | 15995 | else | ||
256 | 15996 | _pkg_short_errors_supported=no | ||
257 | 15997 | fi | ||
258 | 15998 | if test $_pkg_short_errors_supported = yes; then | ||
259 | 15999 | EVEMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "evemu >= 1.0.5" 2>&1` | ||
260 | 16000 | else | ||
261 | 16001 | EVEMU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "evemu >= 1.0.5" 2>&1` | ||
262 | 16002 | fi | ||
263 | 16003 | # Put the nasty error message in config.log where it belongs | ||
264 | 16004 | echo "$EVEMU_PKG_ERRORS" >&5 | ||
265 | 16005 | |||
266 | 16006 | as_fn_error $? "Package requirements (evemu >= 1.0.5) were not met: | ||
267 | 16007 | |||
268 | 16008 | $EVEMU_PKG_ERRORS | ||
269 | 16009 | |||
270 | 16010 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
271 | 16011 | installed software in a non-standard prefix. | ||
272 | 16012 | |||
273 | 16013 | Alternatively, you may set the environment variables EVEMU_CFLAGS | ||
274 | 16014 | and EVEMU_LIBS to avoid the need to call pkg-config. | ||
275 | 16015 | See the pkg-config man page for more details." "$LINENO" 5 | ||
276 | 16016 | elif test $pkg_failed = untried; then | ||
277 | 16017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
278 | 16018 | $as_echo "no" >&6; } | ||
279 | 16019 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | ||
280 | 16020 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | ||
281 | 16021 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | ||
282 | 16022 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
283 | 16023 | path to pkg-config. | ||
284 | 16024 | |||
285 | 16025 | Alternatively, you may set the environment variables EVEMU_CFLAGS | ||
286 | 16026 | and EVEMU_LIBS to avoid the need to call pkg-config. | ||
287 | 16027 | See the pkg-config man page for more details. | ||
288 | 16028 | |||
289 | 16029 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | ||
290 | 16030 | See \`config.log' for more details" "$LINENO" 5; } | ||
291 | 16031 | else | ||
292 | 16032 | EVEMU_CFLAGS=$pkg_cv_EVEMU_CFLAGS | ||
293 | 16033 | EVEMU_LIBS=$pkg_cv_EVEMU_LIBS | ||
294 | 16034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
295 | 16035 | $as_echo "yes" >&6; } | ||
296 | 16036 | have_evemu=yes | ||
297 | 16037 | fi | ||
298 | 16038 | if test "x$have_evemu" = xyes; then | ||
299 | 16039 | HAVE_EVEMU_TRUE= | ||
300 | 16040 | HAVE_EVEMU_FALSE='#' | ||
301 | 16041 | else | ||
302 | 16042 | HAVE_EVEMU_TRUE='#' | ||
303 | 16043 | HAVE_EVEMU_FALSE= | ||
304 | 16044 | fi | ||
305 | 16045 | |||
306 | 16046 | |||
307 | 16047 | |||
308 | 16048 | pkg_failed=no | ||
309 | 16049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT" >&5 | 15947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT" >&5 |
310 | 16050 | $as_echo_n "checking for XINPUT... " >&6; } | 15948 | $as_echo_n "checking for XINPUT... " >&6; } |
311 | 16051 | 15949 | ||
312 | @@ -22245,10 +22143,6 @@ | |||
313 | 22245 | as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. | 22143 | as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. |
314 | 22246 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 22144 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
315 | 22247 | fi | 22145 | fi |
316 | 22248 | if test -z "${HAVE_EVEMU_TRUE}" && test -z "${HAVE_EVEMU_FALSE}"; then | ||
317 | 22249 | as_fn_error $? "conditional \"HAVE_EVEMU\" was never defined. | ||
318 | 22250 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
319 | 22251 | fi | ||
320 | 22252 | if test -z "${HAVE_DOCTOOLS_TRUE}" && test -z "${HAVE_DOCTOOLS_FALSE}"; then | 22146 | if test -z "${HAVE_DOCTOOLS_TRUE}" && test -z "${HAVE_DOCTOOLS_FALSE}"; then |
321 | 22253 | as_fn_error $? "conditional \"HAVE_DOCTOOLS\" was never defined. | 22147 | as_fn_error $? "conditional \"HAVE_DOCTOOLS\" was never defined. |
322 | 22254 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 22148 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
323 | @@ -22662,7 +22556,7 @@ | |||
324 | 22662 | # report actual input values of CONFIG_FILES etc. instead of their | 22556 | # report actual input values of CONFIG_FILES etc. instead of their |
325 | 22663 | # values after options handling. | 22557 | # values after options handling. |
326 | 22664 | ac_log=" | 22558 | ac_log=" |
328 | 22665 | This file was extended by Touch Frame Library $as_me 2.2.4, which was | 22559 | This file was extended by Touch Frame Library $as_me 2.4.3, which was |
329 | 22666 | generated by GNU Autoconf 2.69. Invocation command line was | 22560 | generated by GNU Autoconf 2.69. Invocation command line was |
330 | 22667 | 22561 | ||
331 | 22668 | CONFIG_FILES = $CONFIG_FILES | 22562 | CONFIG_FILES = $CONFIG_FILES |
332 | @@ -22728,7 +22622,7 @@ | |||
333 | 22728 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 22622 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
334 | 22729 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 22623 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
335 | 22730 | ac_cs_version="\\ | 22624 | ac_cs_version="\\ |
337 | 22731 | Touch Frame Library config.status 2.2.4 | 22625 | Touch Frame Library config.status 2.4.3 |
338 | 22732 | configured by $0, generated by GNU Autoconf 2.69, | 22626 | configured by $0, generated by GNU Autoconf 2.69, |
339 | 22733 | with options \\"\$ac_cs_config\\" | 22627 | with options \\"\$ac_cs_config\\" |
340 | 22734 | 22628 | ||
341 | 22735 | 22629 | ||
342 | === modified file 'configure.ac' | |||
343 | --- configure.ac 2012-07-26 18:35:10 +0000 | |||
344 | +++ configure.ac 2012-11-08 16:29:22 +0000 | |||
345 | @@ -1,7 +1,7 @@ | |||
346 | 1 | # Initialize Autoconf | 1 | # Initialize Autoconf |
347 | 2 | AC_PREREQ([2.60]) | 2 | AC_PREREQ([2.60]) |
348 | 3 | AC_INIT([Touch Frame Library], | 3 | AC_INIT([Touch Frame Library], |
350 | 4 | [2.2.4], | 4 | [2.4.3], |
351 | 5 | [], | 5 | [], |
352 | 6 | [frame]) | 6 | [frame]) |
353 | 7 | AC_CONFIG_SRCDIR([Makefile.am]) | 7 | AC_CONFIG_SRCDIR([Makefile.am]) |
354 | @@ -25,9 +25,6 @@ | |||
355 | 25 | AC_PROG_CXX | 25 | AC_PROG_CXX |
356 | 26 | AC_PROG_INSTALL | 26 | AC_PROG_INSTALL |
357 | 27 | 27 | ||
358 | 28 | PKG_CHECK_MODULES([EVEMU], [evemu >= 1.0.5], [have_evemu=yes]) | ||
359 | 29 | AM_CONDITIONAL([HAVE_EVEMU], [test "x$have_evemu" = xyes]) | ||
360 | 30 | |||
361 | 31 | PKG_CHECK_MODULES(XINPUT, x11 xext xorg-server [xi >= 1.5.99.1] [inputproto >= 2.1.99.6]) | 28 | PKG_CHECK_MODULES(XINPUT, x11 xext xorg-server [xi >= 1.5.99.1] [inputproto >= 2.1.99.6]) |
362 | 32 | 29 | ||
363 | 33 | AC_CHECK_PROG([ASCIIDOC], [a2x], [a2x]) | 30 | AC_CHECK_PROG([ASCIIDOC], [a2x], [a2x]) |
364 | 34 | 31 | ||
365 | === modified file 'debian/changelog' | |||
366 | --- debian/changelog 2012-08-29 21:32:21 +0000 | |||
367 | +++ debian/changelog 2012-11-08 16:29:22 +0000 | |||
368 | @@ -1,9 +1,14 @@ | |||
370 | 1 | frame (2.2.4-0ubuntu2) UNRELEASED; urgency=low | 1 | frame (2.4.3-0ubuntu1) raring; urgency=low |
371 | 2 | 2 | ||
372 | 3 | [ Chase Douglas ] | ||
373 | 3 | * Remove patches, both have been merged upstream | 4 | * Remove patches, both have been merged upstream |
374 | 4 | * Replace wrong "Multi-arch" with correct "Multi-Arch" in debian/control | 5 | * Replace wrong "Multi-arch" with correct "Multi-Arch" in debian/control |
375 | 5 | 6 | ||
377 | 6 | -- Chase Douglas <chase.douglas@ubuntu.com> Wed, 29 Aug 2012 21:31:11 +0000 | 7 | [ Daniel d'Andrada ] |
378 | 8 | * New upstream release. | ||
379 | 9 | * Updated libframe6.symbols with the new symbols from version 2.4 | ||
380 | 10 | |||
381 | 11 | -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 08 Nov 2012 14:14:13 -0200 | ||
382 | 7 | 12 | ||
383 | 8 | frame (2.2.4-0ubuntu1) quantal; urgency=low | 13 | frame (2.2.4-0ubuntu1) quantal; urgency=low |
384 | 9 | 14 | ||
385 | 10 | 15 | ||
386 | === modified file 'debian/libframe6.symbols' | |||
387 | --- debian/libframe6.symbols 2012-07-26 18:56:37 +0000 | |||
388 | +++ debian/libframe6.symbols 2012-11-08 16:29:22 +0000 | |||
389 | @@ -1,9 +1,39 @@ | |||
390 | 1 | libframe.so.6 libframe6 #MINVER# | 1 | libframe.so.6 libframe6 #MINVER# |
391 | 2 | FRAME_2.2@FRAME_2.2 2.2.0 | 2 | FRAME_2.2@FRAME_2.2 2.2.0 |
392 | 3 | FRAME_2.4@FRAME_2.4 2.4.3 | ||
393 | 3 | frame_axis_get_maximum@FRAME_2.2 2.2.4 | 4 | frame_axis_get_maximum@FRAME_2.2 2.2.4 |
394 | 4 | frame_axis_get_minimum@FRAME_2.2 2.2.4 | 5 | frame_axis_get_minimum@FRAME_2.2 2.2.4 |
395 | 5 | frame_axis_get_resolution@FRAME_2.2 2.2.4 | 6 | frame_axis_get_resolution@FRAME_2.2 2.2.4 |
396 | 6 | frame_axis_get_type@FRAME_2.2 2.2.4 | 7 | frame_axis_get_type@FRAME_2.2 2.2.4 |
397 | 8 | frame_backend_device_add_axis@FRAME_2.4 2.4.3 | ||
398 | 9 | frame_backend_device_delete@FRAME_2.4 2.4.3 | ||
399 | 10 | frame_backend_device_get_device@FRAME_2.4 2.4.3 | ||
400 | 11 | frame_backend_device_new@FRAME_2.4 2.4.3 | ||
401 | 12 | frame_backend_device_set_direct@FRAME_2.4 2.4.3 | ||
402 | 13 | frame_backend_device_set_independent@FRAME_2.4 2.4.3 | ||
403 | 14 | frame_backend_device_set_max_touches@FRAME_2.4 2.4.3 | ||
404 | 15 | frame_backend_device_set_name@FRAME_2.4 2.4.3 | ||
405 | 16 | frame_backend_device_set_semi_mt@FRAME_2.4 2.4.3 | ||
406 | 17 | frame_backend_device_set_window_resolution@FRAME_2.4 2.4.3 | ||
407 | 18 | frame_backend_frame_borrow_touch_by_id@FRAME_2.4 2.4.3 | ||
408 | 19 | frame_backend_frame_create_next@FRAME_2.4 2.4.3 | ||
409 | 20 | frame_backend_frame_delete@FRAME_2.4 2.4.3 | ||
410 | 21 | frame_backend_frame_get_frame@FRAME_2.4 2.4.3 | ||
411 | 22 | frame_backend_frame_give_touch@FRAME_2.4 2.4.3 | ||
412 | 23 | frame_backend_frame_new@FRAME_2.4 2.4.3 | ||
413 | 24 | frame_backend_frame_set_active_touches@FRAME_2.4 2.4.3 | ||
414 | 25 | frame_backend_frame_set_device@FRAME_2.4 2.4.3 | ||
415 | 26 | frame_backend_frame_set_window_id@FRAME_2.4 2.4.3 | ||
416 | 27 | frame_backend_touch_get_touch@FRAME_2.4 2.4.3 | ||
417 | 28 | frame_backend_touch_new@FRAME_2.4 2.4.3 | ||
418 | 29 | frame_backend_touch_set_ended@FRAME_2.4 2.4.3 | ||
419 | 30 | frame_backend_touch_set_id@FRAME_2.4 2.4.3 | ||
420 | 31 | frame_backend_touch_set_owned@FRAME_2.4 2.4.3 | ||
421 | 32 | frame_backend_touch_set_pending_end@FRAME_2.4 2.4.3 | ||
422 | 33 | frame_backend_touch_set_start_time@FRAME_2.4 2.4.3 | ||
423 | 34 | frame_backend_touch_set_time@FRAME_2.4 2.4.3 | ||
424 | 35 | frame_backend_touch_set_value@FRAME_2.4 2.4.3 | ||
425 | 36 | frame_backend_touch_set_window_pos@FRAME_2.4 2.4.3 | ||
426 | 7 | frame_device_get_axis_by_index@FRAME_2.2 2.2.4 | 37 | frame_device_get_axis_by_index@FRAME_2.2 2.2.4 |
427 | 8 | frame_device_get_axis_by_type@FRAME_2.2 2.2.4 | 38 | frame_device_get_axis_by_type@FRAME_2.2 2.2.4 |
428 | 9 | frame_device_get_num_axes@FRAME_2.2 2.2.4 | 39 | frame_device_get_num_axes@FRAME_2.2 2.2.4 |
429 | @@ -20,7 +50,12 @@ | |||
430 | 20 | frame_event_get_property_uint64_@FRAME_2.2 2.2.4 | 50 | frame_event_get_property_uint64_@FRAME_2.2 2.2.4 |
431 | 21 | frame_event_get_time@FRAME_2.2 2.2.4 | 51 | frame_event_get_time@FRAME_2.2 2.2.4 |
432 | 22 | frame_event_get_type@FRAME_2.2 2.2.4 | 52 | frame_event_get_type@FRAME_2.2 2.2.4 |
433 | 53 | frame_event_new@FRAME_2.4 2.4.3 | ||
434 | 23 | frame_event_ref@FRAME_2.2 2.2.4 | 54 | frame_event_ref@FRAME_2.2 2.2.4 |
435 | 55 | frame_event_set_device@FRAME_2.4 2.4.3 | ||
436 | 56 | frame_event_set_frame@FRAME_2.4 2.4.3 | ||
437 | 57 | frame_event_set_time@FRAME_2.4 2.4.3 | ||
438 | 58 | frame_event_set_type@FRAME_2.4 2.4.3 | ||
439 | 24 | frame_event_unref@FRAME_2.2 2.2.4 | 59 | frame_event_unref@FRAME_2.2 2.2.4 |
440 | 25 | frame_frame_get_device@FRAME_2.2 2.2.4 | 60 | frame_frame_get_device@FRAME_2.2 2.2.4 |
441 | 26 | frame_frame_get_num_touches@FRAME_2.2 2.2.4 | 61 | frame_frame_get_num_touches@FRAME_2.2 2.2.4 |
442 | 27 | 62 | ||
443 | === modified file 'doc/Makefile.in' | |||
444 | --- doc/Makefile.in 2012-07-26 18:35:10 +0000 | |||
445 | +++ doc/Makefile.in 2012-11-08 16:29:22 +0000 | |||
446 | @@ -1,4 +1,4 @@ | |||
448 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
449 | 2 | # @configure_input@ | 2 | # @configure_input@ |
450 | 3 | 3 | ||
451 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
452 | 5 | 5 | ||
453 | === modified file 'include/oif/frame.h' | |||
454 | --- include/oif/frame.h 2012-07-24 21:36:05 +0000 | |||
455 | +++ include/oif/frame.h 2012-11-08 16:29:22 +0000 | |||
456 | @@ -89,6 +89,7 @@ | |||
457 | 89 | UFStatusErrorInvalidType, /**< The variable type passed as a void pointer into | 89 | UFStatusErrorInvalidType, /**< The variable type passed as a void pointer into |
458 | 90 | a property getter is invalid for the property | 90 | a property getter is invalid for the property |
459 | 91 | */ | 91 | */ |
460 | 92 | UFStatusErrorTouchIdExists, /**< A touch with the same ID already exists */ | ||
461 | 92 | } UFStatus; | 93 | } UFStatus; |
462 | 93 | 94 | ||
463 | 94 | /** Properties of a device */ | 95 | /** Properties of a device */ |
464 | 95 | 96 | ||
465 | === added file 'include/oif/frame_backend.h' | |||
466 | --- include/oif/frame_backend.h 1970-01-01 00:00:00 +0000 | |||
467 | +++ include/oif/frame_backend.h 2012-11-08 16:29:22 +0000 | |||
468 | @@ -0,0 +1,291 @@ | |||
469 | 1 | /** | ||
470 | 2 | * @file oif/frame_backend.h | ||
471 | 3 | * API for creating objects. | ||
472 | 4 | */ | ||
473 | 5 | |||
474 | 6 | #ifndef FRAME_OIF_FRAME_BACKEND_H_ | ||
475 | 7 | #define FRAME_OIF_FRAME_BACKEND_H_ | ||
476 | 8 | |||
477 | 9 | /* front end definitions */ | ||
478 | 10 | #include <oif/frame.h> | ||
479 | 11 | |||
480 | 12 | #ifdef __cplusplus | ||
481 | 13 | extern "C" { | ||
482 | 14 | #endif | ||
483 | 15 | |||
484 | 16 | /** Handle for a device to be used on the backend API */ | ||
485 | 17 | typedef struct UFBackendDevice_* UFBackendDevice; | ||
486 | 18 | |||
487 | 19 | /** Handle for a frame to be used on the backend API */ | ||
488 | 20 | typedef struct UFBackendFrame_* UFBackendFrame; | ||
489 | 21 | |||
490 | 22 | /** Handle for a touch to be used on the backend API */ | ||
491 | 23 | typedef struct UFBackendTouch_* UFBackendTouch; | ||
492 | 24 | |||
493 | 25 | /******************************************************************** | ||
494 | 26 | * Event | ||
495 | 27 | ********************************************************************/ | ||
496 | 28 | |||
497 | 29 | /** | ||
498 | 30 | * Creates a new event with a reference count of one. | ||
499 | 31 | */ | ||
500 | 32 | FRAME_PUBLIC | ||
501 | 33 | UFEvent frame_event_new(); | ||
502 | 34 | |||
503 | 35 | /** | ||
504 | 36 | * Sets the type of the given event | ||
505 | 37 | */ | ||
506 | 38 | FRAME_PUBLIC | ||
507 | 39 | void frame_event_set_type(UFEvent event, UFEventType type); | ||
508 | 40 | |||
509 | 41 | /** | ||
510 | 42 | * Sets the device property of the given event | ||
511 | 43 | * | ||
512 | 44 | * It increases the reference count of the corresponding UFDevice by one. | ||
513 | 45 | */ | ||
514 | 46 | FRAME_PUBLIC | ||
515 | 47 | void frame_event_set_device(UFEvent event, UFBackendDevice device); | ||
516 | 48 | |||
517 | 49 | /** | ||
518 | 50 | * Sets the frame property of the given event | ||
519 | 51 | * | ||
520 | 52 | * It increases the reference count of the corresponding UFFrame by one. | ||
521 | 53 | */ | ||
522 | 54 | FRAME_PUBLIC | ||
523 | 55 | void frame_event_set_frame(UFEvent event, UFBackendFrame frame); | ||
524 | 56 | |||
525 | 57 | /** | ||
526 | 58 | * Sets the time of the given event | ||
527 | 59 | */ | ||
528 | 60 | FRAME_PUBLIC | ||
529 | 61 | void frame_event_set_time(UFEvent event, uint64_t time); | ||
530 | 62 | |||
531 | 63 | /******************************************************************** | ||
532 | 64 | * Device | ||
533 | 65 | ********************************************************************/ | ||
534 | 66 | |||
535 | 67 | /** | ||
536 | 68 | * Creates a new UFDevice and returns its backend handle. | ||
537 | 69 | */ | ||
538 | 70 | FRAME_PUBLIC | ||
539 | 71 | UFBackendDevice frame_backend_device_new(); | ||
540 | 72 | |||
541 | 73 | /** | ||
542 | 74 | * Returns a UFDevice instance given its backend handle. | ||
543 | 75 | */ | ||
544 | 76 | FRAME_PUBLIC | ||
545 | 77 | UFDevice frame_backend_device_get_device(UFBackendDevice device); | ||
546 | 78 | |||
547 | 79 | /** | ||
548 | 80 | * Sets the "Name" property of the given device | ||
549 | 81 | */ | ||
550 | 82 | FRAME_PUBLIC | ||
551 | 83 | void frame_backend_device_set_name(UFBackendDevice device, const char *name); | ||
552 | 84 | |||
553 | 85 | /** | ||
554 | 86 | * Sets the "Direct" property of the given device | ||
555 | 87 | */ | ||
556 | 88 | FRAME_PUBLIC | ||
557 | 89 | void frame_backend_device_set_direct(UFBackendDevice device, int direct); | ||
558 | 90 | |||
559 | 91 | /** | ||
560 | 92 | * Sets the "Independent" property of the given device | ||
561 | 93 | */ | ||
562 | 94 | FRAME_PUBLIC | ||
563 | 95 | void frame_backend_device_set_independent(UFBackendDevice device, int independent); | ||
564 | 96 | |||
565 | 97 | /** | ||
566 | 98 | * Sets the "SemiMT" property of the given device | ||
567 | 99 | */ | ||
568 | 100 | FRAME_PUBLIC | ||
569 | 101 | void frame_backend_device_set_semi_mt(UFBackendDevice device, int semi_mt); | ||
570 | 102 | |||
571 | 103 | /** | ||
572 | 104 | * Sets the "MaxTouches" property of the given device | ||
573 | 105 | */ | ||
574 | 106 | FRAME_PUBLIC | ||
575 | 107 | void frame_backend_device_set_max_touches(UFBackendDevice device, unsigned int max_touches); | ||
576 | 108 | |||
577 | 109 | /** | ||
578 | 110 | * Sets the "WindowResolutionX" and "WindowResolutionY" properties of the | ||
579 | 111 | * given device. | ||
580 | 112 | */ | ||
581 | 113 | FRAME_PUBLIC | ||
582 | 114 | void frame_backend_device_set_window_resolution(UFBackendDevice device, float x, float y); | ||
583 | 115 | |||
584 | 116 | /** | ||
585 | 117 | * Adds an axis to the device | ||
586 | 118 | */ | ||
587 | 119 | FRAME_PUBLIC | ||
588 | 120 | void frame_backend_device_add_axis(UFBackendDevice device, | ||
589 | 121 | UFAxisType type, | ||
590 | 122 | float min, float max, float resolution); | ||
591 | 123 | |||
592 | 124 | /** | ||
593 | 125 | * Deletes the backend handle of a UFDevice, decreasing its reference count by one. | ||
594 | 126 | */ | ||
595 | 127 | FRAME_PUBLIC | ||
596 | 128 | void frame_backend_device_delete(UFBackendDevice device); | ||
597 | 129 | |||
598 | 130 | /******************************************************************** | ||
599 | 131 | * Frame | ||
600 | 132 | ********************************************************************/ | ||
601 | 133 | |||
602 | 134 | /** | ||
603 | 135 | * Creates a new, empty, UFFrame and returns its backend handle. | ||
604 | 136 | * | ||
605 | 137 | * Usually you will use this method only for the very first frame. For all | ||
606 | 138 | * subsequent ones it will be safer and more convinent to use | ||
607 | 139 | * frame_backend_frame_create_next(). | ||
608 | 140 | */ | ||
609 | 141 | FRAME_PUBLIC | ||
610 | 142 | UFBackendFrame frame_backend_frame_new(); | ||
611 | 143 | |||
612 | 144 | /** | ||
613 | 145 | * Creates a new UFFrame that is a continuation of the given one. | ||
614 | 146 | * | ||
615 | 147 | * Touches that had a "begin" state on the given frame will be hard-copied and | ||
616 | 148 | * have an "update" state on the new frame. | ||
617 | 149 | * | ||
618 | 150 | * Touches that had an "update" state will be lazily copied to the new frame. | ||
619 | 151 | * | ||
620 | 152 | * Touches that had a "end" state on the given frame won't be present | ||
621 | 153 | * on the new frame. | ||
622 | 154 | */ | ||
623 | 155 | FRAME_PUBLIC | ||
624 | 156 | UFBackendFrame frame_backend_frame_create_next(UFBackendFrame frame); | ||
625 | 157 | |||
626 | 158 | /** | ||
627 | 159 | * Returns a UFFrame instance given its backend handle. | ||
628 | 160 | */ | ||
629 | 161 | FRAME_PUBLIC | ||
630 | 162 | UFFrame frame_backend_frame_get_frame(UFBackendFrame frame); | ||
631 | 163 | |||
632 | 164 | /** | ||
633 | 165 | * Gets a UFBackendTouch for the UFTouch that has the given id. | ||
634 | 166 | * | ||
635 | 167 | * The underlying UFTouch is moved from the given frame to the returned UFBackendTouch. | ||
636 | 168 | * Once done modifying the touch you're expected to return it to the frame via | ||
637 | 169 | * frame_backend_frame_give_touch(). | ||
638 | 170 | * | ||
639 | 171 | * If the underlying UFTouch is a lazy copy (likely from a touch in the previous frame), a hard copy | ||
640 | 172 | * will be made upon the first change made to it. | ||
641 | 173 | * | ||
642 | 174 | * Possible errors: UFStatusErrorInvalidTouch | ||
643 | 175 | */ | ||
644 | 176 | FRAME_PUBLIC | ||
645 | 177 | UFStatus frame_backend_frame_borrow_touch_by_id(UFBackendFrame frame, | ||
646 | 178 | UFTouchId id, | ||
647 | 179 | UFBackendTouch *touch); | ||
648 | 180 | |||
649 | 181 | /** | ||
650 | 182 | * Sets the "Device" property of the given frame | ||
651 | 183 | */ | ||
652 | 184 | FRAME_PUBLIC | ||
653 | 185 | void frame_backend_frame_set_device(UFBackendFrame frame, UFBackendDevice device); | ||
654 | 186 | |||
655 | 187 | /** | ||
656 | 188 | * Sets the "WindowId" property of the given frame | ||
657 | 189 | */ | ||
658 | 190 | FRAME_PUBLIC | ||
659 | 191 | void frame_backend_frame_set_window_id(UFBackendFrame frame, UFWindowId window_id); | ||
660 | 192 | |||
661 | 193 | /** | ||
662 | 194 | * Sets the "ActiveTouches" property of the given frame | ||
663 | 195 | * | ||
664 | 196 | * If unset this property returns the number of touches. | ||
665 | 197 | */ | ||
666 | 198 | FRAME_PUBLIC | ||
667 | 199 | void frame_backend_frame_set_active_touches(UFBackendFrame frame, unsigned int active_touches); | ||
668 | 200 | |||
669 | 201 | /** | ||
670 | 202 | * Gives a UFTouch to the specified frame. | ||
671 | 203 | * | ||
672 | 204 | * Gives the underlying UFTouch to the specified frame. The UFBackendTouch | ||
673 | 205 | * is deleted and no longer valid after this call. | ||
674 | 206 | * | ||
675 | 207 | * Possible errors: UFStatusErrorTouchIdExists | ||
676 | 208 | */ | ||
677 | 209 | FRAME_PUBLIC | ||
678 | 210 | UFStatus frame_backend_frame_give_touch(UFBackendFrame frame, UFBackendTouch *touch); | ||
679 | 211 | |||
680 | 212 | /** | ||
681 | 213 | * Deletes the backend handle of a UFFrame, | ||
682 | 214 | * decreasing its reference count by one. | ||
683 | 215 | */ | ||
684 | 216 | FRAME_PUBLIC | ||
685 | 217 | void frame_backend_frame_delete(UFBackendFrame frame); | ||
686 | 218 | |||
687 | 219 | /******************************************************************** | ||
688 | 220 | * Touch | ||
689 | 221 | ********************************************************************/ | ||
690 | 222 | |||
691 | 223 | /** | ||
692 | 224 | * Creates a new UFTouch and returns its backend handle. | ||
693 | 225 | * | ||
694 | 226 | * Its state will be set to "Begin". | ||
695 | 227 | * | ||
696 | 228 | * After filled out, it should be given to a frame via frame_backend_frame_give_touch() | ||
697 | 229 | */ | ||
698 | 230 | FRAME_PUBLIC | ||
699 | 231 | UFBackendTouch frame_backend_touch_new(); | ||
700 | 232 | |||
701 | 233 | /** | ||
702 | 234 | * Returns a UFTouch instance given its backend handle. | ||
703 | 235 | */ | ||
704 | 236 | FRAME_PUBLIC | ||
705 | 237 | UFTouch frame_backend_touch_get_touch(UFBackendTouch touch); | ||
706 | 238 | |||
707 | 239 | /** | ||
708 | 240 | * Sets the "Id" property of the given touch | ||
709 | 241 | */ | ||
710 | 242 | FRAME_PUBLIC | ||
711 | 243 | void frame_backend_touch_set_id(UFBackendTouch touch, UFTouchId id); | ||
712 | 244 | |||
713 | 245 | /** | ||
714 | 246 | * Sets the "State" property of the given touch to "End" | ||
715 | 247 | */ | ||
716 | 248 | FRAME_PUBLIC | ||
717 | 249 | void frame_backend_touch_set_ended(UFBackendTouch touch); | ||
718 | 250 | |||
719 | 251 | /** | ||
720 | 252 | * Sets the "WindowX" and "WindowY" properties of the given touch | ||
721 | 253 | */ | ||
722 | 254 | FRAME_PUBLIC | ||
723 | 255 | void frame_backend_touch_set_window_pos(UFBackendTouch touch, float x, float y); | ||
724 | 256 | |||
725 | 257 | /** | ||
726 | 258 | * Sets the "Time" property of the given touch | ||
727 | 259 | */ | ||
728 | 260 | FRAME_PUBLIC | ||
729 | 261 | void frame_backend_touch_set_time(UFBackendTouch touch, uint64_t time); | ||
730 | 262 | |||
731 | 263 | /** | ||
732 | 264 | * Sets the "StartTime" property of the given touch | ||
733 | 265 | */ | ||
734 | 266 | FRAME_PUBLIC | ||
735 | 267 | void frame_backend_touch_set_start_time(UFBackendTouch touch, uint64_t start_time); | ||
736 | 268 | |||
737 | 269 | /** | ||
738 | 270 | * Sets the "Owned" property of the given touch | ||
739 | 271 | */ | ||
740 | 272 | FRAME_PUBLIC | ||
741 | 273 | void frame_backend_touch_set_owned(UFBackendTouch touch, int owned); | ||
742 | 274 | |||
743 | 275 | /** | ||
744 | 276 | * Sets the "PendingEnd" property of the given touch | ||
745 | 277 | */ | ||
746 | 278 | FRAME_PUBLIC | ||
747 | 279 | void frame_backend_touch_set_pending_end(UFBackendTouch touch, int pending_end); | ||
748 | 280 | |||
749 | 281 | /** | ||
750 | 282 | * Sets the value of an axis of the given touch | ||
751 | 283 | */ | ||
752 | 284 | FRAME_PUBLIC | ||
753 | 285 | void frame_backend_touch_set_value(UFBackendTouch touch, UFAxisType type, float value); | ||
754 | 286 | |||
755 | 287 | #ifdef __cplusplus | ||
756 | 288 | } | ||
757 | 289 | #endif | ||
758 | 290 | |||
759 | 291 | #endif /* FRAME_OIF_FRAME_BACKEND_H_ */ | ||
760 | 0 | 292 | ||
761 | === modified file 'src/Makefile.am' | |||
762 | --- src/Makefile.am 2012-06-21 19:41:40 +0000 | |||
763 | +++ src/Makefile.am 2012-11-08 16:29:22 +0000 | |||
764 | @@ -9,8 +9,6 @@ | |||
765 | 9 | 9 | ||
766 | 10 | libframe_la_LIBADD = \ | 10 | libframe_la_LIBADD = \ |
767 | 11 | -lm \ | 11 | -lm \ |
768 | 12 | $(EVEMU_LIBS) \ | ||
769 | 13 | $(MTDEV_LIBS) \ | ||
770 | 14 | $(COVERAGE_LIBS) \ | 12 | $(COVERAGE_LIBS) \ |
771 | 15 | $(XINPUT_LIBS) \ | 13 | $(XINPUT_LIBS) \ |
772 | 16 | $(CXX_LIBS) | 14 | $(CXX_LIBS) |
773 | @@ -32,6 +30,7 @@ | |||
774 | 32 | libframeincludedir = $(includedir)/oif | 30 | libframeincludedir = $(includedir)/oif |
775 | 33 | libframeinclude_HEADERS = \ | 31 | libframeinclude_HEADERS = \ |
776 | 34 | $(top_srcdir)/include/oif/frame.h \ | 32 | $(top_srcdir)/include/oif/frame.h \ |
777 | 33 | $(top_srcdir)/include/oif/frame_backend.h \ | ||
778 | 35 | $(top_srcdir)/include/oif/frame_internal.h \ | 34 | $(top_srcdir)/include/oif/frame_internal.h \ |
779 | 36 | $(top_srcdir)/include/oif/frame_x11.h | 35 | $(top_srcdir)/include/oif/frame_x11.h |
780 | 37 | 36 | ||
781 | 38 | 37 | ||
782 | === modified file 'src/Makefile.in' | |||
783 | --- src/Makefile.in 2012-07-26 18:35:10 +0000 | |||
784 | +++ src/Makefile.in 2012-11-08 16:29:22 +0000 | |||
785 | @@ -1,4 +1,4 @@ | |||
787 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
788 | 2 | # @configure_input@ | 2 | # @configure_input@ |
789 | 3 | 3 | ||
790 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
791 | @@ -100,7 +100,7 @@ | |||
792 | 100 | LTLIBRARIES = $(lib_LTLIBRARIES) | 100 | LTLIBRARIES = $(lib_LTLIBRARIES) |
793 | 101 | am__DEPENDENCIES_1 = | 101 | am__DEPENDENCIES_1 = |
794 | 102 | libframe_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ | 102 | libframe_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
796 | 103 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) | 103 | $(am__DEPENDENCIES_1) |
797 | 104 | am_libframe_la_OBJECTS = axis.lo device.lo event.lo frame.lo handle.lo \ | 104 | am_libframe_la_OBJECTS = axis.lo device.lo event.lo frame.lo handle.lo \ |
798 | 105 | touch.lo value.lo window.lo device_x11.lo frame_x11.lo \ | 105 | touch.lo value.lo window.lo device_x11.lo frame_x11.lo \ |
799 | 106 | handle_x11.lo window_x11.lo | 106 | handle_x11.lo window_x11.lo |
800 | @@ -340,8 +340,6 @@ | |||
801 | 340 | 340 | ||
802 | 341 | libframe_la_LIBADD = \ | 341 | libframe_la_LIBADD = \ |
803 | 342 | -lm \ | 342 | -lm \ |
804 | 343 | $(EVEMU_LIBS) \ | ||
805 | 344 | $(MTDEV_LIBS) \ | ||
806 | 345 | $(COVERAGE_LIBS) \ | 343 | $(COVERAGE_LIBS) \ |
807 | 346 | $(XINPUT_LIBS) \ | 344 | $(XINPUT_LIBS) \ |
808 | 347 | $(CXX_LIBS) | 345 | $(CXX_LIBS) |
809 | @@ -362,6 +360,7 @@ | |||
810 | 362 | libframeincludedir = $(includedir)/oif | 360 | libframeincludedir = $(includedir)/oif |
811 | 363 | libframeinclude_HEADERS = \ | 361 | libframeinclude_HEADERS = \ |
812 | 364 | $(top_srcdir)/include/oif/frame.h \ | 362 | $(top_srcdir)/include/oif/frame.h \ |
813 | 363 | $(top_srcdir)/include/oif/frame_backend.h \ | ||
814 | 365 | $(top_srcdir)/include/oif/frame_internal.h \ | 364 | $(top_srcdir)/include/oif/frame_internal.h \ |
815 | 366 | $(top_srcdir)/include/oif/frame_x11.h | 365 | $(top_srcdir)/include/oif/frame_x11.h |
816 | 367 | 366 | ||
817 | 368 | 367 | ||
818 | === modified file 'src/device.cpp' | |||
819 | --- src/device.cpp 2012-06-21 19:41:40 +0000 | |||
820 | +++ src/device.cpp 2012-11-08 16:29:22 +0000 | |||
821 | @@ -24,6 +24,8 @@ | |||
822 | 24 | 24 | ||
823 | 25 | #include "axis.h" | 25 | #include "axis.h" |
824 | 26 | 26 | ||
825 | 27 | #include <oif/frame_backend.h> | ||
826 | 28 | |||
827 | 27 | namespace oif { | 29 | namespace oif { |
828 | 28 | namespace frame { | 30 | namespace frame { |
829 | 29 | 31 | ||
830 | @@ -75,18 +77,30 @@ | |||
831 | 75 | UFStatus frame_device_get_property_unsigned_int_(UFDevice device, | 77 | UFStatus frame_device_get_property_unsigned_int_(UFDevice device, |
832 | 76 | UFDeviceProperty property, | 78 | UFDeviceProperty property, |
833 | 77 | unsigned int *value) { | 79 | unsigned int *value) { |
837 | 78 | return static_cast<const oif::frame::UFDevice*>(device)->GetProperty( | 80 | |
838 | 79 | property, | 81 | if (property == UFDevicePropertyNumAxes) { |
839 | 80 | value); | 82 | *value = static_cast<const oif::frame::UFDevice*>(device)->axes_.size(); |
840 | 83 | return UFStatusSuccess; | ||
841 | 84 | } else { | ||
842 | 85 | return static_cast<const oif::frame::UFDevice*>(device)->GetProperty( | ||
843 | 86 | property, | ||
844 | 87 | value); | ||
845 | 88 | } | ||
846 | 81 | } | 89 | } |
847 | 82 | 90 | ||
848 | 83 | #undef frame_device_get_property /* Override C11 generic selections macro */ | 91 | #undef frame_device_get_property /* Override C11 generic selections macro */ |
849 | 84 | FRAME_PUBLIC | 92 | FRAME_PUBLIC |
850 | 85 | UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty property, | 93 | UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty property, |
851 | 86 | void *value) { | 94 | void *value) { |
855 | 87 | return static_cast<const oif::frame::UFDevice*>(device)->GetProperty( | 95 | if (property == UFDevicePropertyNumAxes) { |
856 | 88 | property, | 96 | *reinterpret_cast<unsigned int *>(value) = |
857 | 89 | value); | 97 | static_cast<const oif::frame::UFDevice*>(device)->axes_.size(); |
858 | 98 | return UFStatusSuccess; | ||
859 | 99 | } else { | ||
860 | 100 | return static_cast<const oif::frame::UFDevice*>(device)->GetProperty( | ||
861 | 101 | property, | ||
862 | 102 | value); | ||
863 | 103 | } | ||
864 | 90 | } | 104 | } |
865 | 91 | 105 | ||
866 | 92 | UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index, | 106 | UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index, |
867 | @@ -129,4 +143,77 @@ | |||
868 | 129 | return resolution; | 143 | return resolution; |
869 | 130 | } | 144 | } |
870 | 131 | 145 | ||
871 | 146 | UFBackendDevice frame_backend_device_new() | ||
872 | 147 | { | ||
873 | 148 | return new UFBackendDevice_(new oif::frame::UFDevice); | ||
874 | 149 | } | ||
875 | 150 | |||
876 | 151 | UFDevice frame_backend_device_get_device(UFBackendDevice device) | ||
877 | 152 | { | ||
878 | 153 | return device->shared_ptr.get(); | ||
879 | 154 | } | ||
880 | 155 | |||
881 | 156 | void frame_backend_device_delete(UFBackendDevice device) | ||
882 | 157 | { | ||
883 | 158 | delete device; | ||
884 | 159 | } | ||
885 | 160 | |||
886 | 161 | void frame_backend_device_set_name(UFBackendDevice device, const char *name) | ||
887 | 162 | { | ||
888 | 163 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
889 | 164 | InsertProperty(UFDevicePropertyName, | ||
890 | 165 | new oif::frame::Value(name)); | ||
891 | 166 | } | ||
892 | 167 | |||
893 | 168 | void frame_backend_device_set_direct(UFBackendDevice device, int direct) | ||
894 | 169 | { | ||
895 | 170 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
896 | 171 | InsertProperty(UFDevicePropertyDirect, | ||
897 | 172 | new oif::frame::Value(direct)); | ||
898 | 173 | } | ||
899 | 174 | |||
900 | 175 | void frame_backend_device_set_independent(UFBackendDevice device, int independent) | ||
901 | 176 | { | ||
902 | 177 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
903 | 178 | InsertProperty(UFDevicePropertyIndependent, | ||
904 | 179 | new oif::frame::Value(independent)); | ||
905 | 180 | } | ||
906 | 181 | |||
907 | 182 | void frame_backend_device_set_semi_mt(UFBackendDevice device, int semi_mt) | ||
908 | 183 | { | ||
909 | 184 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
910 | 185 | InsertProperty(UFDevicePropertySemiMT, | ||
911 | 186 | new oif::frame::Value(semi_mt)); | ||
912 | 187 | } | ||
913 | 188 | |||
914 | 189 | void frame_backend_device_set_max_touches(UFBackendDevice device, unsigned int max_touches) | ||
915 | 190 | { | ||
916 | 191 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
917 | 192 | InsertProperty(UFDevicePropertyMaxTouches, | ||
918 | 193 | new oif::frame::Value(max_touches)); | ||
919 | 194 | } | ||
920 | 195 | |||
921 | 196 | void frame_backend_device_set_window_resolution(UFBackendDevice device, float x, float y) | ||
922 | 197 | { | ||
923 | 198 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
924 | 199 | InsertProperty(UFDevicePropertyWindowResolutionX, | ||
925 | 200 | new oif::frame::Value(x)); | ||
926 | 201 | |||
927 | 202 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
928 | 203 | InsertProperty(UFDevicePropertyWindowResolutionY, | ||
929 | 204 | new oif::frame::Value(y)); | ||
930 | 205 | } | ||
931 | 206 | |||
932 | 207 | void frame_backend_device_add_axis(UFBackendDevice device, | ||
933 | 208 | UFAxisType type, | ||
934 | 209 | float min, float max, float resolution) | ||
935 | 210 | { | ||
936 | 211 | using oif::frame::UFAxis; | ||
937 | 212 | |||
938 | 213 | UFAxis_* axis = new UFAxis(type, min, max, resolution); | ||
939 | 214 | |||
940 | 215 | static_cast<oif::frame::UFDevice*>(device->shared_ptr.get())-> | ||
941 | 216 | axes_[type] = std::unique_ptr<UFAxis>(static_cast<UFAxis*>(axis)); | ||
942 | 217 | } | ||
943 | 218 | |||
944 | 132 | } // extern "C" | 219 | } // extern "C" |
945 | 133 | 220 | ||
946 | === modified file 'src/device.h' | |||
947 | --- src/device.h 2012-06-21 19:41:40 +0000 | |||
948 | +++ src/device.h 2012-11-08 16:29:22 +0000 | |||
949 | @@ -32,6 +32,13 @@ | |||
950 | 32 | virtual ~UFDevice_() {}; | 32 | virtual ~UFDevice_() {}; |
951 | 33 | }; | 33 | }; |
952 | 34 | 34 | ||
953 | 35 | struct UFBackendDevice_ { | ||
954 | 36 | UFBackendDevice_(oif::frame::UFDevice* device) | ||
955 | 37 | : shared_ptr(device) {} | ||
956 | 38 | |||
957 | 39 | oif::frame::SharedUFDevice shared_ptr; | ||
958 | 40 | }; | ||
959 | 41 | |||
960 | 35 | namespace oif { | 42 | namespace oif { |
961 | 36 | namespace frame { | 43 | namespace frame { |
962 | 37 | 44 | ||
963 | @@ -45,7 +52,6 @@ | |||
964 | 45 | UFDevice(const UFDevice&) = delete; | 52 | UFDevice(const UFDevice&) = delete; |
965 | 46 | UFDevice& operator=(const UFDevice&) = delete; | 53 | UFDevice& operator=(const UFDevice&) = delete; |
966 | 47 | 54 | ||
967 | 48 | protected: | ||
968 | 49 | typedef std::unique_ptr<UFAxis> UniqueUFAxis; | 55 | typedef std::unique_ptr<UFAxis> UniqueUFAxis; |
969 | 50 | 56 | ||
970 | 51 | std::map<UFAxisType, UniqueUFAxis> axes_; | 57 | std::map<UFAxisType, UniqueUFAxis> axes_; |
971 | 52 | 58 | ||
972 | === modified file 'src/event.cpp' | |||
973 | --- src/event.cpp 2012-06-21 19:41:40 +0000 | |||
974 | +++ src/event.cpp 2012-11-08 16:29:22 +0000 | |||
975 | @@ -22,10 +22,17 @@ | |||
976 | 22 | 22 | ||
977 | 23 | #include "event.h" | 23 | #include "event.h" |
978 | 24 | #include "frame.h" | 24 | #include "frame.h" |
979 | 25 | #include "device.h" | ||
980 | 26 | |||
981 | 27 | #include <oif/frame_backend.h> | ||
982 | 25 | 28 | ||
983 | 26 | namespace oif { | 29 | namespace oif { |
984 | 27 | namespace frame { | 30 | namespace frame { |
985 | 28 | 31 | ||
986 | 32 | UFEvent::UFEvent() | ||
987 | 33 | : ref_count_(1) { | ||
988 | 34 | } | ||
989 | 35 | |||
990 | 29 | UFEvent::UFEvent(UFEventType type, const Value* data, uint64_t time) | 36 | UFEvent::UFEvent(UFEventType type, const Value* data, uint64_t time) |
991 | 30 | : ref_count_(1) { | 37 | : ref_count_(1) { |
992 | 31 | const Value* value; | 38 | const Value* value; |
993 | @@ -70,6 +77,10 @@ | |||
994 | 70 | 77 | ||
995 | 71 | extern "C" { | 78 | extern "C" { |
996 | 72 | 79 | ||
997 | 80 | UFEvent frame_event_new() { | ||
998 | 81 | return new oif::frame::UFEvent; | ||
999 | 82 | } | ||
1000 | 83 | |||
1001 | 73 | void frame_event_ref(UFEvent event) { | 84 | void frame_event_ref(UFEvent event) { |
1002 | 74 | static_cast<oif::frame::UFEvent*>(event)->Ref(); | 85 | static_cast<oif::frame::UFEvent*>(event)->Ref(); |
1003 | 75 | } | 86 | } |
1004 | @@ -140,4 +151,30 @@ | |||
1005 | 140 | return time; | 151 | return time; |
1006 | 141 | } | 152 | } |
1007 | 142 | 153 | ||
1008 | 154 | void frame_event_set_type(UFEvent event, UFEventType type) | ||
1009 | 155 | { | ||
1010 | 156 | static_cast<oif::frame::UFEvent*>(event)-> | ||
1011 | 157 | InsertProperty(UFEventPropertyType, new oif::frame::Value(type)); | ||
1012 | 158 | } | ||
1013 | 159 | |||
1014 | 160 | void frame_event_set_device(UFEvent event, UFBackendDevice device) | ||
1015 | 161 | { | ||
1016 | 162 | static_cast<oif::frame::UFEvent*>(event)-> | ||
1017 | 163 | InsertProperty(UFEventPropertyDevice, | ||
1018 | 164 | new oif::frame::Value(device->shared_ptr)); | ||
1019 | 165 | } | ||
1020 | 166 | |||
1021 | 167 | void frame_event_set_frame(UFEvent event, UFBackendFrame frame) | ||
1022 | 168 | { | ||
1023 | 169 | static_cast<oif::frame::UFEvent*>(event)-> | ||
1024 | 170 | InsertProperty(UFEventPropertyFrame, | ||
1025 | 171 | new oif::frame::Value(frame->shared_ptr)); | ||
1026 | 172 | } | ||
1027 | 173 | |||
1028 | 174 | void frame_event_set_time(UFEvent event, uint64_t time) | ||
1029 | 175 | { | ||
1030 | 176 | static_cast<oif::frame::UFEvent*>(event)-> | ||
1031 | 177 | InsertProperty(UFEventPropertyTime, new oif::frame::Value(time)); | ||
1032 | 178 | } | ||
1033 | 179 | |||
1034 | 143 | } // extern "C" | 180 | } // extern "C" |
1035 | 144 | 181 | ||
1036 | === modified file 'src/event.h' | |||
1037 | --- src/event.h 2012-06-21 19:41:40 +0000 | |||
1038 | +++ src/event.h 2012-11-08 16:29:22 +0000 | |||
1039 | @@ -37,6 +37,7 @@ | |||
1040 | 37 | 37 | ||
1041 | 38 | class UFEvent : public UFEvent_, public Property<UFEventProperty> { | 38 | class UFEvent : public UFEvent_, public Property<UFEventProperty> { |
1042 | 39 | public: | 39 | public: |
1043 | 40 | UFEvent(); | ||
1044 | 40 | UFEvent(UFEventType type, const Value* data, uint64_t time); | 41 | UFEvent(UFEventType type, const Value* data, uint64_t time); |
1045 | 41 | ~UFEvent(); | 42 | ~UFEvent(); |
1046 | 42 | 43 | ||
1047 | 43 | 44 | ||
1048 | === modified file 'src/frame.cpp' | |||
1049 | --- src/frame.cpp 2012-06-21 19:41:40 +0000 | |||
1050 | +++ src/frame.cpp 2012-11-08 16:29:22 +0000 | |||
1051 | @@ -23,15 +23,16 @@ | |||
1052 | 23 | #include <assert.h> | 23 | #include <assert.h> |
1053 | 24 | #include <stdio.h> | 24 | #include <stdio.h> |
1054 | 25 | 25 | ||
1055 | 26 | #include "device.h" | ||
1056 | 26 | #include "touch.h" | 27 | #include "touch.h" |
1058 | 27 | #include "window.h" | 28 | |
1059 | 29 | #include <oif/frame_backend.h> | ||
1060 | 28 | 30 | ||
1061 | 29 | namespace oif { | 31 | namespace oif { |
1062 | 30 | namespace frame { | 32 | namespace frame { |
1063 | 31 | 33 | ||
1065 | 32 | UFFrame::UFFrame(const SharedWindow& window, const SharedUFFrame& prev) | 34 | UFFrame::UFFrame(const SharedUFFrame& prev) |
1066 | 33 | : prev_(prev), | 35 | : prev_(prev), |
1067 | 34 | window_(window), | ||
1068 | 35 | touches_array_(), | 36 | touches_array_(), |
1069 | 36 | touches_map_() { | 37 | touches_map_() { |
1070 | 37 | for (const SharedUFTouch& prev_touch : prev_->touches_array_) { | 38 | for (const SharedUFTouch& prev_touch : prev_->touches_array_) { |
1071 | @@ -93,6 +94,30 @@ | |||
1072 | 93 | 94 | ||
1073 | 94 | } // namespace | 95 | } // namespace |
1074 | 95 | 96 | ||
1075 | 97 | UFStatus UFFrame::GiveTouch(SharedUFTouch& touch) { | ||
1076 | 98 | auto map_it = touches_map_.find(touch->id()); | ||
1077 | 99 | if (map_it != touches_map_.end()) { | ||
1078 | 100 | /* A loan is being returned */ | ||
1079 | 101 | |||
1080 | 102 | SharedUFTouch &our_touch = touches_array_[map_it->second]; | ||
1081 | 103 | |||
1082 | 104 | /* we shouldn't be referencing to any UFTouch here. | ||
1083 | 105 | If we are, it's a programming error by the API user. */ | ||
1084 | 106 | if (our_touch.get() != NULL) { | ||
1085 | 107 | return UFStatusErrorTouchIdExists; | ||
1086 | 108 | } | ||
1087 | 109 | |||
1088 | 110 | /* take back our UFtouch */ | ||
1089 | 111 | our_touch.swap(touch); | ||
1090 | 112 | } else { | ||
1091 | 113 | touches_map_[touch->id()] = touches_array_.size(); | ||
1092 | 114 | touches_array_.push_back(touch); | ||
1093 | 115 | touch.reset(); | ||
1094 | 116 | } | ||
1095 | 117 | |||
1096 | 118 | return UFStatusSuccess; | ||
1097 | 119 | } | ||
1098 | 120 | |||
1099 | 96 | void UFFrame::UpdateTouch(const SharedUFTouch& touch) { | 121 | void UFFrame::UpdateTouch(const SharedUFTouch& touch) { |
1100 | 97 | auto map_it = touches_map_.find(touch->id()); | 122 | auto map_it = touches_map_.find(touch->id()); |
1101 | 98 | 123 | ||
1102 | @@ -104,12 +129,6 @@ | |||
1103 | 104 | } else { | 129 | } else { |
1104 | 105 | touches_map_[touch->id()] = touches_array_.size(); | 130 | touches_map_[touch->id()] = touches_array_.size(); |
1105 | 106 | touches_array_.push_back(touch); | 131 | touches_array_.push_back(touch); |
1106 | 107 | |||
1107 | 108 | const Value *value; | ||
1108 | 109 | value = new Value(static_cast<unsigned int>(touches_map_.size())); | ||
1109 | 110 | InsertProperty(UFFramePropertyNumTouches, value); | ||
1110 | 111 | value = new Value(static_cast<unsigned int>(touches_map_.size())); | ||
1111 | 112 | InsertProperty(UFFramePropertyActiveTouches, value); | ||
1112 | 113 | } | 132 | } |
1113 | 114 | break; | 133 | break; |
1114 | 115 | 134 | ||
1115 | @@ -169,6 +188,14 @@ | |||
1116 | 169 | return UFStatusSuccess; | 188 | return UFStatusSuccess; |
1117 | 170 | } | 189 | } |
1118 | 171 | 190 | ||
1119 | 191 | SharedUFTouch* UFFrame::GetSharedTouchById(UFTouchId touch_id) { | ||
1120 | 192 | auto it = touches_map_.find(touch_id); | ||
1121 | 193 | if (it == touches_map_.end()) | ||
1122 | 194 | return nullptr; | ||
1123 | 195 | else | ||
1124 | 196 | return &(touches_array_[it->second]); | ||
1125 | 197 | } | ||
1126 | 198 | |||
1127 | 172 | UFStatus UFFrame::GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const { | 199 | UFStatus UFFrame::GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const { |
1128 | 173 | auto it = touches_map_.find(touch_id); | 200 | auto it = touches_map_.find(touch_id); |
1129 | 174 | if (it == touches_map_.end()) | 201 | if (it == touches_map_.end()) |
1130 | @@ -211,8 +238,21 @@ | |||
1131 | 211 | UFFrameProperty property, | 238 | UFFrameProperty property, |
1132 | 212 | unsigned int *value) { | 239 | unsigned int *value) { |
1133 | 213 | const oif::frame::UFFrame* ufframe = | 240 | const oif::frame::UFFrame* ufframe = |
1136 | 214 | static_cast<const oif::frame::UFFrame*>(frame); | 241 | static_cast<const oif::frame::UFFrame*>(frame); |
1137 | 215 | return ufframe->GetProperty(property, value); | 242 | |
1138 | 243 | if (property == UFFramePropertyNumTouches) { | ||
1139 | 244 | *value = ufframe->GetNumTouches(); | ||
1140 | 245 | return UFStatusSuccess; | ||
1141 | 246 | } else if (property == UFFramePropertyActiveTouches) { | ||
1142 | 247 | UFStatus status = ufframe->GetProperty(property, value); | ||
1143 | 248 | if (status != UFStatusSuccess) { | ||
1144 | 249 | *value = ufframe->GetNumTouches(); | ||
1145 | 250 | status = UFStatusSuccess; | ||
1146 | 251 | } | ||
1147 | 252 | return status; | ||
1148 | 253 | } else { | ||
1149 | 254 | return ufframe->GetProperty(property, value); | ||
1150 | 255 | } | ||
1151 | 216 | } | 256 | } |
1152 | 217 | 257 | ||
1153 | 218 | #undef frame_frame_get_property /* Override C11 generic selections macro */ | 258 | #undef frame_frame_get_property /* Override C11 generic selections macro */ |
1154 | @@ -221,7 +261,20 @@ | |||
1155 | 221 | void *value) { | 261 | void *value) { |
1156 | 222 | const oif::frame::UFFrame* ufframe = | 262 | const oif::frame::UFFrame* ufframe = |
1157 | 223 | static_cast<const oif::frame::UFFrame*>(frame); | 263 | static_cast<const oif::frame::UFFrame*>(frame); |
1159 | 224 | return ufframe->GetProperty(property, value); | 264 | |
1160 | 265 | if (property == UFFramePropertyNumTouches) { | ||
1161 | 266 | *reinterpret_cast<unsigned int *>(value) = ufframe->GetNumTouches(); | ||
1162 | 267 | return UFStatusSuccess; | ||
1163 | 268 | } else if (property == UFFramePropertyActiveTouches) { | ||
1164 | 269 | UFStatus status = ufframe->GetProperty(property, value); | ||
1165 | 270 | if (status != UFStatusSuccess) { | ||
1166 | 271 | *reinterpret_cast<unsigned int *>(value) = ufframe->GetNumTouches(); | ||
1167 | 272 | status = UFStatusSuccess; | ||
1168 | 273 | } | ||
1169 | 274 | return status; | ||
1170 | 275 | } else { | ||
1171 | 276 | return ufframe->GetProperty(property, value); | ||
1172 | 277 | } | ||
1173 | 225 | } | 278 | } |
1174 | 226 | 279 | ||
1175 | 227 | UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index, | 280 | UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index, |
1176 | @@ -269,13 +322,9 @@ | |||
1177 | 269 | } | 322 | } |
1178 | 270 | 323 | ||
1179 | 271 | uint32_t frame_frame_get_num_touches(UFFrame frame) { | 324 | uint32_t frame_frame_get_num_touches(UFFrame frame) { |
1180 | 272 | unsigned int num_touches; | ||
1181 | 273 | const oif::frame::UFFrame* ufframe = | 325 | const oif::frame::UFFrame* ufframe = |
1182 | 274 | static_cast<const oif::frame::UFFrame*>(frame); | 326 | static_cast<const oif::frame::UFFrame*>(frame); |
1187 | 275 | UFStatus status = ufframe->GetProperty(UFFramePropertyNumTouches, | 327 | return ufframe->GetNumTouches(); |
1184 | 276 | &num_touches); | ||
1185 | 277 | assert(status == UFStatusSuccess); | ||
1186 | 278 | return num_touches; | ||
1188 | 279 | } | 328 | } |
1189 | 280 | 329 | ||
1190 | 281 | UFDevice frame_frame_get_device(UFFrame frame) { | 330 | UFDevice frame_frame_get_device(UFFrame frame) { |
1191 | @@ -287,4 +336,80 @@ | |||
1192 | 287 | return device; | 336 | return device; |
1193 | 288 | } | 337 | } |
1194 | 289 | 338 | ||
1195 | 339 | UFBackendFrame frame_backend_frame_new() | ||
1196 | 340 | { | ||
1197 | 341 | return new UFBackendFrame_(new oif::frame::UFFrame); | ||
1198 | 342 | } | ||
1199 | 343 | |||
1200 | 344 | UFBackendFrame frame_backend_frame_create_next(UFBackendFrame frame) | ||
1201 | 345 | { | ||
1202 | 346 | return new UFBackendFrame_(new oif::frame::UFFrame(frame->shared_ptr)); | ||
1203 | 347 | } | ||
1204 | 348 | |||
1205 | 349 | UFFrame frame_backend_frame_get_frame(UFBackendFrame frame) | ||
1206 | 350 | { | ||
1207 | 351 | return frame->shared_ptr.get(); | ||
1208 | 352 | } | ||
1209 | 353 | |||
1210 | 354 | UFStatus frame_backend_frame_borrow_touch_by_id(UFBackendFrame frame, | ||
1211 | 355 | UFTouchId id, | ||
1212 | 356 | UFBackendTouch *touch) | ||
1213 | 357 | { | ||
1214 | 358 | oif::frame::UFFrame* ufframe = | ||
1215 | 359 | static_cast<oif::frame::UFFrame*>(frame->shared_ptr.get()); | ||
1216 | 360 | |||
1217 | 361 | oif::frame::SharedUFTouch *shared_touch = ufframe->GetSharedTouchById(id); | ||
1218 | 362 | if (shared_touch) { | ||
1219 | 363 | *touch = new UFBackendTouch_(*shared_touch); | ||
1220 | 364 | return UFStatusSuccess; | ||
1221 | 365 | } else { | ||
1222 | 366 | return UFStatusErrorInvalidTouch; | ||
1223 | 367 | } | ||
1224 | 368 | } | ||
1225 | 369 | |||
1226 | 370 | void frame_backend_frame_set_device(UFBackendFrame frame, UFBackendDevice device) | ||
1227 | 371 | { | ||
1228 | 372 | static_cast<oif::frame::UFFrame*>(frame->shared_ptr.get())-> | ||
1229 | 373 | InsertProperty(UFFramePropertyDevice, | ||
1230 | 374 | new oif::frame::Value(device->shared_ptr)); | ||
1231 | 375 | } | ||
1232 | 376 | |||
1233 | 377 | void frame_backend_frame_set_window_id(UFBackendFrame frame, UFWindowId window_id) | ||
1234 | 378 | { | ||
1235 | 379 | static_cast<oif::frame::UFFrame*>(frame->shared_ptr.get())-> | ||
1236 | 380 | InsertProperty(UFFramePropertyWindowId, | ||
1237 | 381 | new oif::frame::Value(window_id)); | ||
1238 | 382 | } | ||
1239 | 383 | |||
1240 | 384 | void frame_backend_frame_set_active_touches(UFBackendFrame frame, unsigned int active_touches) | ||
1241 | 385 | { | ||
1242 | 386 | static_cast<oif::frame::UFFrame*>(frame->shared_ptr.get())-> | ||
1243 | 387 | InsertProperty(UFFramePropertyActiveTouches, | ||
1244 | 388 | new oif::frame::Value(active_touches)); | ||
1245 | 389 | } | ||
1246 | 390 | |||
1247 | 391 | UFStatus frame_backend_frame_give_touch(UFBackendFrame frame, UFBackendTouch *touch) | ||
1248 | 392 | { | ||
1249 | 393 | UFStatus status; | ||
1250 | 394 | |||
1251 | 395 | /* the touch backend must be carrying a UFtouch */ | ||
1252 | 396 | assert((*touch)->shared_ptr); | ||
1253 | 397 | |||
1254 | 398 | status = static_cast<oif::frame::UFFrame*>(frame->shared_ptr.get())-> | ||
1255 | 399 | GiveTouch((*touch)->shared_ptr); | ||
1256 | 400 | |||
1257 | 401 | /* frame must have taken the touch */ | ||
1258 | 402 | assert(!(*touch)->shared_ptr); | ||
1259 | 403 | |||
1260 | 404 | delete (*touch); | ||
1261 | 405 | *touch = nullptr; | ||
1262 | 406 | |||
1263 | 407 | return status; | ||
1264 | 408 | } | ||
1265 | 409 | |||
1266 | 410 | void frame_backend_frame_delete(UFBackendFrame frame) | ||
1267 | 411 | { | ||
1268 | 412 | delete frame; | ||
1269 | 413 | } | ||
1270 | 414 | |||
1271 | 290 | } // extern "C" | 415 | } // extern "C" |
1272 | 291 | 416 | ||
1273 | === modified file 'src/frame.h' | |||
1274 | --- src/frame.h 2012-06-21 19:41:40 +0000 | |||
1275 | +++ src/frame.h 2012-11-08 16:29:22 +0000 | |||
1276 | @@ -33,23 +33,33 @@ | |||
1277 | 33 | virtual ~UFFrame_() {} | 33 | virtual ~UFFrame_() {} |
1278 | 34 | }; | 34 | }; |
1279 | 35 | 35 | ||
1280 | 36 | struct UFBackendFrame_ { | ||
1281 | 37 | UFBackendFrame_(oif::frame::UFFrame* frame) | ||
1282 | 38 | : shared_ptr(frame) {} | ||
1283 | 39 | |||
1284 | 40 | oif::frame::SharedUFFrame shared_ptr; | ||
1285 | 41 | }; | ||
1286 | 42 | |||
1287 | 36 | namespace oif { | 43 | namespace oif { |
1288 | 37 | namespace frame { | 44 | namespace frame { |
1289 | 38 | 45 | ||
1290 | 39 | class UFFrame : public UFFrame_, public Property<UFFrameProperty> { | 46 | class UFFrame : public UFFrame_, public Property<UFFrameProperty> { |
1291 | 40 | public: | 47 | public: |
1294 | 41 | UFFrame() : prev_(), window_(), touches_array_(), touches_map_() {} | 48 | UFFrame() : prev_(), touches_array_(), touches_map_() {} |
1295 | 42 | UFFrame(const SharedWindow& window, const SharedUFFrame& prev); | 49 | UFFrame(const SharedUFFrame& prev); |
1296 | 43 | 50 | ||
1297 | 44 | UFTouch* CopyTouch(UFTouchId touchid, UFTouchState new_state) const; | 51 | UFTouch* CopyTouch(UFTouchId touchid, UFTouchState new_state) const; |
1298 | 45 | bool IsTouchOwned(UFTouchId touchid); | 52 | bool IsTouchOwned(UFTouchId touchid); |
1299 | 53 | UFStatus GiveTouch(SharedUFTouch& touch); | ||
1300 | 46 | void UpdateTouch(const SharedUFTouch& touch); | 54 | void UpdateTouch(const SharedUFTouch& touch); |
1301 | 47 | bool IsEnded() const; | 55 | bool IsEnded() const; |
1302 | 56 | unsigned int GetNumTouches() const { return touches_array_.size(); } | ||
1303 | 48 | UFStatus GetPreviousTouchValue(const UFTouch* touch, UFAxisType type, | 57 | UFStatus GetPreviousTouchValue(const UFTouch* touch, UFAxisType type, |
1304 | 49 | float* value) const; | 58 | float* value) const; |
1305 | 50 | UFStatus GetPreviousTouchProperty(const UFTouch* touch, | 59 | UFStatus GetPreviousTouchProperty(const UFTouch* touch, |
1306 | 51 | UFTouchProperty property, void* value) const; | 60 | UFTouchProperty property, void* value) const; |
1307 | 52 | UFStatus GetTouchByIndex(unsigned int index, ::UFTouch* touch) const; | 61 | UFStatus GetTouchByIndex(unsigned int index, ::UFTouch* touch) const; |
1308 | 62 | SharedUFTouch* GetSharedTouchById(UFTouchId touch_id); | ||
1309 | 53 | UFStatus GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const; | 63 | UFStatus GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const; |
1310 | 54 | void ReleasePreviousFrame(); | 64 | void ReleasePreviousFrame(); |
1311 | 55 | 65 | ||
1312 | @@ -58,7 +68,6 @@ | |||
1313 | 58 | 68 | ||
1314 | 59 | private: | 69 | private: |
1315 | 60 | SharedUFFrame prev_; | 70 | SharedUFFrame prev_; |
1316 | 61 | SharedWindow window_; | ||
1317 | 62 | std::vector<SharedUFTouch> touches_array_; | 71 | std::vector<SharedUFTouch> touches_array_; |
1318 | 63 | std::map<UFTouchId, unsigned int> touches_map_; | 72 | std::map<UFTouchId, unsigned int> touches_map_; |
1319 | 64 | }; | 73 | }; |
1320 | 65 | 74 | ||
1321 | === modified file 'src/libframe.ver' | |||
1322 | --- src/libframe.ver 2012-06-21 19:41:40 +0000 | |||
1323 | +++ src/libframe.ver 2012-11-08 16:29:22 +0000 | |||
1324 | @@ -64,3 +64,42 @@ | |||
1325 | 64 | local: | 64 | local: |
1326 | 65 | *; | 65 | *; |
1327 | 66 | }; | 66 | }; |
1328 | 67 | |||
1329 | 68 | FRAME_2.4 { | ||
1330 | 69 | global: | ||
1331 | 70 | frame_backend_device_new; | ||
1332 | 71 | frame_backend_device_get_device; | ||
1333 | 72 | frame_backend_device_delete; | ||
1334 | 73 | frame_backend_device_set_name; | ||
1335 | 74 | frame_backend_device_set_direct; | ||
1336 | 75 | frame_backend_device_set_independent; | ||
1337 | 76 | frame_backend_device_set_semi_mt; | ||
1338 | 77 | frame_backend_device_set_max_touches; | ||
1339 | 78 | frame_backend_device_set_window_resolution; | ||
1340 | 79 | frame_backend_device_add_axis; | ||
1341 | 80 | frame_backend_frame_new; | ||
1342 | 81 | frame_backend_frame_create_next; | ||
1343 | 82 | frame_backend_frame_get_frame; | ||
1344 | 83 | frame_backend_frame_borrow_touch_by_id; | ||
1345 | 84 | frame_backend_frame_set_device; | ||
1346 | 85 | frame_backend_frame_set_window_id; | ||
1347 | 86 | frame_backend_frame_set_active_touches; | ||
1348 | 87 | frame_backend_frame_give_touch; | ||
1349 | 88 | frame_backend_frame_delete; | ||
1350 | 89 | frame_backend_touch_new; | ||
1351 | 90 | frame_backend_touch_get_touch; | ||
1352 | 91 | frame_backend_touch_set_id; | ||
1353 | 92 | frame_backend_touch_set_ended; | ||
1354 | 93 | frame_backend_touch_set_window_pos; | ||
1355 | 94 | frame_backend_touch_set_time; | ||
1356 | 95 | frame_backend_touch_set_start_time; | ||
1357 | 96 | frame_backend_touch_set_owned; | ||
1358 | 97 | frame_backend_touch_set_pending_end; | ||
1359 | 98 | frame_backend_touch_set_value; | ||
1360 | 99 | |||
1361 | 100 | frame_event_new; | ||
1362 | 101 | frame_event_set_type; | ||
1363 | 102 | frame_event_set_device; | ||
1364 | 103 | frame_event_set_frame; | ||
1365 | 104 | frame_event_set_time; | ||
1366 | 105 | } FRAME_2.2; | ||
1367 | 67 | 106 | ||
1368 | === modified file 'src/touch.cpp' | |||
1369 | --- src/touch.cpp 2012-06-21 19:41:40 +0000 | |||
1370 | +++ src/touch.cpp 2012-11-08 16:29:22 +0000 | |||
1371 | @@ -24,9 +24,34 @@ | |||
1372 | 24 | 24 | ||
1373 | 25 | #include "frame.h" | 25 | #include "frame.h" |
1374 | 26 | 26 | ||
1375 | 27 | #include <oif/frame_backend.h> | ||
1376 | 28 | |||
1377 | 29 | oif::frame::UFTouch* UFBackendTouch_::GetModifiableTouch() { | ||
1378 | 30 | if (shared_ptr.unique()) { | ||
1379 | 31 | return static_cast<oif::frame::UFTouch*>(shared_ptr.get()); | ||
1380 | 32 | } else { | ||
1381 | 33 | /* Make a hard-copy. We don't want other holders of that UFTouch (like frames | ||
1382 | 34 | from previous but still existing events) to get the changes about to be | ||
1383 | 35 | made through this UFBackendTouch. */ | ||
1384 | 36 | oif::frame::UFTouch *old_touch = | ||
1385 | 37 | static_cast<oif::frame::UFTouch*>(shared_ptr.get()); | ||
1386 | 38 | oif::frame::UFTouch *new_touch = new oif::frame::UFTouch(*old_touch); | ||
1387 | 39 | shared_ptr.reset(new_touch); | ||
1388 | 40 | return new_touch; | ||
1389 | 41 | } | ||
1390 | 42 | } | ||
1391 | 43 | |||
1392 | 27 | namespace oif { | 44 | namespace oif { |
1393 | 28 | namespace frame { | 45 | namespace frame { |
1394 | 29 | 46 | ||
1395 | 47 | UFTouch::UFTouch() | ||
1396 | 48 | : state_(UFTouchStateBegin) { | ||
1397 | 49 | const Value* value; | ||
1398 | 50 | |||
1399 | 51 | value = new Value(state_); | ||
1400 | 52 | InsertProperty(UFTouchPropertyState, value); | ||
1401 | 53 | } | ||
1402 | 54 | |||
1403 | 30 | UFTouch::UFTouch(UFTouchState state, UFTouchId id, float x, float y, | 55 | UFTouch::UFTouch(UFTouchState state, UFTouchId id, float x, float y, |
1404 | 31 | uint64_t time) | 56 | uint64_t time) |
1405 | 32 | : id_(id), | 57 | : id_(id), |
1406 | @@ -205,4 +230,75 @@ | |||
1407 | 205 | return start_time; | 230 | return start_time; |
1408 | 206 | } | 231 | } |
1409 | 207 | 232 | ||
1410 | 233 | UFBackendTouch frame_backend_touch_new() | ||
1411 | 234 | { | ||
1412 | 235 | return new UFBackendTouch_(new oif::frame::UFTouch); | ||
1413 | 236 | } | ||
1414 | 237 | |||
1415 | 238 | UFTouch frame_backend_touch_get_touch(UFBackendTouch touch) | ||
1416 | 239 | { | ||
1417 | 240 | return touch->shared_ptr.get(); | ||
1418 | 241 | } | ||
1419 | 242 | |||
1420 | 243 | void frame_backend_touch_set_id(UFBackendTouch touch_backend, UFTouchId id) | ||
1421 | 244 | { | ||
1422 | 245 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1423 | 246 | |||
1424 | 247 | touch->InsertProperty(UFTouchPropertyId, new oif::frame::Value(id)); | ||
1425 | 248 | touch->SetId(id); | ||
1426 | 249 | } | ||
1427 | 250 | |||
1428 | 251 | void frame_backend_touch_set_ended(UFBackendTouch touch_backend) | ||
1429 | 252 | { | ||
1430 | 253 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1431 | 254 | |||
1432 | 255 | touch->InsertProperty(UFTouchPropertyState, new oif::frame::Value(UFTouchStateEnd)); | ||
1433 | 256 | touch->SetState(UFTouchStateEnd); | ||
1434 | 257 | } | ||
1435 | 258 | |||
1436 | 259 | void frame_backend_touch_set_window_pos(UFBackendTouch touch_backend, float x, float y) | ||
1437 | 260 | { | ||
1438 | 261 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1439 | 262 | |||
1440 | 263 | touch->InsertProperty(UFTouchPropertyWindowX, new oif::frame::Value(x)); | ||
1441 | 264 | touch->InsertProperty(UFTouchPropertyWindowY, new oif::frame::Value(y)); | ||
1442 | 265 | } | ||
1443 | 266 | |||
1444 | 267 | void frame_backend_touch_set_time(UFBackendTouch touch_backend, uint64_t time) | ||
1445 | 268 | { | ||
1446 | 269 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1447 | 270 | |||
1448 | 271 | touch->InsertProperty(UFTouchPropertyTime, new oif::frame::Value(time)); | ||
1449 | 272 | } | ||
1450 | 273 | |||
1451 | 274 | void frame_backend_touch_set_start_time(UFBackendTouch touch_backend, | ||
1452 | 275 | uint64_t start_time) | ||
1453 | 276 | { | ||
1454 | 277 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1455 | 278 | |||
1456 | 279 | touch->InsertProperty(UFTouchPropertyStartTime, new oif::frame::Value(start_time)); | ||
1457 | 280 | } | ||
1458 | 281 | |||
1459 | 282 | void frame_backend_touch_set_owned(UFBackendTouch touch_backend, int owned) | ||
1460 | 283 | { | ||
1461 | 284 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1462 | 285 | |||
1463 | 286 | touch->InsertProperty(UFTouchPropertyOwned, new oif::frame::Value(owned)); | ||
1464 | 287 | } | ||
1465 | 288 | |||
1466 | 289 | void frame_backend_touch_set_pending_end(UFBackendTouch touch_backend, int pending_end) | ||
1467 | 290 | { | ||
1468 | 291 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1469 | 292 | |||
1470 | 293 | touch->InsertProperty(UFTouchPropertyPendingEnd, new oif::frame::Value(pending_end)); | ||
1471 | 294 | } | ||
1472 | 295 | |||
1473 | 296 | void frame_backend_touch_set_value(UFBackendTouch touch_backend, | ||
1474 | 297 | UFAxisType type, float value) | ||
1475 | 298 | { | ||
1476 | 299 | oif::frame::UFTouch *touch = touch_backend->GetModifiableTouch(); | ||
1477 | 300 | |||
1478 | 301 | touch->SetValue(type, value); | ||
1479 | 302 | } | ||
1480 | 303 | |||
1481 | 208 | } // extern "C" | 304 | } // extern "C" |
1482 | 209 | 305 | ||
1483 | === modified file 'src/touch.h' | |||
1484 | --- src/touch.h 2012-06-21 19:41:40 +0000 | |||
1485 | +++ src/touch.h 2012-11-08 16:29:22 +0000 | |||
1486 | @@ -34,27 +34,43 @@ | |||
1487 | 34 | virtual ~UFTouch_() {} | 34 | virtual ~UFTouch_() {} |
1488 | 35 | }; | 35 | }; |
1489 | 36 | 36 | ||
1490 | 37 | struct UFBackendTouch_ { | ||
1491 | 38 | UFBackendTouch_(oif::frame::UFTouch* touch) | ||
1492 | 39 | : shared_ptr(touch) {} | ||
1493 | 40 | |||
1494 | 41 | UFBackendTouch_(oif::frame::SharedUFTouch &shared_touch) { | ||
1495 | 42 | shared_ptr.swap(shared_touch); | ||
1496 | 43 | } | ||
1497 | 44 | |||
1498 | 45 | oif::frame::UFTouch* GetModifiableTouch(); | ||
1499 | 46 | |||
1500 | 47 | oif::frame::SharedUFTouch shared_ptr; | ||
1501 | 48 | }; | ||
1502 | 49 | |||
1503 | 37 | namespace oif { | 50 | namespace oif { |
1504 | 38 | namespace frame { | 51 | namespace frame { |
1505 | 39 | 52 | ||
1506 | 40 | class UFTouch : public UFTouch_, public Property<UFTouchProperty> { | 53 | class UFTouch : public UFTouch_, public Property<UFTouchProperty> { |
1507 | 41 | public: | 54 | public: |
1508 | 55 | UFTouch(); | ||
1509 | 42 | UFTouch(UFTouchState state, UFTouchId id, float x, float y, | 56 | UFTouch(UFTouchState state, UFTouchId id, float x, float y, |
1510 | 43 | uint64_t time); | 57 | uint64_t time); |
1511 | 44 | UFTouch(const UFTouch& touch, UFTouchState new_state); | 58 | UFTouch(const UFTouch& touch, UFTouchState new_state); |
1512 | 45 | 59 | ||
1513 | 60 | void SetId(UFTouchId id) { id_ = id; } | ||
1514 | 46 | UFTouchId id() const { return id_; } | 61 | UFTouchId id() const { return id_; } |
1515 | 62 | |||
1516 | 63 | void SetState(UFTouchState state) { state_ = state; } | ||
1517 | 47 | UFTouchState state() const { return state_; } | 64 | UFTouchState state() const { return state_; } |
1518 | 48 | 65 | ||
1519 | 49 | void SetValue(UFAxisType type, float value); | 66 | void SetValue(UFAxisType type, float value); |
1520 | 50 | UFStatus GetValue(UFAxisType type, float* value) const; | 67 | UFStatus GetValue(UFAxisType type, float* value) const; |
1521 | 51 | 68 | ||
1522 | 52 | UFTouch(const UFTouch&) = delete; | ||
1523 | 53 | UFTouch& operator=(const UFTouch&) = delete; | 69 | UFTouch& operator=(const UFTouch&) = delete; |
1524 | 54 | 70 | ||
1525 | 55 | private: | 71 | private: |
1528 | 56 | const UFTouchId id_; | 72 | UFTouchId id_; |
1529 | 57 | const UFTouchState state_; | 73 | UFTouchState state_; |
1530 | 58 | std::map<UFAxisType, float> values_; | 74 | std::map<UFAxisType, float> values_; |
1531 | 59 | }; | 75 | }; |
1532 | 60 | 76 | ||
1533 | 61 | 77 | ||
1534 | === modified file 'src/window.h' | |||
1535 | --- src/window.h 2012-06-21 19:41:40 +0000 | |||
1536 | +++ src/window.h 2012-11-08 16:29:22 +0000 | |||
1537 | @@ -31,7 +31,7 @@ | |||
1538 | 31 | namespace oif{ | 31 | namespace oif{ |
1539 | 32 | namespace frame { | 32 | namespace frame { |
1540 | 33 | 33 | ||
1542 | 34 | class Window : public std::enable_shared_from_this<Window> { | 34 | class Window { |
1543 | 35 | public: | 35 | public: |
1544 | 36 | Window(); | 36 | Window(); |
1545 | 37 | virtual ~Window() {}; | 37 | virtual ~Window() {}; |
1546 | 38 | 38 | ||
1547 | === modified file 'src/x11/device_x11.cpp' | |||
1548 | --- src/x11/device_x11.cpp 2012-06-21 19:41:40 +0000 | |||
1549 | +++ src/x11/device_x11.cpp 2012-11-08 16:29:22 +0000 | |||
1550 | @@ -135,9 +135,6 @@ | |||
1551 | 135 | } | 135 | } |
1552 | 136 | } | 136 | } |
1553 | 137 | 137 | ||
1554 | 138 | value = new Value(static_cast<unsigned int>(axes_.size())); | ||
1555 | 139 | InsertProperty(UFDevicePropertyNumAxes, value); | ||
1556 | 140 | |||
1557 | 141 | /* X11 doesn't provide us the real physical resolution of the display */ | 138 | /* X11 doesn't provide us the real physical resolution of the display */ |
1558 | 142 | value = new Value(0.f); | 139 | value = new Value(0.f); |
1559 | 143 | InsertProperty(UFDevicePropertyWindowResolutionX, value); | 140 | InsertProperty(UFDevicePropertyWindowResolutionX, value); |
1560 | 144 | 141 | ||
1561 | === modified file 'src/x11/window_x11.cpp' | |||
1562 | --- src/x11/window_x11.cpp 2012-07-24 20:47:15 +0000 | |||
1563 | +++ src/x11/window_x11.cpp 2012-11-08 16:29:22 +0000 | |||
1564 | @@ -76,7 +76,7 @@ | |||
1565 | 76 | return false; | 76 | return false; |
1566 | 77 | } | 77 | } |
1567 | 78 | 78 | ||
1569 | 79 | *frame = SharedUFFrame(new UFFrame(shared_from_this(), current_frame_)); | 79 | *frame = SharedUFFrame(new UFFrame(current_frame_)); |
1570 | 80 | 80 | ||
1571 | 81 | const Value* value = new Value(frame_x11_create_window_id(window_)); | 81 | const Value* value = new Value(frame_x11_create_window_id(window_)); |
1572 | 82 | (*frame)->InsertProperty(UFFramePropertyWindowId, value); | 82 | (*frame)->InsertProperty(UFFramePropertyWindowId, value); |
1573 | @@ -145,7 +145,7 @@ | |||
1574 | 145 | 145 | ||
1575 | 146 | bool WindowX11::HandleOwnershipEvent(const XITouchOwnershipEvent* event, | 146 | bool WindowX11::HandleOwnershipEvent(const XITouchOwnershipEvent* event, |
1576 | 147 | SharedUFFrame* frame) { | 147 | SharedUFFrame* frame) { |
1578 | 148 | *frame = SharedUFFrame(new UFFrame(shared_from_this(), current_frame_)); | 148 | *frame = SharedUFFrame(new UFFrame(current_frame_)); |
1579 | 149 | 149 | ||
1580 | 150 | const Value* value = new Value(frame_x11_create_window_id(window_)); | 150 | const Value* value = new Value(frame_x11_create_window_id(window_)); |
1581 | 151 | (*frame)->InsertProperty(UFFramePropertyWindowId, value); | 151 | (*frame)->InsertProperty(UFFramePropertyWindowId, value); |
1582 | 152 | 152 | ||
1583 | === modified file 'test/Makefile.in' | |||
1584 | --- test/Makefile.in 2012-07-26 18:35:10 +0000 | |||
1585 | +++ test/Makefile.in 2012-11-08 16:29:22 +0000 | |||
1586 | @@ -1,4 +1,4 @@ | |||
1588 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
1589 | 2 | # @configure_input@ | 2 | # @configure_input@ |
1590 | 3 | 3 | ||
1591 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
1592 | 5 | 5 | ||
1593 | === modified file 'test/gtest/Makefile.in' | |||
1594 | --- test/gtest/Makefile.in 2012-07-26 18:35:10 +0000 | |||
1595 | +++ test/gtest/Makefile.in 2012-11-08 16:29:22 +0000 | |||
1596 | @@ -1,4 +1,4 @@ | |||
1598 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
1599 | 2 | # @configure_input@ | 2 | # @configure_input@ |
1600 | 3 | 3 | ||
1601 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
1602 | 5 | 5 | ||
1603 | === modified file 'test/integration/Makefile.in' | |||
1604 | --- test/integration/Makefile.in 2012-07-26 18:35:10 +0000 | |||
1605 | +++ test/integration/Makefile.in 2012-11-08 16:29:22 +0000 | |||
1606 | @@ -1,4 +1,4 @@ | |||
1608 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
1609 | 2 | # @configure_input@ | 2 | # @configure_input@ |
1610 | 3 | 3 | ||
1611 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
1612 | 5 | 5 | ||
1613 | === modified file 'test/regular/Makefile.am' | |||
1614 | --- test/regular/Makefile.am 2012-07-25 22:36:11 +0000 | |||
1615 | +++ test/regular/Makefile.am 2012-11-08 16:29:22 +0000 | |||
1616 | @@ -38,6 +38,7 @@ | |||
1617 | 38 | 38 | ||
1618 | 39 | check_regular_SOURCES = \ | 39 | check_regular_SOURCES = \ |
1619 | 40 | accept-ended-touch.cpp \ | 40 | accept-ended-touch.cpp \ |
1620 | 41 | backend.cpp \ | ||
1621 | 41 | frame-fixture.cpp \ | 42 | frame-fixture.cpp \ |
1622 | 42 | frame-fixture.h | 43 | frame-fixture.h |
1623 | 43 | 44 | ||
1624 | 44 | 45 | ||
1625 | === modified file 'test/regular/Makefile.in' | |||
1626 | --- test/regular/Makefile.in 2012-07-26 18:35:10 +0000 | |||
1627 | +++ test/regular/Makefile.in 2012-11-08 16:29:22 +0000 | |||
1628 | @@ -1,4 +1,4 @@ | |||
1630 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
1631 | 2 | # @configure_input@ | 2 | # @configure_input@ |
1632 | 3 | 3 | ||
1633 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
1634 | @@ -84,6 +84,7 @@ | |||
1635 | 84 | check_cxx_compile_DEPENDENCIES = $(top_builddir)/src/libframe.la \ | 84 | check_cxx_compile_DEPENDENCIES = $(top_builddir)/src/libframe.la \ |
1636 | 85 | $(am__DEPENDENCIES_1) | 85 | $(am__DEPENDENCIES_1) |
1637 | 86 | am_check_regular_OBJECTS = check_regular-accept-ended-touch.$(OBJEXT) \ | 86 | am_check_regular_OBJECTS = check_regular-accept-ended-touch.$(OBJEXT) \ |
1638 | 87 | check_regular-backend.$(OBJEXT) \ | ||
1639 | 87 | check_regular-frame-fixture.$(OBJEXT) | 88 | check_regular-frame-fixture.$(OBJEXT) |
1640 | 88 | check_regular_OBJECTS = $(am_check_regular_OBJECTS) | 89 | check_regular_OBJECTS = $(am_check_regular_OBJECTS) |
1641 | 89 | check_regular_DEPENDENCIES = $(top_builddir)/src/.libs/libframe.a \ | 90 | check_regular_DEPENDENCIES = $(top_builddir)/src/.libs/libframe.a \ |
1642 | @@ -340,6 +341,7 @@ | |||
1643 | 340 | ### check-regular | 341 | ### check-regular |
1644 | 341 | check_regular_SOURCES = \ | 342 | check_regular_SOURCES = \ |
1645 | 342 | accept-ended-touch.cpp \ | 343 | accept-ended-touch.cpp \ |
1646 | 344 | backend.cpp \ | ||
1647 | 343 | frame-fixture.cpp \ | 345 | frame-fixture.cpp \ |
1648 | 344 | frame-fixture.h | 346 | frame-fixture.h |
1649 | 345 | 347 | ||
1650 | @@ -426,6 +428,7 @@ | |||
1651 | 426 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-cxx-compile.Po@am__quote@ | 428 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-cxx-compile.Po@am__quote@ |
1652 | 427 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-static-type-checking.Po@am__quote@ | 429 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-static-type-checking.Po@am__quote@ |
1653 | 428 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_regular-accept-ended-touch.Po@am__quote@ | 430 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_regular-accept-ended-touch.Po@am__quote@ |
1654 | 431 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_regular-backend.Po@am__quote@ | ||
1655 | 429 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_regular-frame-fixture.Po@am__quote@ | 432 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_regular-frame-fixture.Po@am__quote@ |
1656 | 430 | 433 | ||
1657 | 431 | .c.o: | 434 | .c.o: |
1658 | @@ -484,6 +487,20 @@ | |||
1659 | 484 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | 487 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
1660 | 485 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o check_regular-accept-ended-touch.obj `if test -f 'accept-ended-touch.cpp'; then $(CYGPATH_W) 'accept-ended-touch.cpp'; else $(CYGPATH_W) '$(srcdir)/accept-ended-touch.cpp'; fi` | 488 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o check_regular-accept-ended-touch.obj `if test -f 'accept-ended-touch.cpp'; then $(CYGPATH_W) 'accept-ended-touch.cpp'; else $(CYGPATH_W) '$(srcdir)/accept-ended-touch.cpp'; fi` |
1661 | 486 | 489 | ||
1662 | 490 | check_regular-backend.o: backend.cpp | ||
1663 | 491 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT check_regular-backend.o -MD -MP -MF $(DEPDIR)/check_regular-backend.Tpo -c -o check_regular-backend.o `test -f 'backend.cpp' || echo '$(srcdir)/'`backend.cpp | ||
1664 | 492 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_regular-backend.Tpo $(DEPDIR)/check_regular-backend.Po | ||
1665 | 493 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='backend.cpp' object='check_regular-backend.o' libtool=no @AMDEPBACKSLASH@ | ||
1666 | 494 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
1667 | 495 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o check_regular-backend.o `test -f 'backend.cpp' || echo '$(srcdir)/'`backend.cpp | ||
1668 | 496 | |||
1669 | 497 | check_regular-backend.obj: backend.cpp | ||
1670 | 498 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT check_regular-backend.obj -MD -MP -MF $(DEPDIR)/check_regular-backend.Tpo -c -o check_regular-backend.obj `if test -f 'backend.cpp'; then $(CYGPATH_W) 'backend.cpp'; else $(CYGPATH_W) '$(srcdir)/backend.cpp'; fi` | ||
1671 | 499 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_regular-backend.Tpo $(DEPDIR)/check_regular-backend.Po | ||
1672 | 500 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='backend.cpp' object='check_regular-backend.obj' libtool=no @AMDEPBACKSLASH@ | ||
1673 | 501 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
1674 | 502 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o check_regular-backend.obj `if test -f 'backend.cpp'; then $(CYGPATH_W) 'backend.cpp'; else $(CYGPATH_W) '$(srcdir)/backend.cpp'; fi` | ||
1675 | 503 | |||
1676 | 487 | check_regular-frame-fixture.o: frame-fixture.cpp | 504 | check_regular-frame-fixture.o: frame-fixture.cpp |
1677 | 488 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT check_regular-frame-fixture.o -MD -MP -MF $(DEPDIR)/check_regular-frame-fixture.Tpo -c -o check_regular-frame-fixture.o `test -f 'frame-fixture.cpp' || echo '$(srcdir)/'`frame-fixture.cpp | 505 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_regular_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT check_regular-frame-fixture.o -MD -MP -MF $(DEPDIR)/check_regular-frame-fixture.Tpo -c -o check_regular-frame-fixture.o `test -f 'frame-fixture.cpp' || echo '$(srcdir)/'`frame-fixture.cpp |
1678 | 489 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_regular-frame-fixture.Tpo $(DEPDIR)/check_regular-frame-fixture.Po | 506 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_regular-frame-fixture.Tpo $(DEPDIR)/check_regular-frame-fixture.Po |
1679 | 490 | 507 | ||
1680 | === added file 'test/regular/backend.cpp' | |||
1681 | --- test/regular/backend.cpp 1970-01-01 00:00:00 +0000 | |||
1682 | +++ test/regular/backend.cpp 2012-11-08 16:29:22 +0000 | |||
1683 | @@ -0,0 +1,289 @@ | |||
1684 | 1 | #include <gtest/gtest.h> | ||
1685 | 2 | #include "oif/frame_backend.h" | ||
1686 | 3 | |||
1687 | 4 | TEST(Backend, Touch) | ||
1688 | 5 | { | ||
1689 | 6 | UFStatus status; | ||
1690 | 7 | |||
1691 | 8 | UFBackendTouch touch_backend = frame_backend_touch_new(); | ||
1692 | 9 | ASSERT_TRUE(touch_backend != nullptr); | ||
1693 | 10 | |||
1694 | 11 | UFTouch touch = frame_backend_touch_get_touch(touch_backend); | ||
1695 | 12 | ASSERT_TRUE(touch != nullptr); | ||
1696 | 13 | |||
1697 | 14 | ASSERT_EQ(UFTouchStateBegin, frame_touch_get_state(touch)); | ||
1698 | 15 | |||
1699 | 16 | frame_backend_touch_set_id(touch_backend, 123); | ||
1700 | 17 | ASSERT_EQ(123, frame_touch_get_id(touch)); | ||
1701 | 18 | |||
1702 | 19 | frame_backend_touch_set_ended(touch_backend); | ||
1703 | 20 | ASSERT_EQ(UFTouchStateEnd, frame_touch_get_state(touch)); | ||
1704 | 21 | |||
1705 | 22 | frame_backend_touch_set_window_pos(touch_backend, 1.2f, 3.4f); | ||
1706 | 23 | ASSERT_EQ(1.2f, frame_touch_get_window_x(touch)); | ||
1707 | 24 | ASSERT_EQ(3.4f, frame_touch_get_window_y(touch)); | ||
1708 | 25 | |||
1709 | 26 | frame_backend_touch_set_time(touch_backend, 852); | ||
1710 | 27 | ASSERT_EQ(852, frame_touch_get_time(touch)); | ||
1711 | 28 | |||
1712 | 29 | frame_backend_touch_set_start_time(touch_backend, 555); | ||
1713 | 30 | ASSERT_EQ(555, frame_touch_get_start_time(touch)); | ||
1714 | 31 | |||
1715 | 32 | frame_backend_touch_set_owned(touch_backend, 1); | ||
1716 | 33 | int owned = 0; | ||
1717 | 34 | status = frame_touch_get_property(touch, UFTouchPropertyOwned, &owned); | ||
1718 | 35 | ASSERT_EQ(UFStatusSuccess, status); | ||
1719 | 36 | ASSERT_EQ(1, owned); | ||
1720 | 37 | |||
1721 | 38 | frame_backend_touch_set_pending_end(touch_backend, 1); | ||
1722 | 39 | int pending_end = 0; | ||
1723 | 40 | status = frame_touch_get_property(touch, UFTouchPropertyPendingEnd, &pending_end); | ||
1724 | 41 | ASSERT_EQ(UFStatusSuccess, status); | ||
1725 | 42 | ASSERT_EQ(1, pending_end); | ||
1726 | 43 | |||
1727 | 44 | frame_backend_touch_set_value(touch_backend, UFAxisTypeTouchMajor, 987.6f); | ||
1728 | 45 | float touch_major = 0.0f; | ||
1729 | 46 | status = frame_touch_get_value(touch, UFAxisTypeTouchMajor, &touch_major); | ||
1730 | 47 | ASSERT_EQ(UFStatusSuccess, status); | ||
1731 | 48 | ASSERT_EQ(987.6f, touch_major); | ||
1732 | 49 | |||
1733 | 50 | /* clean up */ | ||
1734 | 51 | UFBackendFrame frame = frame_backend_frame_new(); | ||
1735 | 52 | frame_backend_frame_give_touch(frame, &touch_backend); | ||
1736 | 53 | frame_backend_frame_delete(frame); | ||
1737 | 54 | } | ||
1738 | 55 | |||
1739 | 56 | TEST(Backend, Device) | ||
1740 | 57 | { | ||
1741 | 58 | UFStatus status; | ||
1742 | 59 | |||
1743 | 60 | UFBackendDevice device_backend = frame_backend_device_new(); | ||
1744 | 61 | ASSERT_NE(nullptr, device_backend); | ||
1745 | 62 | |||
1746 | 63 | UFDevice device = frame_backend_device_get_device(device_backend); | ||
1747 | 64 | ASSERT_NE(nullptr, device); | ||
1748 | 65 | |||
1749 | 66 | const char *name = nullptr; | ||
1750 | 67 | status = frame_device_get_property(device, UFDevicePropertyName, &name); | ||
1751 | 68 | ASSERT_EQ(UFStatusErrorUnknownProperty, status); | ||
1752 | 69 | frame_backend_device_set_name(device_backend, "Hello World"); | ||
1753 | 70 | status = frame_device_get_property(device, UFDevicePropertyName, &name); | ||
1754 | 71 | ASSERT_EQ(UFStatusSuccess, status); | ||
1755 | 72 | ASSERT_STREQ("Hello World", name); | ||
1756 | 73 | |||
1757 | 74 | int direct = 0; | ||
1758 | 75 | status = frame_device_get_property(device, UFDevicePropertyDirect, &direct); | ||
1759 | 76 | ASSERT_EQ(UFStatusErrorUnknownProperty, status); | ||
1760 | 77 | frame_backend_device_set_direct(device_backend, 1); | ||
1761 | 78 | status = frame_device_get_property(device, UFDevicePropertyDirect, &direct); | ||
1762 | 79 | ASSERT_EQ(UFStatusSuccess, status); | ||
1763 | 80 | ASSERT_EQ(1, direct); | ||
1764 | 81 | |||
1765 | 82 | int independent = 0; | ||
1766 | 83 | status = frame_device_get_property(device, UFDevicePropertyIndependent, &independent); | ||
1767 | 84 | ASSERT_EQ(UFStatusErrorUnknownProperty, status); | ||
1768 | 85 | frame_backend_device_set_independent(device_backend, 1); | ||
1769 | 86 | status = frame_device_get_property(device, UFDevicePropertyIndependent, &independent); | ||
1770 | 87 | ASSERT_EQ(UFStatusSuccess, status); | ||
1771 | 88 | ASSERT_EQ(1, independent); | ||
1772 | 89 | |||
1773 | 90 | int semi_mt = 0; | ||
1774 | 91 | status = frame_device_get_property(device, UFDevicePropertySemiMT, &semi_mt); | ||
1775 | 92 | ASSERT_EQ(UFStatusErrorUnknownProperty, status); | ||
1776 | 93 | frame_backend_device_set_semi_mt(device_backend, 1); | ||
1777 | 94 | status = frame_device_get_property(device, UFDevicePropertySemiMT, &semi_mt); | ||
1778 | 95 | ASSERT_EQ(UFStatusSuccess, status); | ||
1779 | 96 | ASSERT_EQ(1, semi_mt); | ||
1780 | 97 | |||
1781 | 98 | unsigned int max_touches = 0; | ||
1782 | 99 | status = frame_device_get_property(device, UFDevicePropertyMaxTouches, &max_touches); | ||
1783 | 100 | ASSERT_EQ(UFStatusErrorUnknownProperty, status); | ||
1784 | 101 | frame_backend_device_set_max_touches(device_backend, 5); | ||
1785 | 102 | status = frame_device_get_property(device, UFDevicePropertyMaxTouches, &max_touches); | ||
1786 | 103 | ASSERT_EQ(UFStatusSuccess, status); | ||
1787 | 104 | ASSERT_EQ(5, max_touches); | ||
1788 | 105 | |||
1789 | 106 | frame_backend_device_set_window_resolution(device_backend, 1024.0f, 768.0f); | ||
1790 | 107 | ASSERT_EQ(1024.0f, frame_device_get_window_resolution_x(device)); | ||
1791 | 108 | ASSERT_EQ(768.0f, frame_device_get_window_resolution_y(device)); | ||
1792 | 109 | |||
1793 | 110 | unsigned int num_axes = 0; | ||
1794 | 111 | status = frame_device_get_property(device, UFDevicePropertyNumAxes, &num_axes); | ||
1795 | 112 | ASSERT_EQ(UFStatusSuccess, status); | ||
1796 | 113 | ASSERT_EQ(0, num_axes); | ||
1797 | 114 | frame_backend_device_add_axis(device_backend, | ||
1798 | 115 | UFAxisTypePressure, 1.0f, 1000.0f, 3.5f); | ||
1799 | 116 | status = frame_device_get_property(device, UFDevicePropertyNumAxes, &num_axes); | ||
1800 | 117 | ASSERT_EQ(UFStatusSuccess, status); | ||
1801 | 118 | ASSERT_EQ(1, num_axes); | ||
1802 | 119 | UFAxis axis = nullptr; | ||
1803 | 120 | status = frame_device_get_axis_by_type(device, UFAxisTypePressure, &axis); | ||
1804 | 121 | ASSERT_EQ(UFStatusSuccess, status); | ||
1805 | 122 | ASSERT_NE(nullptr, axis); | ||
1806 | 123 | ASSERT_EQ(UFAxisTypePressure, frame_axis_get_type(axis)); | ||
1807 | 124 | ASSERT_EQ(1.0f, frame_axis_get_minimum(axis)); | ||
1808 | 125 | ASSERT_EQ(1000.0f, frame_axis_get_maximum(axis)); | ||
1809 | 126 | ASSERT_EQ(3.5f, frame_axis_get_resolution(axis)); | ||
1810 | 127 | |||
1811 | 128 | frame_backend_device_delete(device_backend); | ||
1812 | 129 | } | ||
1813 | 130 | |||
1814 | 131 | TEST(Backend, Frame) | ||
1815 | 132 | { | ||
1816 | 133 | UFStatus status; | ||
1817 | 134 | |||
1818 | 135 | UFBackendFrame frame_backend = frame_backend_frame_new(); | ||
1819 | 136 | ASSERT_NE(nullptr, frame_backend); | ||
1820 | 137 | |||
1821 | 138 | UFFrame frame = frame_backend_frame_get_frame(frame_backend); | ||
1822 | 139 | ASSERT_NE(nullptr, frame); | ||
1823 | 140 | |||
1824 | 141 | UFBackendDevice device_backend = frame_backend_device_new(); | ||
1825 | 142 | UFDevice device = frame_backend_device_get_device(device_backend); | ||
1826 | 143 | |||
1827 | 144 | frame_backend_frame_set_device(frame_backend, device_backend); | ||
1828 | 145 | ASSERT_EQ(device, frame_frame_get_device(frame)); | ||
1829 | 146 | |||
1830 | 147 | frame_backend_frame_set_window_id(frame_backend, 123); | ||
1831 | 148 | ASSERT_EQ(123, frame_frame_get_window_id(frame)); | ||
1832 | 149 | |||
1833 | 150 | |||
1834 | 151 | unsigned int active_touches = 0; | ||
1835 | 152 | UFBackendTouch touch_backend = frame_backend_touch_new(); | ||
1836 | 153 | UFTouch touch = frame_backend_touch_get_touch(touch_backend); | ||
1837 | 154 | frame_backend_touch_set_id(touch_backend, 10); | ||
1838 | 155 | UFTouch touch_retrieved = nullptr; | ||
1839 | 156 | ASSERT_EQ(0, frame_frame_get_num_touches(frame)); | ||
1840 | 157 | status = frame_frame_get_property(frame, UFFramePropertyActiveTouches, &active_touches); | ||
1841 | 158 | ASSERT_EQ(UFStatusSuccess, status); | ||
1842 | 159 | ASSERT_EQ(0, active_touches); | ||
1843 | 160 | status = frame_backend_frame_give_touch(frame_backend, &touch_backend); | ||
1844 | 161 | ASSERT_EQ(UFStatusSuccess, status); | ||
1845 | 162 | ASSERT_EQ(nullptr, touch_backend); | ||
1846 | 163 | ASSERT_EQ(1, frame_frame_get_num_touches(frame)); | ||
1847 | 164 | status = frame_frame_get_property(frame, UFFramePropertyActiveTouches, &active_touches); | ||
1848 | 165 | ASSERT_EQ(UFStatusSuccess, status); | ||
1849 | 166 | ASSERT_EQ(1, active_touches); | ||
1850 | 167 | status = frame_frame_get_touch_by_id(frame, 10, &touch_retrieved); | ||
1851 | 168 | ASSERT_EQ(UFStatusSuccess, status); | ||
1852 | 169 | ASSERT_EQ(touch, touch_retrieved); | ||
1853 | 170 | |||
1854 | 171 | frame_backend_frame_set_active_touches(frame_backend, 3); | ||
1855 | 172 | status = frame_frame_get_property(frame, UFFramePropertyActiveTouches, &active_touches); | ||
1856 | 173 | ASSERT_EQ(UFStatusSuccess, status); | ||
1857 | 174 | ASSERT_EQ(3, active_touches); | ||
1858 | 175 | |||
1859 | 176 | frame_backend_frame_delete(frame_backend); | ||
1860 | 177 | frame_backend_device_delete(device_backend); | ||
1861 | 178 | } | ||
1862 | 179 | |||
1863 | 180 | TEST(Backend, FrameBorrowInexistentTouch) | ||
1864 | 181 | { | ||
1865 | 182 | UFStatus status; | ||
1866 | 183 | |||
1867 | 184 | UFBackendFrame frame_backend = frame_backend_frame_new(); | ||
1868 | 185 | |||
1869 | 186 | UFBackendTouch touch_backend; | ||
1870 | 187 | status = frame_backend_frame_borrow_touch_by_id(frame_backend, 123, &touch_backend); | ||
1871 | 188 | ASSERT_EQ(UFStatusErrorInvalidTouch, status); | ||
1872 | 189 | |||
1873 | 190 | /* clean up */ | ||
1874 | 191 | frame_backend_frame_delete(frame_backend); | ||
1875 | 192 | } | ||
1876 | 193 | |||
1877 | 194 | TEST(Backend, FrameCreateNext) | ||
1878 | 195 | { | ||
1879 | 196 | UFStatus status; | ||
1880 | 197 | |||
1881 | 198 | /* frame 1 */ | ||
1882 | 199 | UFBackendTouch touch_backend = frame_backend_touch_new(); | ||
1883 | 200 | frame_backend_touch_set_id(touch_backend, 1); | ||
1884 | 201 | UFTouch frame1_touch = frame_backend_touch_get_touch(touch_backend); | ||
1885 | 202 | |||
1886 | 203 | UFBackendFrame frame1_backend = frame_backend_frame_new(); | ||
1887 | 204 | status = frame_backend_frame_give_touch(frame1_backend, &touch_backend); | ||
1888 | 205 | ASSERT_EQ(UFStatusSuccess, status); | ||
1889 | 206 | |||
1890 | 207 | /* frame 2 */ | ||
1891 | 208 | UFBackendFrame frame2_backend = frame_backend_frame_create_next(frame1_backend); | ||
1892 | 209 | UFFrame frame2 = frame_backend_frame_get_frame(frame2_backend); | ||
1893 | 210 | |||
1894 | 211 | UFTouch frame2_touch; | ||
1895 | 212 | status = frame_frame_get_touch_by_id(frame2, 1, &frame2_touch); | ||
1896 | 213 | ASSERT_EQ(UFStatusSuccess, status); | ||
1897 | 214 | |||
1898 | 215 | /* frame 3 */ | ||
1899 | 216 | UFBackendFrame frame3_backend = frame_backend_frame_create_next(frame2_backend); | ||
1900 | 217 | UFFrame frame3 = frame_backend_frame_get_frame(frame3_backend); | ||
1901 | 218 | |||
1902 | 219 | UFTouch frame3_touch; | ||
1903 | 220 | status = frame_frame_get_touch_by_id(frame3, 1, &frame3_touch); | ||
1904 | 221 | ASSERT_EQ(UFStatusSuccess, status); | ||
1905 | 222 | |||
1906 | 223 | /* frame 4 */ | ||
1907 | 224 | UFBackendFrame frame4_backend = frame_backend_frame_create_next(frame3_backend); | ||
1908 | 225 | |||
1909 | 226 | status = frame_backend_frame_borrow_touch_by_id(frame4_backend, 1, &touch_backend); | ||
1910 | 227 | ASSERT_EQ(UFStatusSuccess, status); | ||
1911 | 228 | frame_backend_touch_set_ended(touch_backend); | ||
1912 | 229 | status = frame_backend_frame_give_touch(frame4_backend, &touch_backend); | ||
1913 | 230 | ASSERT_EQ(UFStatusSuccess, status); | ||
1914 | 231 | |||
1915 | 232 | UFFrame frame4 = frame_backend_frame_get_frame(frame4_backend); | ||
1916 | 233 | UFTouch frame4_touch; | ||
1917 | 234 | status = frame_frame_get_touch_by_id(frame4, 1, &frame4_touch); | ||
1918 | 235 | ASSERT_EQ(UFStatusSuccess, status); | ||
1919 | 236 | |||
1920 | 237 | /* frame 5 */ | ||
1921 | 238 | UFBackendFrame frame5_backend = frame_backend_frame_create_next(frame4_backend); | ||
1922 | 239 | UFFrame frame5 = frame_backend_frame_get_frame(frame5_backend); | ||
1923 | 240 | |||
1924 | 241 | /* Test the status of touch 1 throughout all frames */ | ||
1925 | 242 | ASSERT_EQ(UFTouchStateBegin, frame_touch_get_state(frame1_touch)); | ||
1926 | 243 | ASSERT_EQ(UFTouchStateUpdate, frame_touch_get_state(frame2_touch)); | ||
1927 | 244 | ASSERT_EQ(UFTouchStateUpdate, frame_touch_get_state(frame3_touch)); | ||
1928 | 245 | ASSERT_EQ(frame2_touch, frame3_touch); | ||
1929 | 246 | ASSERT_EQ(UFTouchStateEnd, frame_touch_get_state(frame4_touch)); | ||
1930 | 247 | ASSERT_EQ(0, frame_frame_get_num_touches(frame5)); | ||
1931 | 248 | |||
1932 | 249 | /* clean up */ | ||
1933 | 250 | frame_backend_frame_delete(frame1_backend); | ||
1934 | 251 | frame_backend_frame_delete(frame2_backend); | ||
1935 | 252 | frame_backend_frame_delete(frame3_backend); | ||
1936 | 253 | frame_backend_frame_delete(frame4_backend); | ||
1937 | 254 | frame_backend_frame_delete(frame5_backend); | ||
1938 | 255 | } | ||
1939 | 256 | |||
1940 | 257 | TEST(Backend, Event) | ||
1941 | 258 | { | ||
1942 | 259 | UFStatus status; | ||
1943 | 260 | |||
1944 | 261 | UFEvent event = frame_event_new(); | ||
1945 | 262 | ASSERT_NE(nullptr, event); | ||
1946 | 263 | |||
1947 | 264 | frame_event_set_type(event, UFEventTypeDeviceRemoved); | ||
1948 | 265 | ASSERT_EQ(UFEventTypeDeviceRemoved, frame_event_get_type(event)); | ||
1949 | 266 | |||
1950 | 267 | UFBackendDevice device_backend = frame_backend_device_new(); | ||
1951 | 268 | UFDevice device = frame_backend_device_get_device(device_backend); | ||
1952 | 269 | UFDevice device_retrieved = nullptr; | ||
1953 | 270 | frame_event_set_device(event, device_backend); | ||
1954 | 271 | status = frame_event_get_property(event, UFEventPropertyDevice, &device_retrieved); | ||
1955 | 272 | ASSERT_EQ(UFStatusSuccess, status); | ||
1956 | 273 | ASSERT_EQ(device, device_retrieved); | ||
1957 | 274 | |||
1958 | 275 | UFBackendFrame frame_backend = frame_backend_frame_new(); | ||
1959 | 276 | UFFrame frame = frame_backend_frame_get_frame(frame_backend); | ||
1960 | 277 | UFFrame frame_retrieved = nullptr; | ||
1961 | 278 | frame_event_set_frame(event, frame_backend); | ||
1962 | 279 | status = frame_event_get_property(event, UFEventPropertyFrame, &frame_retrieved); | ||
1963 | 280 | ASSERT_EQ(UFStatusSuccess, status); | ||
1964 | 281 | ASSERT_EQ(frame, frame_retrieved); | ||
1965 | 282 | |||
1966 | 283 | frame_event_set_time(event, 1234); | ||
1967 | 284 | ASSERT_EQ(1234, frame_event_get_time(event)); | ||
1968 | 285 | |||
1969 | 286 | frame_event_unref(event); | ||
1970 | 287 | frame_backend_device_delete(device_backend); | ||
1971 | 288 | frame_backend_frame_delete(frame_backend); | ||
1972 | 289 | } | ||
1973 | 0 | 290 | ||
1974 | === modified file 'test/regular/frame-fixture.cpp' | |||
1975 | --- test/regular/frame-fixture.cpp 2012-07-17 14:27:23 +0000 | |||
1976 | +++ test/regular/frame-fixture.cpp 2012-11-08 16:29:22 +0000 | |||
1977 | @@ -106,6 +106,10 @@ | |||
1978 | 106 | 106 | ||
1979 | 107 | status = frame_x11_process_event(frame_handle, &xcookie); | 107 | status = frame_x11_process_event(frame_handle, &xcookie); |
1980 | 108 | ASSERT_EQ(UFStatusSuccess, status); | 108 | ASSERT_EQ(UFStatusSuccess, status); |
1981 | 109 | |||
1982 | 110 | free(device_event->valuators.mask); | ||
1983 | 111 | free(device_event->valuators.values); | ||
1984 | 112 | free(device_event); | ||
1985 | 109 | } | 113 | } |
1986 | 110 | 114 | ||
1987 | 111 | void FrameFixture::SendTouchOwnershipEvent(int touch_id) | 115 | void FrameFixture::SendTouchOwnershipEvent(int touch_id) |
1988 | @@ -133,6 +137,8 @@ | |||
1989 | 133 | 137 | ||
1990 | 134 | status = frame_x11_process_event(frame_handle, &xcookie); | 138 | status = frame_x11_process_event(frame_handle, &xcookie); |
1991 | 135 | ASSERT_EQ(UFStatusSuccess, status); | 139 | ASSERT_EQ(UFStatusSuccess, status); |
1992 | 140 | |||
1993 | 141 | free(ownership_event); | ||
1994 | 136 | } | 142 | } |
1995 | 137 | 143 | ||
1996 | 138 | void FrameFixture::FetchDeviceAddedEvent(UFDevice *device) | 144 | void FrameFixture::FetchDeviceAddedEvent(UFDevice *device) |
1997 | 139 | 145 | ||
1998 | === modified file 'test/x11_mocks/Makefile.in' | |||
1999 | --- test/x11_mocks/Makefile.in 2012-07-26 18:35:10 +0000 | |||
2000 | +++ test/x11_mocks/Makefile.in 2012-11-08 16:29:22 +0000 | |||
2001 | @@ -1,4 +1,4 @@ | |||
2003 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
2004 | 2 | # @configure_input@ | 2 | # @configure_input@ |
2005 | 3 | 3 | ||
2006 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
2007 | 5 | 5 | ||
2008 | === modified file 'tools/Makefile.in' | |||
2009 | --- tools/Makefile.in 2012-07-26 18:43:01 +0000 | |||
2010 | +++ tools/Makefile.in 2012-11-08 16:29:22 +0000 | |||
2011 | @@ -1,4 +1,4 @@ | |||
2013 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | 1 | # Makefile.in generated by automake 1.11.6 from Makefile.am. |
2014 | 2 | # @configure_input@ | 2 | # @configure_input@ |
2015 | 3 | 3 | ||
2016 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
2017 | 5 | 5 | ||
2018 | === modified file 'tools/frame-test-x11.1' | |||
2019 | --- tools/frame-test-x11.1 2012-07-26 18:35:10 +0000 | |||
2020 | +++ tools/frame-test-x11.1 2012-11-08 16:29:22 +0000 | |||
2021 | @@ -2,12 +2,12 @@ | |||
2022 | 2 | .\" Title: frame-test-x11 | 2 | .\" Title: frame-test-x11 |
2023 | 3 | .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] | 3 | .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
2024 | 4 | .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> | 4 | .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> |
2026 | 5 | .\" Date: 07/25/2012 | 5 | .\" Date: 11/08/2012 |
2027 | 6 | .\" Manual: \ \& | 6 | .\" Manual: \ \& |
2028 | 7 | .\" Source: \ \& | 7 | .\" Source: \ \& |
2029 | 8 | .\" Language: English | 8 | .\" Language: English |
2030 | 9 | .\" | 9 | .\" |
2032 | 10 | .TH "FRAME\-TEST\-X11" "1" "07/25/2012" "\ \&" "\ \&" | 10 | .TH "FRAME\-TEST\-X11" "1" "11/08/2012" "\ \&" "\ \&" |
2033 | 11 | .\" ----------------------------------------------------------------- | 11 | .\" ----------------------------------------------------------------- |
2034 | 12 | .\" * Define some portability stuff | 12 | .\" * Define some portability stuff |
2035 | 13 | .\" ----------------------------------------------------------------- | 13 | .\" ----------------------------------------------------------------- |
Looks good, builds cleanly.