Merge lp:~fginther/frame/frame-1.1.4.1-oneiric into lp:frame/oneiric
- frame-1.1.4.1-oneiric
- Merge into oneiric
Proposed by
Francis Ginther
Status: | Merged |
---|---|
Approved by: | Daniel d'Andrada |
Approved revision: | 38 |
Merged at revision: | 36 |
Proposed branch: | lp:~fginther/frame/frame-1.1.4.1-oneiric |
Merge into: | lp:frame/oneiric |
Diff against target: |
3511 lines (+1193/-1259) 45 files modified
ChangeLog (+15/-0) INSTALL (+5/-5) Makefile.am (+1/-1) Makefile.in (+4/-4) README (+1/-1) configure (+24/-24) configure.ac (+4/-4) debian/changelog (+11/-81) debian/control (+15/-9) debian/copyright (+2/-2) debian/libframe-dev.install (+1/-1) debian/libframe1-udeb.install (+1/-1) debian/libframe1.install (+1/-1) debian/libframe1.symbols (+16/-16) debian/rules (+1/-1) debian/watch (+1/-1) frame.pc.in (+10/-0) include/oif/frame-mtdev.h (+46/-0) include/oif/frame-xi2.h (+48/-0) include/oif/frame.h (+307/-0) include/utouch/frame-mtdev.h (+0/-47) include/utouch/frame-xi2.h (+0/-49) include/utouch/frame.h (+0/-307) src/Makefile.am (+13/-13) src/Makefile.in (+40/-43) src/frame-impl.h (+6/-6) src/frame-mtdev.c (+16/-17) src/frame-xi2.c (+29/-32) src/frame.c (+65/-69) src/libframe.ver (+21/-0) src/libutouch-frame.ver (+0/-21) tools/Makefile.am (+12/-12) tools/Makefile.in (+42/-46) tools/common-defs.h (+5/-5) tools/frame-test-mtdev.1 (+42/-0) tools/frame-test-mtdev.c (+167/-0) tools/frame-test-mtdev.txt (+22/-0) tools/frame-test-xi2.c (+177/-0) tools/frame-test-xi2.txt (+22/-0) tools/utouch-frame-test-mtdev.1 (+0/-42) tools/utouch-frame-test-mtdev.c (+0/-167) tools/utouch-frame-test-mtdev.txt (+0/-22) tools/utouch-frame-test-xi2.c (+0/-177) tools/utouch-frame-test-xi2.txt (+0/-22) utouch-frame.pc.in (+0/-10) |
To merge this branch: | bzr merge lp:~fginther/frame/frame-1.1.4.1-oneiric |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel d'Andrada (community) | Approve | ||
Review via email: mp+120824@code.launchpad.net |
Commit message
* New upstream microrelease, bug fixes only
- Rename project to simply 'frame' (LP: #1039610)
* Updated debian/watch file for project rename
* Rename package and update packaging
- Added Conflicts and Replaces clauses for libframe-dev, frame-tools and
libframe1
Description of the change
The primary rationale for this change is to repackage frame for the project rename.
* New upstream microrelease, bug fixes only
- Rename project to simply 'frame' (LP: #1039610)
* Updated debian/watch file for project rename
* Rename package and update packaging
- Added Conflicts and Replaces clauses for libframe-dev, frame-tools and
libframe1
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 'ChangeLog' |
2 | --- ChangeLog 2011-08-09 21:39:02 +0000 |
3 | +++ ChangeLog 2012-08-22 16:25:28 +0000 |
4 | @@ -1,4 +1,19 @@ |
5 | ------------------------------------------------------------ |
6 | +revno: 43 |
7 | +tags: v1.1.4.1 |
8 | +committer: Chase Douglas <chase.douglas@canonical.com> |
9 | +branch nick: 1.1.4 |
10 | +timestamp: Wed 2012-08-15 19:07:41 +0000 |
11 | +message: |
12 | + Release version 1.1.4.1 |
13 | +------------------------------------------------------------ |
14 | +revno: 42 |
15 | +committer: Chase Douglas <chase.douglas@canonical.com> |
16 | +branch nick: 1.1.4 |
17 | +timestamp: Wed 2012-08-15 19:05:52 +0000 |
18 | +message: |
19 | + Rename project to simply 'frame' |
20 | +------------------------------------------------------------ |
21 | revno: 41 |
22 | tags: v1.1.4 |
23 | committer: Chase Douglas <chase.douglas@ubuntu.com> |
24 | |
25 | === modified file 'INSTALL' |
26 | --- INSTALL 2011-07-08 00:38:12 +0000 |
27 | +++ INSTALL 2012-08-22 16:25:28 +0000 |
28 | @@ -1,6 +1,6 @@ |
29 | -utouch-frame - Touch Frame Library |
30 | +frame - Touch Frame Library |
31 | |
32 | -To build, you need to have the autoconf, libtool, libutouch-evemu-dev |
33 | +To build, you need to have the autoconf, libtool, libevemu-dev |
34 | and mtdev-dev packages installed. Then, do |
35 | |
36 | ./autogen.sh |
37 | @@ -9,16 +9,16 @@ |
38 | |
39 | To test the touch properties of an MT device at /dev/input/eventX, do |
40 | |
41 | - sudo ./test/utouch-frame-test /dev/input/eventX |
42 | + sudo ./test/frame-test-mtdev /dev/input/eventX |
43 | |
44 | You should be able to see touch events in the terminal. After five |
45 | seconds of inactivity, the program exits. |
46 | |
47 | -To install utouch-frame, do |
48 | +To install frame, do |
49 | |
50 | sudo make install |
51 | |
52 | -By default, utouch-frame installs to /usr/local. To change, use the --prefix |
53 | +By default, frame installs to /usr/local. To change, use the --prefix |
54 | configure option. |
55 | |
56 | Enjoy, |
57 | |
58 | === modified file 'Makefile.am' |
59 | --- Makefile.am 2011-07-08 00:38:12 +0000 |
60 | +++ Makefile.am 2012-08-22 16:25:28 +0000 |
61 | @@ -1,7 +1,7 @@ |
62 | SUBDIRS = src tools test |
63 | |
64 | pkgconfigdir = $(libdir)/pkgconfig |
65 | -pkgconfig_DATA = utouch-frame.pc |
66 | +pkgconfig_DATA = frame.pc |
67 | |
68 | INCLUDES = $(top_srcdir)/include/ |
69 | |
70 | |
71 | === modified file 'Makefile.in' |
72 | --- Makefile.in 2011-08-09 21:39:02 +0000 |
73 | +++ Makefile.in 2012-08-22 16:25:28 +0000 |
74 | @@ -37,7 +37,7 @@ |
75 | subdir = . |
76 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ |
77 | $(srcdir)/Makefile.in $(srcdir)/config.h.in \ |
78 | - $(srcdir)/utouch-frame.pc.in $(top_srcdir)/configure COPYING \ |
79 | + $(srcdir)/frame.pc.in $(top_srcdir)/configure COPYING \ |
80 | ChangeLog INSTALL config-aux/config.guess \ |
81 | config-aux/config.sub config-aux/depcomp config-aux/install-sh \ |
82 | config-aux/ltmain.sh config-aux/missing |
83 | @@ -49,7 +49,7 @@ |
84 | configure.lineno config.status.lineno |
85 | mkinstalldirs = $(install_sh) -d |
86 | CONFIG_HEADER = config.h |
87 | -CONFIG_CLEAN_FILES = utouch-frame.pc |
88 | +CONFIG_CLEAN_FILES = frame.pc |
89 | CONFIG_CLEAN_VPATH_FILES = |
90 | AM_V_GEN = $(am__v_GEN_$(V)) |
91 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) |
92 | @@ -261,7 +261,7 @@ |
93 | top_srcdir = @top_srcdir@ |
94 | SUBDIRS = src tools test |
95 | pkgconfigdir = $(libdir)/pkgconfig |
96 | -pkgconfig_DATA = utouch-frame.pc |
97 | +pkgconfig_DATA = frame.pc |
98 | INCLUDES = $(top_srcdir)/include/ |
99 | all: config.h |
100 | $(MAKE) $(AM_MAKEFLAGS) all-recursive |
101 | @@ -318,7 +318,7 @@ |
102 | |
103 | distclean-hdr: |
104 | -rm -f config.h stamp-h1 |
105 | -utouch-frame.pc: $(top_builddir)/config.status $(srcdir)/utouch-frame.pc.in |
106 | +frame.pc: $(top_builddir)/config.status $(srcdir)/frame.pc.in |
107 | cd $(top_builddir) && $(SHELL) ./config.status $@ |
108 | |
109 | mostlyclean-libtool: |
110 | |
111 | === modified file 'README' |
112 | --- README 2011-07-08 00:38:12 +0000 |
113 | +++ README 2012-08-22 16:25:28 +0000 |
114 | @@ -1,4 +1,4 @@ |
115 | -utouch-frame - Touch Frame Library |
116 | +frame - Touch Frame Library |
117 | |
118 | This tree handles the buildup and synchronization of a set of |
119 | simultaneous touches. The library is input agnostic. |
120 | |
121 | === modified file 'configure' |
122 | --- configure 2011-08-09 21:40:37 +0000 |
123 | +++ configure 2012-08-22 16:25:28 +0000 |
124 | @@ -1,6 +1,6 @@ |
125 | #! /bin/sh |
126 | # Guess values for system-dependent variables and create Makefiles. |
127 | -# Generated by GNU Autoconf 2.68 for Touch Frame Library 1.1.4. |
128 | +# Generated by GNU Autoconf 2.68 for Touch Frame Library 1.1.4.1. |
129 | # |
130 | # |
131 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
132 | @@ -566,9 +566,9 @@ |
133 | |
134 | # Identity of this package. |
135 | PACKAGE_NAME='Touch Frame Library' |
136 | -PACKAGE_TARNAME='utouch-frame' |
137 | -PACKAGE_VERSION='1.1.4' |
138 | -PACKAGE_STRING='Touch Frame Library 1.1.4' |
139 | +PACKAGE_TARNAME='frame' |
140 | +PACKAGE_VERSION='1.1.4.1' |
141 | +PACKAGE_STRING='Touch Frame Library 1.1.4.1' |
142 | PACKAGE_BUGREPORT='' |
143 | PACKAGE_URL='' |
144 | |
145 | @@ -1315,7 +1315,7 @@ |
146 | # Omit some internal or obsolete options to make the list less imposing. |
147 | # This message is too long to be a string in the A/UX 3.1 sh. |
148 | cat <<_ACEOF |
149 | -\`configure' configures Touch Frame Library 1.1.4 to adapt to many kinds of systems. |
150 | +\`configure' configures Touch Frame Library 1.1.4.1 to adapt to many kinds of systems. |
151 | |
152 | Usage: $0 [OPTION]... [VAR=VALUE]... |
153 | |
154 | @@ -1363,7 +1363,7 @@ |
155 | --infodir=DIR info documentation [DATAROOTDIR/info] |
156 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
157 | --mandir=DIR man documentation [DATAROOTDIR/man] |
158 | - --docdir=DIR documentation root [DATAROOTDIR/doc/utouch-frame] |
159 | + --docdir=DIR documentation root [DATAROOTDIR/doc/frame] |
160 | --htmldir=DIR html documentation [DOCDIR] |
161 | --dvidir=DIR dvi documentation [DOCDIR] |
162 | --pdfdir=DIR pdf documentation [DOCDIR] |
163 | @@ -1385,7 +1385,7 @@ |
164 | |
165 | if test -n "$ac_init_help"; then |
166 | case $ac_init_help in |
167 | - short | recursive ) echo "Configuration of Touch Frame Library 1.1.4:";; |
168 | + short | recursive ) echo "Configuration of Touch Frame Library 1.1.4.1:";; |
169 | esac |
170 | cat <<\_ACEOF |
171 | |
172 | @@ -1505,7 +1505,7 @@ |
173 | test -n "$ac_init_help" && exit $ac_status |
174 | if $ac_init_version; then |
175 | cat <<\_ACEOF |
176 | -Touch Frame Library configure 1.1.4 |
177 | +Touch Frame Library configure 1.1.4.1 |
178 | generated by GNU Autoconf 2.68 |
179 | |
180 | Copyright (C) 2010 Free Software Foundation, Inc. |
181 | @@ -1783,7 +1783,7 @@ |
182 | This file contains any messages produced by compilers while |
183 | running configure, to aid debugging if configure makes a mistake. |
184 | |
185 | -It was created by Touch Frame Library $as_me 1.1.4, which was |
186 | +It was created by Touch Frame Library $as_me 1.1.4.1, which was |
187 | generated by GNU Autoconf 2.68. Invocation command line was |
188 | |
189 | $ $0 $@ |
190 | @@ -2602,8 +2602,8 @@ |
191 | |
192 | |
193 | # Define the identity of the package. |
194 | - PACKAGE='utouch-frame' |
195 | - VERSION='1.1.4' |
196 | + PACKAGE='frame' |
197 | + VERSION='1.1.4.1' |
198 | |
199 | |
200 | cat >>confdefs.h <<_ACEOF |
201 | @@ -12094,12 +12094,12 @@ |
202 | pkg_cv_EVEMU_CFLAGS="$EVEMU_CFLAGS" |
203 | elif test -n "$PKG_CONFIG"; then |
204 | if test -n "$PKG_CONFIG" && \ |
205 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu >= 1.0.5\""; } >&5 |
206 | - ($PKG_CONFIG --exists --print-errors "utouch-evemu >= 1.0.5") 2>&5 |
207 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evemu >= 1.0.5\""; } >&5 |
208 | + ($PKG_CONFIG --exists --print-errors "evemu >= 1.0.5") 2>&5 |
209 | ac_status=$? |
210 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
211 | test $ac_status = 0; }; then |
212 | - pkg_cv_EVEMU_CFLAGS=`$PKG_CONFIG --cflags "utouch-evemu >= 1.0.5" 2>/dev/null` |
213 | + pkg_cv_EVEMU_CFLAGS=`$PKG_CONFIG --cflags "evemu >= 1.0.5" 2>/dev/null` |
214 | test "x$?" != "x0" && pkg_failed=yes |
215 | else |
216 | pkg_failed=yes |
217 | @@ -12111,12 +12111,12 @@ |
218 | pkg_cv_EVEMU_LIBS="$EVEMU_LIBS" |
219 | elif test -n "$PKG_CONFIG"; then |
220 | if test -n "$PKG_CONFIG" && \ |
221 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu >= 1.0.5\""; } >&5 |
222 | - ($PKG_CONFIG --exists --print-errors "utouch-evemu >= 1.0.5") 2>&5 |
223 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evemu >= 1.0.5\""; } >&5 |
224 | + ($PKG_CONFIG --exists --print-errors "evemu >= 1.0.5") 2>&5 |
225 | ac_status=$? |
226 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
227 | test $ac_status = 0; }; then |
228 | - pkg_cv_EVEMU_LIBS=`$PKG_CONFIG --libs "utouch-evemu >= 1.0.5" 2>/dev/null` |
229 | + pkg_cv_EVEMU_LIBS=`$PKG_CONFIG --libs "evemu >= 1.0.5" 2>/dev/null` |
230 | test "x$?" != "x0" && pkg_failed=yes |
231 | else |
232 | pkg_failed=yes |
233 | @@ -12137,14 +12137,14 @@ |
234 | _pkg_short_errors_supported=no |
235 | fi |
236 | if test $_pkg_short_errors_supported = yes; then |
237 | - EVEMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "utouch-evemu >= 1.0.5" 2>&1` |
238 | + EVEMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "evemu >= 1.0.5" 2>&1` |
239 | else |
240 | - EVEMU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "utouch-evemu >= 1.0.5" 2>&1` |
241 | + EVEMU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "evemu >= 1.0.5" 2>&1` |
242 | fi |
243 | # Put the nasty error message in config.log where it belongs |
244 | echo "$EVEMU_PKG_ERRORS" >&5 |
245 | |
246 | - as_fn_error $? "Package requirements (utouch-evemu >= 1.0.5) were not met: |
247 | + as_fn_error $? "Package requirements (evemu >= 1.0.5) were not met: |
248 | |
249 | $EVEMU_PKG_ERRORS |
250 | |
251 | @@ -12366,7 +12366,7 @@ |
252 | $as_echo "$as_me: WARNING: asciidoc not installed, man pages will not be created" >&2;} |
253 | fi |
254 | |
255 | -ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile tools/Makefile utouch-frame.pc" |
256 | +ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile tools/Makefile frame.pc" |
257 | |
258 | cat >confcache <<\_ACEOF |
259 | # This file is a shell script that caches the results of configure |
260 | @@ -12918,7 +12918,7 @@ |
261 | # report actual input values of CONFIG_FILES etc. instead of their |
262 | # values after options handling. |
263 | ac_log=" |
264 | -This file was extended by Touch Frame Library $as_me 1.1.4, which was |
265 | +This file was extended by Touch Frame Library $as_me 1.1.4.1, which was |
266 | generated by GNU Autoconf 2.68. Invocation command line was |
267 | |
268 | CONFIG_FILES = $CONFIG_FILES |
269 | @@ -12984,7 +12984,7 @@ |
270 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
271 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
272 | ac_cs_version="\\ |
273 | -Touch Frame Library config.status 1.1.4 |
274 | +Touch Frame Library config.status 1.1.4.1 |
275 | configured by $0, generated by GNU Autoconf 2.68, |
276 | with options \\"\$ac_cs_config\\" |
277 | |
278 | @@ -13397,7 +13397,7 @@ |
279 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; |
280 | "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; |
281 | "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; |
282 | - "utouch-frame.pc") CONFIG_FILES="$CONFIG_FILES utouch-frame.pc" ;; |
283 | + "frame.pc") CONFIG_FILES="$CONFIG_FILES frame.pc" ;; |
284 | |
285 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
286 | esac |
287 | |
288 | === modified file 'configure.ac' |
289 | --- configure.ac 2011-08-09 21:39:02 +0000 |
290 | +++ configure.ac 2012-08-22 16:25:28 +0000 |
291 | @@ -1,9 +1,9 @@ |
292 | # Initialize Autoconf |
293 | AC_PREREQ([2.60]) |
294 | AC_INIT([Touch Frame Library], |
295 | - [1.1.4], |
296 | + [1.1.4.1], |
297 | [], |
298 | - [utouch-frame]) |
299 | + [frame]) |
300 | AC_CONFIG_SRCDIR([Makefile.am]) |
301 | AC_CONFIG_HEADERS([config.h]) |
302 | AC_CONFIG_AUX_DIR([config-aux]) |
303 | @@ -24,7 +24,7 @@ |
304 | AC_PROG_INSTALL |
305 | |
306 | PKG_CHECK_MODULES([MTDEV], [mtdev >= 1.1]) |
307 | -PKG_CHECK_MODULES([EVEMU], [utouch-evemu >= 1.0.5]) |
308 | +PKG_CHECK_MODULES([EVEMU], [evemu >= 1.0.5]) |
309 | |
310 | AC_ARG_WITH([xi], AS_HELP_STRING([--with-xi], [Build with XI2.1 support])) |
311 | AM_CONDITIONAL([HAVE_XI], [test "x$with_xi" != "x"]) |
312 | @@ -46,5 +46,5 @@ |
313 | src/Makefile |
314 | test/Makefile |
315 | tools/Makefile |
316 | - utouch-frame.pc]) |
317 | + frame.pc]) |
318 | AC_OUTPUT |
319 | |
320 | === modified file 'debian/changelog' |
321 | --- debian/changelog 2011-08-09 21:44:35 +0000 |
322 | +++ debian/changelog 2012-08-22 16:25:28 +0000 |
323 | @@ -1,81 +1,11 @@ |
324 | -utouch-frame (1.1.4-0ubuntu1) oneiric; urgency=low |
325 | - |
326 | - * New upstream release. |
327 | - - Fallback to singletouch resolutions if multitouch resolutions are missing |
328 | - * Remove cdbs rule for autoreconf, it's not needed |
329 | - |
330 | - -- Chase Douglas <chase.douglas@ubuntu.com> Tue, 09 Aug 2011 14:44:30 -0700 |
331 | - |
332 | -utouch-frame (1.1.3-0ubuntu1) oneiric; urgency=low |
333 | - |
334 | - [ Henrik Rydberg ] |
335 | - * New upstream release. |
336 | - * Feature freeze exception LP: #735672 |
337 | - * Updated dependency evemu-1.0.5 |
338 | - |
339 | - [ Jussi Pakkanen ] |
340 | - * Add XInput2 support |
341 | - |
342 | - [ Chase Douglas ] |
343 | - * New upstream release. |
344 | - * Adds support for some three touch gestures on semi-MT trackpads |
345 | - * Bump packaging standards version to 3.9.2 |
346 | - |
347 | - -- Chase Douglas <chase.douglas@ubuntu.com> Thu, 07 Jul 2011 17:50:14 -0700 |
348 | - |
349 | -utouch-frame (1.1.1-0ubuntu1) natty; urgency=low |
350 | - |
351 | - [ Henrik Rydberg ] |
352 | - * New upstream release. |
353 | - * Fixing semi-mt entanglement (LP: #724051) |
354 | - |
355 | - -- Chase Douglas <chase.douglas@ubuntu.com> Thu, 24 Feb 2011 11:16:48 -0500 |
356 | - |
357 | -utouch-frame (1.1.0-0ubuntu1) natty; urgency=low |
358 | - |
359 | - * New upstream release (LP: #723763) |
360 | - * Updating symbols file with api additions |
361 | - |
362 | - -- Henrik Rydberg <rydberg@bitmath.org> Wed, 23 Feb 2011 14:58:31 +0100 |
363 | - |
364 | -utouch-frame (1.0.0-0ubuntu3) natty; urgency=low |
365 | - |
366 | - * Restore udeb support. utouch-grail is in some d-i initrds, depends on |
367 | - this library, and ships a udeb, so we have to as well. |
368 | - |
369 | - -- Colin Watson <cjwatson@ubuntu.com> Tue, 22 Feb 2011 13:44:00 +0000 |
370 | - |
371 | -utouch-frame (1.0.0-0ubuntu2) natty; urgency=low |
372 | - |
373 | - * Fixed a FTBFS due to indirect asciidoc dependencies |
374 | - |
375 | - -- Stephen M. Webb <stephen.webb@canonical.com> Mon, 07 Feb 2011 12:47:52 -0500 |
376 | - |
377 | -utouch-frame (1.0.0-0ubuntu1) natty; urgency=low |
378 | - |
379 | - [ Henrik Rydberg ] |
380 | - * Add evemu to build dependencies |
381 | - |
382 | - [ Stephen M. Webb ] |
383 | - * Packaging tweaks for Ubuntu upload (LP: #702623) |
384 | - - fixed debian/copyright format |
385 | - - removed udeb reference from debian/rules |
386 | - - added Vcs-Bzr clause to debian/control |
387 | - * Updated COPYING file. |
388 | - * Added man page |
389 | - |
390 | - -- Stephen M. Webb <stephen.webb@canonical.com> Fri, 04 Feb 2011 07:44:40 -0500 |
391 | - |
392 | -utouch-frame (1.0.0-0ubuntu1~utouch2) natty; urgency=low |
393 | - |
394 | - * Retrying to include sources |
395 | - * Fix package dependencies |
396 | - |
397 | - -- Henrik Rydberg <rydberg@bitmath.org> Mon, 03 Jan 2011 17:53:24 +0100 |
398 | - |
399 | -utouch-frame (1.0.0-0ubuntu1~utouch1) natty; urgency=low |
400 | - |
401 | - * Initial load of upstream version utouch-frame-1.0.0 |
402 | - * Added debian repository |
403 | - |
404 | - -- Henrik Rydberg <rydberg@bitmath.org> Wed, 29 Dec 2010 10:51:40 +0100 |
405 | +frame (1.1.4.1-0ubuntu1) UNRELEASED; urgency=low |
406 | + |
407 | + * New upstream microrelease, bug fixes only |
408 | + - Rename project to simply 'frame' (LP: #1039610) |
409 | + * Updated debian/watch file for project rename |
410 | + * Rename package and update packaging |
411 | + - Added Conflicts and Replaces clauses for libframe-dev, frame-tools and |
412 | + libframe1-udeb |
413 | + |
414 | + -- Francis Ginther <francis.ginther@canonical.com> Tue, 21 Aug 2012 10:42:51 -0500 |
415 | + |
416 | |
417 | === modified file 'debian/control' |
418 | --- debian/control 2011-07-08 00:42:28 +0000 |
419 | +++ debian/control 2012-08-22 16:25:28 +0000 |
420 | @@ -1,4 +1,4 @@ |
421 | -Source: utouch-frame |
422 | +Source: frame |
423 | Section: libs |
424 | Priority: optional |
425 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
426 | @@ -14,14 +14,14 @@ |
427 | cdbs, |
428 | dh-autoreconf, |
429 | libmtdev-dev (>= 1.1), |
430 | - libutouch-evemu-dev (>= 1.0.5), |
431 | + libevemu-dev, |
432 | libxi-dev, |
433 | libx11-dev, |
434 | xserver-xorg-dev |
435 | Standards-Version: 3.9.2 |
436 | -Vcs-Bzr: https://code.launchpad.net/~utouch-packaging/utouch-frame/ubuntu |
437 | +Vcs-Bzr: https://code.launchpad.net/~oif-packaging/frame/ubuntu |
438 | |
439 | -Package: libutouch-frame1 |
440 | +Package: libframe1 |
441 | Architecture: any |
442 | Depends: ${shlibs:Depends}, |
443 | ${misc:Depends} |
444 | @@ -30,11 +30,13 @@ |
445 | simultaneous touches. The library is input agnostic, with bindings |
446 | for mtdev, frame and XI2.1. |
447 | |
448 | -Package: libutouch-frame-dev |
449 | +Package: libframe-dev |
450 | Section: libdevel |
451 | Architecture: any |
452 | -Depends: libutouch-frame1 (= ${binary:Version}), |
453 | +Depends: libframe1 (= ${binary:Version}), |
454 | ${misc:Depends} |
455 | +Replaces: libutouch-frame-dev |
456 | +Conflicts: libutouch-frame-dev |
457 | Description: Touch Frame Library - dev files |
458 | This library handles the buildup and synchronization of a set of |
459 | simultaneous touches. The library is input agnostic, with bindings |
460 | @@ -42,12 +44,14 @@ |
461 | . |
462 | This package contains files that are needed to build applications. |
463 | |
464 | -Package: utouch-frame-tools |
465 | +Package: frame-tools |
466 | Section: libdevel |
467 | Architecture: any |
468 | -Depends: libutouch-frame1 (= ${binary:Version}), |
469 | +Depends: libframe1 (= ${binary:Version}), |
470 | ${shlibs:Depends}, |
471 | ${misc:Depends} |
472 | +Replaces: utouch-frame-tools |
473 | +Conflicts: utouch-frame-tools |
474 | Description: Touch Frame Library - test tools |
475 | This library handles the buildup and synchronization of a set of |
476 | simultaneous touches. The library is input agnostic, with bindings |
477 | @@ -55,12 +59,14 @@ |
478 | . |
479 | This package provides some test tools for the frame library. |
480 | |
481 | -Package: libutouch-frame1-udeb |
482 | +Package: libframe1-udeb |
483 | Section: debian-installer |
484 | Architecture: any |
485 | XC-Package-Type: udeb |
486 | Depends: ${shlibs:Depends}, |
487 | ${misc:Depends} |
488 | +Replaces: libutouch-frame1-udeb |
489 | +Conflicts: libutouch-frame1-udeb |
490 | Description: Touch Frame Library |
491 | This library handles the buildup and synchronization of a set of |
492 | simultaneous touches. The library is input agnostic, with bindings |
493 | |
494 | === modified file 'debian/copyright' |
495 | --- debian/copyright 2011-02-03 18:53:53 +0000 |
496 | +++ debian/copyright 2012-08-22 16:25:28 +0000 |
497 | @@ -1,7 +1,7 @@ |
498 | Format: http://dep.debian.net/deps/dep5/ |
499 | -Upstream-Name: utouch-frame |
500 | +Upstream-Name: frame |
501 | Maintainer: Henrik Rydberg <rydberg@euromail.se> |
502 | -Source: http://launchpad.net/utouch-frame |
503 | +Source: http://launchpad.net/frame |
504 | |
505 | Files: * (unless noted below) |
506 | Copyright: 2010, Canonical Ltd. |
507 | |
508 | === renamed file 'debian/utouch-frame-tools.install' => 'debian/frame-tools.install' |
509 | === renamed file 'debian/libutouch-frame-dev.install' => 'debian/libframe-dev.install' |
510 | --- debian/libutouch-frame-dev.install 2010-12-30 19:27:04 +0000 |
511 | +++ debian/libframe-dev.install 2012-08-22 16:25:28 +0000 |
512 | @@ -1,3 +1,3 @@ |
513 | usr/include |
514 | -usr/lib/libutouch-frame.so |
515 | +usr/lib/libframe.so |
516 | usr/lib/pkgconfig |
517 | |
518 | === renamed file 'debian/libutouch-frame1-udeb.install' => 'debian/libframe1-udeb.install' |
519 | --- debian/libutouch-frame1-udeb.install 2011-02-18 14:37:53 +0000 |
520 | +++ debian/libframe1-udeb.install 2012-08-22 16:25:28 +0000 |
521 | @@ -1,1 +1,1 @@ |
522 | -usr/lib/libutouch-frame.so.1* |
523 | +usr/lib/libframe.so.1* |
524 | |
525 | === renamed file 'debian/libutouch-frame1.install' => 'debian/libframe1.install' |
526 | --- debian/libutouch-frame1.install 2010-12-30 19:27:04 +0000 |
527 | +++ debian/libframe1.install 2012-08-22 16:25:28 +0000 |
528 | @@ -1,1 +1,1 @@ |
529 | -usr/lib/libutouch-frame.so.1* |
530 | +usr/lib/libframe.so.1* |
531 | |
532 | === renamed file 'debian/libutouch-frame1.symbols' => 'debian/libframe1.symbols' |
533 | --- debian/libutouch-frame1.symbols 2011-06-16 18:54:26 +0000 |
534 | +++ debian/libframe1.symbols 2012-08-22 16:25:28 +0000 |
535 | @@ -1,16 +1,16 @@ |
536 | -libutouch-frame.so.1 libutouch-frame1 #MINVER# |
537 | - (symver)UTOUCH_FRAME_1.1 1.1.2 |
538 | - utouch_frame_configure_xi2@UTOUCH_FRAME_1.1 1.1.2 |
539 | - utouch_frame_delete_engine@UTOUCH_FRAME_1.1 1.0.0 |
540 | - utouch_frame_get_current_slot@UTOUCH_FRAME_1.1 1.0.0 |
541 | - utouch_frame_get_num_frames@UTOUCH_FRAME_1.1 1.1.0 |
542 | - utouch_frame_get_num_slots@UTOUCH_FRAME_1.1 1.1.0 |
543 | - utouch_frame_get_surface@UTOUCH_FRAME_1.1 1.0.0 |
544 | - utouch_frame_get_version@UTOUCH_FRAME_1.1 1.0.0 |
545 | - utouch_frame_init_mtdev@UTOUCH_FRAME_1.1 1.0.0 |
546 | - utouch_frame_init_xi2@UTOUCH_FRAME_1.1 1.1.2 |
547 | - utouch_frame_is_supported_mtdev@UTOUCH_FRAME_1.1 1.0.0 |
548 | - utouch_frame_is_supported_xi2@UTOUCH_FRAME_1.1 1.1.2 |
549 | - utouch_frame_new_engine_raw@UTOUCH_FRAME_1.1 1.0.0 |
550 | - utouch_frame_pump_mtdev@UTOUCH_FRAME_1.1 1.0.0 |
551 | - utouch_frame_pump_xi2@UTOUCH_FRAME_1.1 1.1.2 |
552 | +libframe.so.1 libframe1 #MINVER# |
553 | + (symver)FRAME_1.1 1.1.2 |
554 | + oif_frame_configure_xi2@FRAME_1.1 1.1.2 |
555 | + oif_frame_delete_engine@FRAME_1.1 1.0.0 |
556 | + oif_frame_get_current_slot@FRAME_1.1 1.0.0 |
557 | + oif_frame_get_num_frames@FRAME_1.1 1.1.0 |
558 | + oif_frame_get_num_slots@FRAME_1.1 1.1.0 |
559 | + oif_frame_get_surface@FRAME_1.1 1.0.0 |
560 | + oif_frame_get_version@FRAME_1.1 1.0.0 |
561 | + oif_frame_init_mtdev@FRAME_1.1 1.0.0 |
562 | + oif_frame_init_xi2@FRAME_1.1 1.1.2 |
563 | + oif_frame_is_supported_mtdev@FRAME_1.1 1.0.0 |
564 | + oif_frame_is_supported_xi2@FRAME_1.1 1.1.2 |
565 | + oif_frame_new_engine_raw@FRAME_1.1 1.0.0 |
566 | + oif_frame_pump_mtdev@FRAME_1.1 1.0.0 |
567 | + oif_frame_pump_xi2@FRAME_1.1 1.1.2 |
568 | |
569 | === modified file 'debian/rules' |
570 | --- debian/rules 2011-08-09 21:44:26 +0000 |
571 | +++ debian/rules 2012-08-22 16:25:28 +0000 |
572 | @@ -7,7 +7,7 @@ |
573 | |
574 | LDFLAGS += -Wl,-z,defs -Wl,--as-needed |
575 | |
576 | -DEB_DH_MAKESHLIBS_ARGS_libutouch-frame1 = --add-udeb=libutouch-frame1-udeb |
577 | +DEB_DH_MAKESHLIBS_ARGS_libframe1 = --add-udeb=libframe1-udeb |
578 | |
579 | DEB_CONFIGURE_EXTRA_FLAGS = --with-xi |
580 | |
581 | |
582 | === modified file 'debian/watch' |
583 | --- debian/watch 2010-12-30 19:27:04 +0000 |
584 | +++ debian/watch 2012-08-22 16:25:28 +0000 |
585 | @@ -1,2 +1,2 @@ |
586 | version=3 |
587 | -https://launchpad.net/utouch-frame/+download http://launchpad.net/utouch-frame/.*/utouch-frame-(.+).tar.gz |
588 | +https://launchpad.net/frame/1.1.4 .*/1.1.4/.*/frame-(.+).tar.(?:bz2|gz) |
589 | |
590 | === added file 'frame.pc.in' |
591 | --- frame.pc.in 1970-01-01 00:00:00 +0000 |
592 | +++ frame.pc.in 2012-08-22 16:25:28 +0000 |
593 | @@ -0,0 +1,10 @@ |
594 | +prefix=@prefix@ |
595 | +exec_prefix=@exec_prefix@ |
596 | +libdir=@libdir@ |
597 | +includedir=@includedir@ |
598 | + |
599 | +Name: frame |
600 | +Description: Touch Frame Library |
601 | +Version: @PACKAGE_VERSION@ |
602 | +Cflags: -I${includedir} |
603 | +Libs: -L${libdir} -lframe |
604 | |
605 | === added directory 'include/oif' |
606 | === added file 'include/oif/frame-mtdev.h' |
607 | --- include/oif/frame-mtdev.h 1970-01-01 00:00:00 +0000 |
608 | +++ include/oif/frame-mtdev.h 2012-08-22 16:25:28 +0000 |
609 | @@ -0,0 +1,46 @@ |
610 | +/***************************************************************************** |
611 | + * |
612 | + * frame - Touch Frame Library |
613 | + * |
614 | + * Copyright (C) 2010-2011 Canonical Ltd. |
615 | + * |
616 | + * This program is free software: you can redistribute it and/or modify it |
617 | + * under the terms of the GNU General Public License as published by the |
618 | + * Free Software Foundation, either version 3 of the License, or (at your |
619 | + * option) any later version. |
620 | + * |
621 | + * This program is distributed in the hope that it will be useful, but |
622 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
623 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
624 | + * General Public License for more details. |
625 | + * |
626 | + * You should have received a copy of the GNU General Public License along |
627 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
628 | + * |
629 | + ****************************************************************************/ |
630 | + |
631 | +#ifndef OIF_FRAME_MTDEV_H |
632 | +#define OIF_FRAME_MTDEV_H |
633 | + |
634 | +#ifdef __cplusplus |
635 | +extern "C" { |
636 | +#endif |
637 | + |
638 | +#define MTDEV_NO_LEGACY_API |
639 | + |
640 | +#include <oif/frame.h> |
641 | +#include <evemu.h> |
642 | +#include <mtdev.h> |
643 | + |
644 | +int oif_frame_is_supported_mtdev(const struct evemu_device *dev); |
645 | + |
646 | +int oif_frame_init_mtdev(oif_frame_handle fh, const struct evemu_device *dev); |
647 | + |
648 | +const struct oif_frame * |
649 | +oif_frame_pump_mtdev(oif_frame_handle fh, const struct input_event *ev); |
650 | + |
651 | +#ifdef __cplusplus |
652 | +} |
653 | +#endif |
654 | + |
655 | +#endif |
656 | |
657 | === added file 'include/oif/frame-xi2.h' |
658 | --- include/oif/frame-xi2.h 1970-01-01 00:00:00 +0000 |
659 | +++ include/oif/frame-xi2.h 2012-08-22 16:25:28 +0000 |
660 | @@ -0,0 +1,48 @@ |
661 | +/***************************************************************************** |
662 | + * |
663 | + * frame - Touch Frame Library |
664 | + * |
665 | + * Copyright (C) 2010-2011 Canonical Ltd. |
666 | + * |
667 | + * This program is free software: you can redistribute it and/or modify it |
668 | + * under the terms of the GNU General Public License as published by the |
669 | + * Free Software Foundation, either version 3 of the License, or (at your |
670 | + * option) any later version. |
671 | + * |
672 | + * This program is distributed in the hope that it will be useful, but |
673 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
674 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
675 | + * General Public License for more details. |
676 | + * |
677 | + * You should have received a copy of the GNU General Public License along |
678 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
679 | + * |
680 | + ****************************************************************************/ |
681 | + |
682 | +#ifndef OIF_FRAME_XI2_H |
683 | +#define OIF_FRAME_XI2_H |
684 | + |
685 | +#ifdef __cplusplus |
686 | +extern "C" { |
687 | +#endif |
688 | + |
689 | +#define MTDEV_NO_LEGACY_API |
690 | + |
691 | +#include <oif/frame.h> |
692 | +#include <X11/extensions/XInput2.h> |
693 | + |
694 | +int oif_frame_is_supported_xi2(Display *dpy, const XIDeviceInfo *dev); |
695 | + |
696 | +int oif_frame_init_xi2(oif_frame_handle fh, Display *dpy, |
697 | + const XIDeviceInfo *dev); |
698 | + |
699 | +int oif_frame_configure_xi2(oif_frame_handle fh, const XConfigureEvent *ev); |
700 | + |
701 | +const struct oif_frame * |
702 | +oif_frame_pump_xi2(oif_frame_handle fh, const XIDeviceEvent *ev); |
703 | + |
704 | +#ifdef __cplusplus |
705 | +} |
706 | +#endif |
707 | + |
708 | +#endif |
709 | |
710 | === added file 'include/oif/frame.h' |
711 | --- include/oif/frame.h 1970-01-01 00:00:00 +0000 |
712 | +++ include/oif/frame.h 2012-08-22 16:25:28 +0000 |
713 | @@ -0,0 +1,307 @@ |
714 | +/***************************************************************************** |
715 | + * |
716 | + * frame - Touch Frame Library |
717 | + * |
718 | + * Copyright (C) 2010-2011 Canonical Ltd. |
719 | + * |
720 | + * This program is free software: you can redistribute it and/or modify it |
721 | + * under the terms of the GNU General Public License as published by the |
722 | + * Free Software Foundation, either version 3 of the License, or (at your |
723 | + * option) any later version. |
724 | + * |
725 | + * This program is distributed in the hope that it will be useful, but |
726 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
727 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
728 | + * General Public License for more details. |
729 | + * |
730 | + * You should have received a copy of the GNU General Public License along |
731 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
732 | + * |
733 | + ****************************************************************************/ |
734 | + |
735 | +#ifndef OIF_FRAME_H |
736 | +#define OIF_FRAME_H |
737 | + |
738 | +#ifdef __cplusplus |
739 | +extern "C" { |
740 | +#endif |
741 | + |
742 | +#include <stdint.h> |
743 | + |
744 | +#define OIF_FRAME_VERSION 0x00001010 |
745 | + |
746 | +/** |
747 | + * struct oif_surface - device surface details |
748 | + * @needs_pointer: device needs a screen pointer to function |
749 | + * @is_direct: surface is a direct device (e.g. touchscreen) |
750 | + * @is_buttonpad: surface has button(s) under it |
751 | + * @is_semi_mt: surface detects bounding rectangle only |
752 | + * @use_touch_major: device uses major axis for contact modulation |
753 | + * @use_touch_minor: device uses minor axis for contact modulation |
754 | + * @use_width_major: device uses approaching major axis for contact modulation |
755 | + * @use_width_minor: device uses approaching minor axis for contact modulation |
756 | + * @use_orientation: device uses ellipse orientation for contact modulation |
757 | + * @use_pressure: device uses pressure for contact modulation |
758 | + * @use_distance: device uses hover distance |
759 | + * @phys_width: physical width in millimeters (mm) |
760 | + * @phys_height: physical height in millimeters (mm) |
761 | + * @phys_pressure: maximal physical pressure (N/cm^2) |
762 | + * @min_x: minimum horizontal device coordinate |
763 | + * @min_y: minimum vertical device coordinate |
764 | + * @max_x: maximum horizontal device coordinate |
765 | + * @max_y: maximum vertical device coordinate |
766 | + * @max_pressure: maximum pressure device coordinate |
767 | + * @max_orient: maximum orientation device coordinate |
768 | + * @mapped_min_x: minimum horizontal mapped coordinate |
769 | + * @mapped_min_y: minimum vertical mapped coordinate |
770 | + * @mapped_max_x: maximum horizontal mapped coordinate |
771 | + * @mapped_max_y: maximum vertical mapped coordinate |
772 | + * @mapped_max_pressure: maximum pressure mapped coordinate |
773 | + * |
774 | + * The mutable contact given by oif_frame_get_current_slot() should |
775 | + * be set in device coordinates. The contact data is subsequently |
776 | + * transformed to mapped (e.g., screen) coordinates in |
777 | + * oif_frame_sync(). To a frame user, all data will appear in |
778 | + * mapped coordinates. |
779 | + * |
780 | + * Device properties and touch surface details. Later versions of this |
781 | + * struct may grow in size, but will remain binary compatible with |
782 | + * older versions. |
783 | + */ |
784 | +struct oif_surface { |
785 | + int needs_pointer; |
786 | + int is_direct; |
787 | + int is_buttonpad; |
788 | + int is_semi_mt; |
789 | + int use_touch_major; |
790 | + int use_touch_minor; |
791 | + int use_width_major; |
792 | + int use_width_minor; |
793 | + int use_orientation; |
794 | + int use_pressure; |
795 | + int use_distance; |
796 | + float phys_width; |
797 | + float phys_height; |
798 | + float phys_pressure; |
799 | + float min_x; |
800 | + float min_y; |
801 | + float max_x; |
802 | + float max_y; |
803 | + float max_pressure; |
804 | + float max_orient; |
805 | + float mapped_min_x; |
806 | + float mapped_min_y; |
807 | + float mapped_max_x; |
808 | + float mapped_max_y; |
809 | + float mapped_max_pressure; |
810 | + unsigned int min_id; |
811 | + unsigned int max_id; |
812 | +}; |
813 | + |
814 | +#define OIF_TOOL_FINGER 0 |
815 | +#define OIF_TOOL_PEN 1 |
816 | + |
817 | +/** |
818 | + * struct oif_contact - surface contact details |
819 | + * @prev: pointer to same slot of previous frame |
820 | + * @active: currently in use |
821 | + * @slot: slot occupied by this contact |
822 | + * @id: unique id of this contact |
823 | + * @tool_type: the tool type of this contact |
824 | + * @x: horizontal center position coordinate (surface units) |
825 | + * @y: vertical center position coordinate (surface units) |
826 | + * @touch_major: major axis of contact (surface units) |
827 | + * @touch_minor: minor axis of contact (surface units) |
828 | + * @width_major: major axis of approaching contact (surface units) |
829 | + * @width_minor: minor axis of approaching contact (surface units) |
830 | + * @orientation: direction of ellipse (left: -Pi/2, up: 0, right: Pi/2) |
831 | + * @pressure: pressure of contact (pressure units) |
832 | + * @distance: distance of contact (surface units) |
833 | + * @vx: horizontal velocity coordinate (units / millisecond) |
834 | + * @vy: vertical velocity coordinate (units / millisecond) |
835 | + * |
836 | + * Surface contact details. Later versions of this struct may grow in |
837 | + * size, but will remain binary compatible with older versions. |
838 | + * |
839 | + * Contact structures are connected into one ring per slot. The |
840 | + * previous contact pointers are ABI agnostic, owned by the engine, |
841 | + * and have engine scope. |
842 | + */ |
843 | +struct oif_contact { |
844 | + const struct oif_contact *prev; |
845 | + int active; |
846 | + int slot; |
847 | + unsigned int id; |
848 | + int tool_type; |
849 | + float x; |
850 | + float y; |
851 | + float touch_major; |
852 | + float touch_minor; |
853 | + float width_major; |
854 | + float width_minor; |
855 | + float orientation; |
856 | + float pressure; |
857 | + float distance; |
858 | + float vx; |
859 | + float vy; |
860 | +}; |
861 | + |
862 | +/* time in milliseconds */ |
863 | +typedef uint64_t oif_frame_time_t; |
864 | + |
865 | +/* the frame engine handle */ |
866 | +typedef struct oif_frame_engine *oif_frame_handle; |
867 | + |
868 | +/** |
869 | + * struct oif_frame - emitted frame details |
870 | + * @prev: pointer to previous frame |
871 | + * @sequence_id: frame sequence number |
872 | + * @revision: changes whenever the contact count changes |
873 | + * @slot_revision: changes whenever the slot id array change |
874 | + * @num_active: the number of contacts in the active array |
875 | + * @time: time of frame completion (ms) |
876 | + * @mod_time: time of last contact count change (ms) |
877 | + * @slot_mod_time: time of last slot id array change (ms) |
878 | + * @active: the array of active contacts |
879 | + * |
880 | + * Contact frame details. Later versions of this struct may grow in |
881 | + * size, but will remain binary compatible with older versions. |
882 | + * |
883 | + * Frames are connected into a ring. The previous frame pointer is ABI |
884 | + * agnostic, owned by the engine, and has engine scope. |
885 | + */ |
886 | +struct oif_frame { |
887 | + const struct oif_frame *prev; |
888 | + unsigned int sequence_id; |
889 | + unsigned int revision; |
890 | + unsigned int slot_revision; |
891 | + unsigned int num_active; |
892 | + oif_frame_time_t time; |
893 | + oif_frame_time_t mod_time; |
894 | + oif_frame_time_t slot_mod_time; |
895 | + struct oif_contact **active; |
896 | + struct oif_contact **slots; |
897 | +}; |
898 | + |
899 | +/** |
900 | + * oif_frame_get_version - get library abi version |
901 | + * |
902 | + * Returns the version of the library, which may be different |
903 | + * from the api version of the compiled user program. |
904 | + */ |
905 | +unsigned int oif_frame_get_version(void); |
906 | + |
907 | +/** |
908 | + * oif_frame_get_num_frames - get number of supported frames |
909 | + * |
910 | + * Returns the number of frames supported by this engine. |
911 | + */ |
912 | +unsigned int oif_frame_get_num_frames(oif_frame_handle fh); |
913 | + |
914 | +/** |
915 | + * oif_frame_get_num_slots - get number of supported slots |
916 | + * |
917 | + * Returns the number of simultaneous contacts supported by this engine. |
918 | + */ |
919 | +unsigned int oif_frame_get_num_slots(oif_frame_handle fh); |
920 | + |
921 | +oif_frame_handle oif_frame_new_engine_raw(unsigned int num_frames, |
922 | + unsigned int num_slots, |
923 | + unsigned int frame_rate, |
924 | + unsigned int version, |
925 | + unsigned int surface_size, |
926 | + unsigned int frame_size, |
927 | + unsigned int slot_size); |
928 | + |
929 | +/** |
930 | + * oif_frame_new_engine - allocate a new frame engine |
931 | + * @num_frames: number of frames in cyclic buffer |
932 | + * @num_slots: maximum number of slots per frame |
933 | + * @frame_rate: maximum frame rate (frames/s) |
934 | + * |
935 | + * Allocates memory, initializes the internal engine and returns a |
936 | + * handle to it. A rate of 100 frames per second is normal. |
937 | + */ |
938 | +#define oif_frame_new_engine(num_frames, num_slots, frame_rate) \ |
939 | + oif_frame_new_engine_raw(num_frames, \ |
940 | + num_slots, \ |
941 | + frame_rate, \ |
942 | + OIF_FRAME_VERSION, \ |
943 | + sizeof(struct oif_surface), \ |
944 | + sizeof(struct oif_frame), \ |
945 | + sizeof(struct oif_contact)) |
946 | + |
947 | +/** |
948 | + * oif_frame_delete_engine - deallocate a frame engine |
949 | + * @fh: frame engine in use |
950 | + * |
951 | + * Deallocates all memory associated with the engine. |
952 | + */ |
953 | +void oif_frame_delete_engine(oif_frame_handle fh); |
954 | + |
955 | +/** |
956 | + * oif_frame_get_surface - get the mutable device surface information |
957 | + * @fh: the frame engine in use |
958 | + * |
959 | + * Returns a pointer to the mutable device surface information. It is |
960 | + * preferrably set up by one of the input handlers. The pointer is ABI |
961 | + * agnostic, has frame engine scope, and is owned by the engine. |
962 | + */ |
963 | +struct oif_surface *oif_frame_get_surface(oif_frame_handle fh); |
964 | + |
965 | +/** |
966 | + * oif_frame_get_current_slot - get the current mutable slot contact |
967 | + * @fh: the frame engine in use |
968 | + * |
969 | + * Returns a pointer to the contact current being modified. The |
970 | + * pointer is ABI agnostic, has frame engine scope, and is owned by |
971 | + * the engine. |
972 | + */ |
973 | +struct oif_contact *oif_frame_get_current_slot(oif_frame_handle fh); |
974 | + |
975 | +/** |
976 | + * oif_frame_set_current_slot - set the current slot number |
977 | + * @fh: the frame engine in use |
978 | + * @slot: the slot number |
979 | + * |
980 | + * Sets the slot currently being modified. Returns zero if successful, |
981 | + * negative error otherwise. |
982 | + */ |
983 | +int oif_frame_set_current_slot(oif_frame_handle fh, int slot); |
984 | + |
985 | +/** |
986 | + * oif_frame_set_current_id - set the current slot by touch id |
987 | + * @fh: the frame engine in use |
988 | + * @id: the touch id |
989 | + * |
990 | + * Sets the slot currently being modified, by touch id. If the id is |
991 | + * not currently in use (does not have an active slot), a new slot is |
992 | + * assigned. Returns zero if successful, negative error otherwise. |
993 | + */ |
994 | +int oif_frame_set_current_id(oif_frame_handle fh, int id); |
995 | + |
996 | +/** |
997 | + * oif_frame_sync - synchronize and return new frame |
998 | + * @fh: the frame engine in use |
999 | + * @time: the frame synchronization time (ms) |
1000 | + * |
1001 | + * Scans through the updates, and in case the changes make up a new |
1002 | + * frame, returns the updated frame. |
1003 | + * |
1004 | + * If time is zero, a time-of-receipt will be used instead. |
1005 | + * |
1006 | + * The frame returned is always the next in the cyclic list, and |
1007 | + * always points back at the previous frame returned by this function. |
1008 | + * |
1009 | + * The returned pointer is ABI agnostic and owned by the frame |
1010 | + * engine. It may very well be zero if there is nothing to report or |
1011 | + * if the frame rate is limited. |
1012 | + */ |
1013 | +const struct oif_frame *oif_frame_sync(oif_frame_handle fh, |
1014 | + oif_frame_time_t time); |
1015 | + |
1016 | +#ifdef __cplusplus |
1017 | +} |
1018 | +#endif |
1019 | + |
1020 | +#endif |
1021 | |
1022 | === removed directory 'include/utouch' |
1023 | === removed file 'include/utouch/frame-mtdev.h' |
1024 | --- include/utouch/frame-mtdev.h 2011-05-17 14:09:11 +0000 |
1025 | +++ include/utouch/frame-mtdev.h 1970-01-01 00:00:00 +0000 |
1026 | @@ -1,47 +0,0 @@ |
1027 | -/***************************************************************************** |
1028 | - * |
1029 | - * utouch-frame - Touch Frame Library |
1030 | - * |
1031 | - * Copyright (C) 2010-2011 Canonical Ltd. |
1032 | - * |
1033 | - * This program is free software: you can redistribute it and/or modify it |
1034 | - * under the terms of the GNU General Public License as published by the |
1035 | - * Free Software Foundation, either version 3 of the License, or (at your |
1036 | - * option) any later version. |
1037 | - * |
1038 | - * This program is distributed in the hope that it will be useful, but |
1039 | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
1040 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1041 | - * General Public License for more details. |
1042 | - * |
1043 | - * You should have received a copy of the GNU General Public License along |
1044 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
1045 | - * |
1046 | - ****************************************************************************/ |
1047 | - |
1048 | -#ifndef UTOUCH_FRAME_MTDEV_H |
1049 | -#define UTOUCH_FRAME_MTDEV_H |
1050 | - |
1051 | -#ifdef __cplusplus |
1052 | -extern "C" { |
1053 | -#endif |
1054 | - |
1055 | -#define MTDEV_NO_LEGACY_API |
1056 | - |
1057 | -#include <utouch/frame.h> |
1058 | -#include <evemu.h> |
1059 | -#include <mtdev.h> |
1060 | - |
1061 | -int utouch_frame_is_supported_mtdev(const struct evemu_device *dev); |
1062 | - |
1063 | -int utouch_frame_init_mtdev(utouch_frame_handle fh, |
1064 | - const struct evemu_device *dev); |
1065 | - |
1066 | -const struct utouch_frame * |
1067 | -utouch_frame_pump_mtdev(utouch_frame_handle fh, const struct input_event *ev); |
1068 | - |
1069 | -#ifdef __cplusplus |
1070 | -} |
1071 | -#endif |
1072 | - |
1073 | -#endif |
1074 | |
1075 | === removed file 'include/utouch/frame-xi2.h' |
1076 | --- include/utouch/frame-xi2.h 2011-05-17 14:09:11 +0000 |
1077 | +++ include/utouch/frame-xi2.h 1970-01-01 00:00:00 +0000 |
1078 | @@ -1,49 +0,0 @@ |
1079 | -/***************************************************************************** |
1080 | - * |
1081 | - * utouch-frame - Touch Frame Library |
1082 | - * |
1083 | - * Copyright (C) 2010-2011 Canonical Ltd. |
1084 | - * |
1085 | - * This program is free software: you can redistribute it and/or modify it |
1086 | - * under the terms of the GNU General Public License as published by the |
1087 | - * Free Software Foundation, either version 3 of the License, or (at your |
1088 | - * option) any later version. |
1089 | - * |
1090 | - * This program is distributed in the hope that it will be useful, but |
1091 | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
1092 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1093 | - * General Public License for more details. |
1094 | - * |
1095 | - * You should have received a copy of the GNU General Public License along |
1096 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
1097 | - * |
1098 | - ****************************************************************************/ |
1099 | - |
1100 | -#ifndef UTOUCH_FRAME_XI2_H |
1101 | -#define UTOUCH_FRAME_XI2_H |
1102 | - |
1103 | -#ifdef __cplusplus |
1104 | -extern "C" { |
1105 | -#endif |
1106 | - |
1107 | -#define MTDEV_NO_LEGACY_API |
1108 | - |
1109 | -#include <utouch/frame.h> |
1110 | -#include <X11/extensions/XInput2.h> |
1111 | - |
1112 | -int utouch_frame_is_supported_xi2(Display *dpy, const XIDeviceInfo *dev); |
1113 | - |
1114 | -int utouch_frame_init_xi2(utouch_frame_handle fh, |
1115 | - Display *dpy, const XIDeviceInfo *dev); |
1116 | - |
1117 | -int utouch_frame_configure_xi2(utouch_frame_handle fh, |
1118 | - const XConfigureEvent *ev); |
1119 | - |
1120 | -const struct utouch_frame * |
1121 | -utouch_frame_pump_xi2(utouch_frame_handle fh, const XIDeviceEvent *ev); |
1122 | - |
1123 | -#ifdef __cplusplus |
1124 | -} |
1125 | -#endif |
1126 | - |
1127 | -#endif |
1128 | |
1129 | === removed file 'include/utouch/frame.h' |
1130 | --- include/utouch/frame.h 2011-05-17 14:09:11 +0000 |
1131 | +++ include/utouch/frame.h 1970-01-01 00:00:00 +0000 |
1132 | @@ -1,307 +0,0 @@ |
1133 | -/***************************************************************************** |
1134 | - * |
1135 | - * utouch-frame - Touch Frame Library |
1136 | - * |
1137 | - * Copyright (C) 2010-2011 Canonical Ltd. |
1138 | - * |
1139 | - * This program is free software: you can redistribute it and/or modify it |
1140 | - * under the terms of the GNU General Public License as published by the |
1141 | - * Free Software Foundation, either version 3 of the License, or (at your |
1142 | - * option) any later version. |
1143 | - * |
1144 | - * This program is distributed in the hope that it will be useful, but |
1145 | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
1146 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1147 | - * General Public License for more details. |
1148 | - * |
1149 | - * You should have received a copy of the GNU General Public License along |
1150 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
1151 | - * |
1152 | - ****************************************************************************/ |
1153 | - |
1154 | -#ifndef UTOUCH_FRAME_H |
1155 | -#define UTOUCH_FRAME_H |
1156 | - |
1157 | -#ifdef __cplusplus |
1158 | -extern "C" { |
1159 | -#endif |
1160 | - |
1161 | -#include <stdint.h> |
1162 | - |
1163 | -#define UTOUCH_FRAME_VERSION 0x00001010 |
1164 | - |
1165 | -/** |
1166 | - * struct utouch_surface - device surface details |
1167 | - * @needs_pointer: device needs a screen pointer to function |
1168 | - * @is_direct: surface is a direct device (e.g. touchscreen) |
1169 | - * @is_buttonpad: surface has button(s) under it |
1170 | - * @is_semi_mt: surface detects bounding rectangle only |
1171 | - * @use_touch_major: device uses major axis for contact modulation |
1172 | - * @use_touch_minor: device uses minor axis for contact modulation |
1173 | - * @use_width_major: device uses approaching major axis for contact modulation |
1174 | - * @use_width_minor: device uses approaching minor axis for contact modulation |
1175 | - * @use_orientation: device uses ellipse orientation for contact modulation |
1176 | - * @use_pressure: device uses pressure for contact modulation |
1177 | - * @use_distance: device uses hover distance |
1178 | - * @phys_width: physical width in millimeters (mm) |
1179 | - * @phys_height: physical height in millimeters (mm) |
1180 | - * @phys_pressure: maximal physical pressure (N/cm^2) |
1181 | - * @min_x: minimum horizontal device coordinate |
1182 | - * @min_y: minimum vertical device coordinate |
1183 | - * @max_x: maximum horizontal device coordinate |
1184 | - * @max_y: maximum vertical device coordinate |
1185 | - * @max_pressure: maximum pressure device coordinate |
1186 | - * @max_orient: maximum orientation device coordinate |
1187 | - * @mapped_min_x: minimum horizontal mapped coordinate |
1188 | - * @mapped_min_y: minimum vertical mapped coordinate |
1189 | - * @mapped_max_x: maximum horizontal mapped coordinate |
1190 | - * @mapped_max_y: maximum vertical mapped coordinate |
1191 | - * @mapped_max_pressure: maximum pressure mapped coordinate |
1192 | - * |
1193 | - * The mutable contact given by utouch_frame_get_current_slot() should |
1194 | - * be set in device coordinates. The contact data is subsequently |
1195 | - * transformed to mapped (e.g., screen) coordinates in |
1196 | - * utouch_frame_sync(). To a frame user, all data will appear in |
1197 | - * mapped coordinates. |
1198 | - * |
1199 | - * Device properties and touch surface details. Later versions of this |
1200 | - * struct may grow in size, but will remain binary compatible with |
1201 | - * older versions. |
1202 | - */ |
1203 | -struct utouch_surface { |
1204 | - int needs_pointer; |
1205 | - int is_direct; |
1206 | - int is_buttonpad; |
1207 | - int is_semi_mt; |
1208 | - int use_touch_major; |
1209 | - int use_touch_minor; |
1210 | - int use_width_major; |
1211 | - int use_width_minor; |
1212 | - int use_orientation; |
1213 | - int use_pressure; |
1214 | - int use_distance; |
1215 | - float phys_width; |
1216 | - float phys_height; |
1217 | - float phys_pressure; |
1218 | - float min_x; |
1219 | - float min_y; |
1220 | - float max_x; |
1221 | - float max_y; |
1222 | - float max_pressure; |
1223 | - float max_orient; |
1224 | - float mapped_min_x; |
1225 | - float mapped_min_y; |
1226 | - float mapped_max_x; |
1227 | - float mapped_max_y; |
1228 | - float mapped_max_pressure; |
1229 | - unsigned int min_id; |
1230 | - unsigned int max_id; |
1231 | -}; |
1232 | - |
1233 | -#define UTOUCH_TOOL_FINGER 0 |
1234 | -#define UTOUCH_TOOL_PEN 1 |
1235 | - |
1236 | -/** |
1237 | - * struct utouch_contact - surface contact details |
1238 | - * @prev: pointer to same slot of previous frame |
1239 | - * @active: currently in use |
1240 | - * @slot: slot occupied by this contact |
1241 | - * @id: unique id of this contact |
1242 | - * @tool_type: the tool type of this contact |
1243 | - * @x: horizontal center position coordinate (surface units) |
1244 | - * @y: vertical center position coordinate (surface units) |
1245 | - * @touch_major: major axis of contact (surface units) |
1246 | - * @touch_minor: minor axis of contact (surface units) |
1247 | - * @width_major: major axis of approaching contact (surface units) |
1248 | - * @width_minor: minor axis of approaching contact (surface units) |
1249 | - * @orientation: direction of ellipse (left: -Pi/2, up: 0, right: Pi/2) |
1250 | - * @pressure: pressure of contact (pressure units) |
1251 | - * @distance: distance of contact (surface units) |
1252 | - * @vx: horizontal velocity coordinate (units / millisecond) |
1253 | - * @vy: vertical velocity coordinate (units / millisecond) |
1254 | - * |
1255 | - * Surface contact details. Later versions of this struct may grow in |
1256 | - * size, but will remain binary compatible with older versions. |
1257 | - * |
1258 | - * Contact structures are connected into one ring per slot. The |
1259 | - * previous contact pointers are ABI agnostic, owned by the engine, |
1260 | - * and have engine scope. |
1261 | - */ |
1262 | -struct utouch_contact { |
1263 | - const struct utouch_contact *prev; |
1264 | - int active; |
1265 | - int slot; |
1266 | - unsigned int id; |
1267 | - int tool_type; |
1268 | - float x; |
1269 | - float y; |
1270 | - float touch_major; |
1271 | - float touch_minor; |
1272 | - float width_major; |
1273 | - float width_minor; |
1274 | - float orientation; |
1275 | - float pressure; |
1276 | - float distance; |
1277 | - float vx; |
1278 | - float vy; |
1279 | -}; |
1280 | - |
1281 | -/* time in milliseconds */ |
1282 | -typedef uint64_t utouch_frame_time_t; |
1283 | - |
1284 | -/* the frame engine handle */ |
1285 | -typedef struct utouch_frame_engine *utouch_frame_handle; |
1286 | - |
1287 | -/** |
1288 | - * struct utouch_frame - emitted frame details |
1289 | - * @prev: pointer to previous frame |
1290 | - * @sequence_id: frame sequence number |
1291 | - * @revision: changes whenever the contact count changes |
1292 | - * @slot_revision: changes whenever the slot id array change |
1293 | - * @num_active: the number of contacts in the active array |
1294 | - * @time: time of frame completion (ms) |
1295 | - * @mod_time: time of last contact count change (ms) |
1296 | - * @slot_mod_time: time of last slot id array change (ms) |
1297 | - * @active: the array of active contacts |
1298 | - * |
1299 | - * Contact frame details. Later versions of this struct may grow in |
1300 | - * size, but will remain binary compatible with older versions. |
1301 | - * |
1302 | - * Frames are connected into a ring. The previous frame pointer is ABI |
1303 | - * agnostic, owned by the engine, and has engine scope. |
1304 | - */ |
1305 | -struct utouch_frame { |
1306 | - const struct utouch_frame *prev; |
1307 | - unsigned int sequence_id; |
1308 | - unsigned int revision; |
1309 | - unsigned int slot_revision; |
1310 | - unsigned int num_active; |
1311 | - utouch_frame_time_t time; |
1312 | - utouch_frame_time_t mod_time; |
1313 | - utouch_frame_time_t slot_mod_time; |
1314 | - struct utouch_contact **active; |
1315 | - struct utouch_contact **slots; |
1316 | -}; |
1317 | - |
1318 | -/** |
1319 | - * utouch_frame_get_version - get library abi version |
1320 | - * |
1321 | - * Returns the version of the library, which may be different |
1322 | - * from the api version of the compiled user program. |
1323 | - */ |
1324 | -unsigned int utouch_frame_get_version(void); |
1325 | - |
1326 | -/** |
1327 | - * utouch_frame_get_num_frames - get number of supported frames |
1328 | - * |
1329 | - * Returns the number of frames supported by this engine. |
1330 | - */ |
1331 | -unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh); |
1332 | - |
1333 | -/** |
1334 | - * utouch_frame_get_num_slots - get number of supported slots |
1335 | - * |
1336 | - * Returns the number of simultaneous contacts supported by this engine. |
1337 | - */ |
1338 | -unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh); |
1339 | - |
1340 | -utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames, |
1341 | - unsigned int num_slots, |
1342 | - unsigned int frame_rate, |
1343 | - unsigned int version, |
1344 | - unsigned int surface_size, |
1345 | - unsigned int frame_size, |
1346 | - unsigned int slot_size); |
1347 | - |
1348 | -/** |
1349 | - * utouch_frame_new_engine - allocate a new frame engine |
1350 | - * @num_frames: number of frames in cyclic buffer |
1351 | - * @num_slots: maximum number of slots per frame |
1352 | - * @frame_rate: maximum frame rate (frames/s) |
1353 | - * |
1354 | - * Allocates memory, initializes the internal engine and returns a |
1355 | - * handle to it. A rate of 100 frames per second is normal. |
1356 | - */ |
1357 | -#define utouch_frame_new_engine(num_frames, num_slots, frame_rate) \ |
1358 | - utouch_frame_new_engine_raw(num_frames, \ |
1359 | - num_slots, \ |
1360 | - frame_rate, \ |
1361 | - UTOUCH_FRAME_VERSION, \ |
1362 | - sizeof(struct utouch_surface), \ |
1363 | - sizeof(struct utouch_frame), \ |
1364 | - sizeof(struct utouch_contact)) |
1365 | - |
1366 | -/** |
1367 | - * utouch_frame_delete_engine - deallocate a frame engine |
1368 | - * @fh: frame engine in use |
1369 | - * |
1370 | - * Deallocates all memory associated with the engine. |
1371 | - */ |
1372 | -void utouch_frame_delete_engine(utouch_frame_handle fh); |
1373 | - |
1374 | -/** |
1375 | - * utouch_frame_get_surface - get the mutable device surface information |
1376 | - * @fh: the frame engine in use |
1377 | - * |
1378 | - * Returns a pointer to the mutable device surface information. It is |
1379 | - * preferrably set up by one of the input handlers. The pointer is ABI |
1380 | - * agnostic, has frame engine scope, and is owned by the engine. |
1381 | - */ |
1382 | -struct utouch_surface *utouch_frame_get_surface(utouch_frame_handle fh); |
1383 | - |
1384 | -/** |
1385 | - * utouch_frame_get_current_slot - get the current mutable slot contact |
1386 | - * @fh: the frame engine in use |
1387 | - * |
1388 | - * Returns a pointer to the contact current being modified. The |
1389 | - * pointer is ABI agnostic, has frame engine scope, and is owned by |
1390 | - * the engine. |
1391 | - */ |
1392 | -struct utouch_contact *utouch_frame_get_current_slot(utouch_frame_handle fh); |
1393 | - |
1394 | -/** |
1395 | - * utouch_frame_set_current_slot - set the current slot number |
1396 | - * @fh: the frame engine in use |
1397 | - * @slot: the slot number |
1398 | - * |
1399 | - * Sets the slot currently being modified. Returns zero if successful, |
1400 | - * negative error otherwise. |
1401 | - */ |
1402 | -int utouch_frame_set_current_slot(utouch_frame_handle fh, int slot); |
1403 | - |
1404 | -/** |
1405 | - * utouch_frame_set_current_id - set the current slot by touch id |
1406 | - * @fh: the frame engine in use |
1407 | - * @id: the touch id |
1408 | - * |
1409 | - * Sets the slot currently being modified, by touch id. If the id is |
1410 | - * not currently in use (does not have an active slot), a new slot is |
1411 | - * assigned. Returns zero if successful, negative error otherwise. |
1412 | - */ |
1413 | -int utouch_frame_set_current_id(utouch_frame_handle fh, int id); |
1414 | - |
1415 | -/** |
1416 | - * utouch_frame_sync - synchronize and return new frame |
1417 | - * @fh: the frame engine in use |
1418 | - * @time: the frame synchronization time (ms) |
1419 | - * |
1420 | - * Scans through the updates, and in case the changes make up a new |
1421 | - * frame, returns the updated frame. |
1422 | - * |
1423 | - * If time is zero, a time-of-receipt will be used instead. |
1424 | - * |
1425 | - * The frame returned is always the next in the cyclic list, and |
1426 | - * always points back at the previous frame returned by this function. |
1427 | - * |
1428 | - * The returned pointer is ABI agnostic and owned by the frame |
1429 | - * engine. It may very well be zero if there is nothing to report or |
1430 | - * if the frame rate is limited. |
1431 | - */ |
1432 | -const struct utouch_frame *utouch_frame_sync(utouch_frame_handle fh, |
1433 | - utouch_frame_time_t time); |
1434 | - |
1435 | -#ifdef __cplusplus |
1436 | -} |
1437 | -#endif |
1438 | - |
1439 | -#endif |
1440 | |
1441 | === modified file 'src/Makefile.am' |
1442 | --- src/Makefile.am 2011-06-13 20:40:50 +0000 |
1443 | +++ src/Makefile.am 2012-08-22 16:25:28 +0000 |
1444 | @@ -1,9 +1,9 @@ |
1445 | |
1446 | -version_script = $(srcdir)/libutouch-frame.ver |
1447 | - |
1448 | -lib_LTLIBRARIES = libutouch-frame.la |
1449 | - |
1450 | -libutouch_frame_la_LDFLAGS = \ |
1451 | +version_script = $(srcdir)/libframe.ver |
1452 | + |
1453 | +lib_LTLIBRARIES = libframe.la |
1454 | + |
1455 | +libframe_la_LDFLAGS = \ |
1456 | -version-info @LIB_VERSION@ \ |
1457 | -Wl,-z,defs -Wl,--as-needed \ |
1458 | -Wl,--version-script=$(version_script) \ |
1459 | @@ -11,7 +11,7 @@ |
1460 | $(EVEMU_LIBS) \ |
1461 | $(MTDEV_LIBS) |
1462 | |
1463 | -libutouch_frame_la_SOURCES = \ |
1464 | +libframe_la_SOURCES = \ |
1465 | frame-impl.h \ |
1466 | frame.c \ |
1467 | frame-mtdev.c |
1468 | @@ -20,16 +20,16 @@ |
1469 | |
1470 | INCLUDES = -I$(top_srcdir)/include/ |
1471 | |
1472 | -libutouch_frameincludedir = $(includedir)/utouch |
1473 | -libutouch_frameinclude_HEADERS = \ |
1474 | - $(top_srcdir)/include/utouch/frame.h \ |
1475 | - $(top_srcdir)/include/utouch/frame-mtdev.h |
1476 | +libframeincludedir = $(includedir)/oif |
1477 | +libframeinclude_HEADERS = \ |
1478 | + $(top_srcdir)/include/oif/frame.h \ |
1479 | + $(top_srcdir)/include/oif/frame-mtdev.h |
1480 | |
1481 | if HAVE_XI |
1482 | |
1483 | -libutouch_frame_la_LDFLAGS += $(XINPUT_LIBS) $(X11_LIBS) |
1484 | -libutouch_frame_la_SOURCES += frame-xi2.c |
1485 | -libutouch_frameinclude_HEADERS += $(top_srcdir)/include/utouch/frame-xi2.h |
1486 | +libframe_la_LDFLAGS += $(XINPUT_LIBS) $(X11_LIBS) |
1487 | +libframe_la_SOURCES += frame-xi2.c |
1488 | +libframeinclude_HEADERS += $(top_srcdir)/include/oif/frame-xi2.h |
1489 | |
1490 | endif |
1491 | |
1492 | |
1493 | === modified file 'src/Makefile.in' |
1494 | --- src/Makefile.in 2011-08-09 21:39:02 +0000 |
1495 | +++ src/Makefile.in 2012-08-22 16:25:28 +0000 |
1496 | @@ -37,9 +37,9 @@ |
1497 | host_triplet = @host@ |
1498 | @HAVE_XI_TRUE@am__append_1 = $(XINPUT_LIBS) $(X11_LIBS) |
1499 | @HAVE_XI_TRUE@am__append_2 = frame-xi2.c |
1500 | -@HAVE_XI_TRUE@am__append_3 = $(top_srcdir)/include/utouch/frame-xi2.h |
1501 | +@HAVE_XI_TRUE@am__append_3 = $(top_srcdir)/include/oif/frame-xi2.h |
1502 | subdir = src |
1503 | -DIST_COMMON = $(am__libutouch_frameinclude_HEADERS_DIST) \ |
1504 | +DIST_COMMON = $(am__libframeinclude_HEADERS_DIST) \ |
1505 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in |
1506 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
1507 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac |
1508 | @@ -71,22 +71,20 @@ |
1509 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ |
1510 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' |
1511 | am__installdirs = "$(DESTDIR)$(libdir)" \ |
1512 | - "$(DESTDIR)$(libutouch_frameincludedir)" |
1513 | + "$(DESTDIR)$(libframeincludedir)" |
1514 | LTLIBRARIES = $(lib_LTLIBRARIES) |
1515 | -libutouch_frame_la_LIBADD = |
1516 | -am__libutouch_frame_la_SOURCES_DIST = frame-impl.h frame.c \ |
1517 | - frame-mtdev.c frame-xi2.c |
1518 | +libframe_la_LIBADD = |
1519 | +am__libframe_la_SOURCES_DIST = frame-impl.h frame.c frame-mtdev.c \ |
1520 | + frame-xi2.c |
1521 | @HAVE_XI_TRUE@am__objects_1 = frame-xi2.lo |
1522 | -am_libutouch_frame_la_OBJECTS = frame.lo frame-mtdev.lo \ |
1523 | - $(am__objects_1) |
1524 | -libutouch_frame_la_OBJECTS = $(am_libutouch_frame_la_OBJECTS) |
1525 | +am_libframe_la_OBJECTS = frame.lo frame-mtdev.lo $(am__objects_1) |
1526 | +libframe_la_OBJECTS = $(am_libframe_la_OBJECTS) |
1527 | AM_V_lt = $(am__v_lt_$(V)) |
1528 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) |
1529 | am__v_lt_0 = --silent |
1530 | -libutouch_frame_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ |
1531 | - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
1532 | - $(AM_CFLAGS) $(CFLAGS) $(libutouch_frame_la_LDFLAGS) \ |
1533 | - $(LDFLAGS) -o $@ |
1534 | +libframe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ |
1535 | + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
1536 | + $(libframe_la_LDFLAGS) $(LDFLAGS) -o $@ |
1537 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
1538 | depcomp = $(SHELL) $(top_srcdir)/config-aux/depcomp |
1539 | am__depfiles_maybe = depfiles |
1540 | @@ -113,13 +111,12 @@ |
1541 | AM_V_GEN = $(am__v_GEN_$(V)) |
1542 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) |
1543 | am__v_GEN_0 = @echo " GEN " $@; |
1544 | -SOURCES = $(libutouch_frame_la_SOURCES) |
1545 | -DIST_SOURCES = $(am__libutouch_frame_la_SOURCES_DIST) |
1546 | -am__libutouch_frameinclude_HEADERS_DIST = \ |
1547 | - $(top_srcdir)/include/utouch/frame.h \ |
1548 | - $(top_srcdir)/include/utouch/frame-mtdev.h \ |
1549 | - $(top_srcdir)/include/utouch/frame-xi2.h |
1550 | -HEADERS = $(libutouch_frameinclude_HEADERS) |
1551 | +SOURCES = $(libframe_la_SOURCES) |
1552 | +DIST_SOURCES = $(am__libframe_la_SOURCES_DIST) |
1553 | +am__libframeinclude_HEADERS_DIST = $(top_srcdir)/include/oif/frame.h \ |
1554 | + $(top_srcdir)/include/oif/frame-mtdev.h \ |
1555 | + $(top_srcdir)/include/oif/frame-xi2.h |
1556 | +HEADERS = $(libframeinclude_HEADERS) |
1557 | ETAGS = etags |
1558 | CTAGS = ctags |
1559 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
1560 | @@ -249,18 +246,18 @@ |
1561 | top_build_prefix = @top_build_prefix@ |
1562 | top_builddir = @top_builddir@ |
1563 | top_srcdir = @top_srcdir@ |
1564 | -version_script = $(srcdir)/libutouch-frame.ver |
1565 | -lib_LTLIBRARIES = libutouch-frame.la |
1566 | -libutouch_frame_la_LDFLAGS = -version-info @LIB_VERSION@ -Wl,-z,defs \ |
1567 | +version_script = $(srcdir)/libframe.ver |
1568 | +lib_LTLIBRARIES = libframe.la |
1569 | +libframe_la_LDFLAGS = -version-info @LIB_VERSION@ -Wl,-z,defs \ |
1570 | -Wl,--as-needed -Wl,--version-script=$(version_script) -lm \ |
1571 | $(EVEMU_LIBS) $(MTDEV_LIBS) $(am__append_1) |
1572 | -libutouch_frame_la_SOURCES = frame-impl.h frame.c frame-mtdev.c \ |
1573 | +libframe_la_SOURCES = frame-impl.h frame.c frame-mtdev.c \ |
1574 | $(am__append_2) |
1575 | AM_CFLAGS = $(CWARNFLAGS) |
1576 | INCLUDES = -I$(top_srcdir)/include/ |
1577 | -libutouch_frameincludedir = $(includedir)/utouch |
1578 | -libutouch_frameinclude_HEADERS = $(top_srcdir)/include/utouch/frame.h \ |
1579 | - $(top_srcdir)/include/utouch/frame-mtdev.h $(am__append_3) |
1580 | +libframeincludedir = $(includedir)/oif |
1581 | +libframeinclude_HEADERS = $(top_srcdir)/include/oif/frame.h \ |
1582 | + $(top_srcdir)/include/oif/frame-mtdev.h $(am__append_3) |
1583 | EXTRA_DIST = $(version_script) |
1584 | all: all-am |
1585 | |
1586 | @@ -327,8 +324,8 @@ |
1587 | echo "rm -f \"$${dir}/so_locations\""; \ |
1588 | rm -f "$${dir}/so_locations"; \ |
1589 | done |
1590 | -libutouch-frame.la: $(libutouch_frame_la_OBJECTS) $(libutouch_frame_la_DEPENDENCIES) |
1591 | - $(AM_V_CCLD)$(libutouch_frame_la_LINK) -rpath $(libdir) $(libutouch_frame_la_OBJECTS) $(libutouch_frame_la_LIBADD) $(LIBS) |
1592 | +libframe.la: $(libframe_la_OBJECTS) $(libframe_la_DEPENDENCIES) |
1593 | + $(AM_V_CCLD)$(libframe_la_LINK) -rpath $(libdir) $(libframe_la_OBJECTS) $(libframe_la_LIBADD) $(LIBS) |
1594 | |
1595 | mostlyclean-compile: |
1596 | -rm -f *.$(OBJEXT) |
1597 | @@ -369,26 +366,26 @@ |
1598 | |
1599 | clean-libtool: |
1600 | -rm -rf .libs _libs |
1601 | -install-libutouch_frameincludeHEADERS: $(libutouch_frameinclude_HEADERS) |
1602 | +install-libframeincludeHEADERS: $(libframeinclude_HEADERS) |
1603 | @$(NORMAL_INSTALL) |
1604 | - test -z "$(libutouch_frameincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libutouch_frameincludedir)" |
1605 | - @list='$(libutouch_frameinclude_HEADERS)'; test -n "$(libutouch_frameincludedir)" || list=; \ |
1606 | + test -z "$(libframeincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libframeincludedir)" |
1607 | + @list='$(libframeinclude_HEADERS)'; test -n "$(libframeincludedir)" || list=; \ |
1608 | for p in $$list; do \ |
1609 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
1610 | echo "$$d$$p"; \ |
1611 | done | $(am__base_list) | \ |
1612 | while read files; do \ |
1613 | - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libutouch_frameincludedir)'"; \ |
1614 | - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libutouch_frameincludedir)" || exit $$?; \ |
1615 | + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libframeincludedir)'"; \ |
1616 | + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libframeincludedir)" || exit $$?; \ |
1617 | done |
1618 | |
1619 | -uninstall-libutouch_frameincludeHEADERS: |
1620 | +uninstall-libframeincludeHEADERS: |
1621 | @$(NORMAL_UNINSTALL) |
1622 | - @list='$(libutouch_frameinclude_HEADERS)'; test -n "$(libutouch_frameincludedir)" || list=; \ |
1623 | + @list='$(libframeinclude_HEADERS)'; test -n "$(libframeincludedir)" || list=; \ |
1624 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ |
1625 | test -n "$$files" || exit 0; \ |
1626 | - echo " ( cd '$(DESTDIR)$(libutouch_frameincludedir)' && rm -f" $$files ")"; \ |
1627 | - cd "$(DESTDIR)$(libutouch_frameincludedir)" && rm -f $$files |
1628 | + echo " ( cd '$(DESTDIR)$(libframeincludedir)' && rm -f" $$files ")"; \ |
1629 | + cd "$(DESTDIR)$(libframeincludedir)" && rm -f $$files |
1630 | |
1631 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
1632 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
1633 | @@ -476,7 +473,7 @@ |
1634 | check: check-am |
1635 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) |
1636 | installdirs: |
1637 | - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libutouch_frameincludedir)"; do \ |
1638 | + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libframeincludedir)"; do \ |
1639 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
1640 | done |
1641 | install: install-am |
1642 | @@ -527,7 +524,7 @@ |
1643 | |
1644 | info-am: |
1645 | |
1646 | -install-data-am: install-libutouch_frameincludeHEADERS |
1647 | +install-data-am: install-libframeincludeHEADERS |
1648 | |
1649 | install-dvi: install-dvi-am |
1650 | |
1651 | @@ -574,7 +571,7 @@ |
1652 | ps-am: |
1653 | |
1654 | uninstall-am: uninstall-libLTLIBRARIES \ |
1655 | - uninstall-libutouch_frameincludeHEADERS |
1656 | + uninstall-libframeincludeHEADERS |
1657 | |
1658 | .MAKE: install-am install-strip |
1659 | |
1660 | @@ -585,14 +582,14 @@ |
1661 | install install-am install-data install-data-am install-dvi \ |
1662 | install-dvi-am install-exec install-exec-am install-html \ |
1663 | install-html-am install-info install-info-am \ |
1664 | - install-libLTLIBRARIES install-libutouch_frameincludeHEADERS \ |
1665 | + install-libLTLIBRARIES install-libframeincludeHEADERS \ |
1666 | install-man install-pdf install-pdf-am install-ps \ |
1667 | install-ps-am install-strip installcheck installcheck-am \ |
1668 | installdirs maintainer-clean maintainer-clean-generic \ |
1669 | mostlyclean mostlyclean-compile mostlyclean-generic \ |
1670 | mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ |
1671 | uninstall-am uninstall-libLTLIBRARIES \ |
1672 | - uninstall-libutouch_frameincludeHEADERS |
1673 | + uninstall-libframeincludeHEADERS |
1674 | |
1675 | |
1676 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
1677 | |
1678 | === modified file 'src/frame-impl.h' |
1679 | --- src/frame-impl.h 2011-05-17 14:09:11 +0000 |
1680 | +++ src/frame-impl.h 2012-08-22 16:25:28 +0000 |
1681 | @@ -1,6 +1,6 @@ |
1682 | /***************************************************************************** |
1683 | * |
1684 | - * utouch-frame - Touch Frame Library |
1685 | + * frame - Touch Frame Library |
1686 | * |
1687 | * Copyright (C) 2011 Canonical Ltd. |
1688 | * |
1689 | @@ -22,17 +22,17 @@ |
1690 | #ifndef FRAME_IMPL_H |
1691 | #define FRAME_IMPL_H |
1692 | |
1693 | -#include <utouch/frame.h> |
1694 | +#include <oif/frame.h> |
1695 | |
1696 | -struct utouch_frame_engine { |
1697 | +struct oif_frame_engine { |
1698 | int num_frames; |
1699 | int num_slots; |
1700 | int hold_ms; |
1701 | int frame; |
1702 | int slot; |
1703 | - struct utouch_surface *surface; |
1704 | - struct utouch_frame **frames; |
1705 | - struct utouch_frame *next; |
1706 | + struct oif_surface *surface; |
1707 | + struct oif_frame **frames; |
1708 | + struct oif_frame *next; |
1709 | int *evmap; |
1710 | float map[9]; |
1711 | unsigned int semi_mt_num_active; |
1712 | |
1713 | === modified file 'src/frame-mtdev.c' |
1714 | --- src/frame-mtdev.c 2011-08-09 19:19:42 +0000 |
1715 | +++ src/frame-mtdev.c 2012-08-22 16:25:28 +0000 |
1716 | @@ -1,6 +1,6 @@ |
1717 | /***************************************************************************** |
1718 | * |
1719 | - * utouch-frame - Touch Frame Library |
1720 | + * frame - Touch Frame Library |
1721 | * |
1722 | * Copyright (C) 2010 Canonical Ltd. |
1723 | * |
1724 | @@ -19,7 +19,7 @@ |
1725 | * |
1726 | ****************************************************************************/ |
1727 | |
1728 | -#include <utouch/frame-mtdev.h> |
1729 | +#include <oif/frame-mtdev.h> |
1730 | #include "frame-impl.h" |
1731 | #include <linux/input.h> |
1732 | #include <errno.h> |
1733 | @@ -35,7 +35,7 @@ |
1734 | evemu_has_event(dev, EV_KEY, BTN_LEFT); |
1735 | } |
1736 | |
1737 | -int utouch_frame_is_supported_mtdev(const struct evemu_device *dev) |
1738 | +int oif_frame_is_supported_mtdev(const struct evemu_device *dev) |
1739 | { |
1740 | |
1741 | /* only support pure absolute devices at this time */ |
1742 | @@ -56,13 +56,12 @@ |
1743 | evemu_has_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP); |
1744 | } |
1745 | |
1746 | -int utouch_frame_init_mtdev(utouch_frame_handle fh, |
1747 | - const struct evemu_device *dev) |
1748 | +int oif_frame_init_mtdev(oif_frame_handle fh, const struct evemu_device *dev) |
1749 | { |
1750 | - struct utouch_surface *s = fh->surface; |
1751 | + struct oif_surface *s = fh->surface; |
1752 | float tmp; |
1753 | |
1754 | - if (!utouch_frame_is_supported_mtdev(dev)) |
1755 | + if (!oif_frame_is_supported_mtdev(dev)) |
1756 | return -ENODEV; |
1757 | |
1758 | if (is_pointer(dev)) { |
1759 | @@ -157,14 +156,14 @@ |
1760 | return 0; |
1761 | } |
1762 | |
1763 | -static int handle_abs_event(utouch_frame_handle fh, |
1764 | +static int handle_abs_event(oif_frame_handle fh, |
1765 | const struct input_event *ev) |
1766 | { |
1767 | - struct utouch_contact *t = utouch_frame_get_current_slot(fh); |
1768 | + struct oif_contact *t = oif_frame_get_current_slot(fh); |
1769 | |
1770 | switch (ev->code) { |
1771 | case ABS_MT_SLOT: |
1772 | - utouch_frame_set_current_slot(fh, ev->value); |
1773 | + oif_frame_set_current_slot(fh, ev->value); |
1774 | return 1; |
1775 | case ABS_MT_POSITION_X: |
1776 | t->x = ev->value; |
1777 | @@ -213,7 +212,7 @@ |
1778 | } |
1779 | } |
1780 | |
1781 | -static int handle_key_event(utouch_frame_handle fh, |
1782 | +static int handle_key_event(oif_frame_handle fh, |
1783 | const struct input_event *ev) |
1784 | { |
1785 | /* EV_KEY events are only used for semi-mt touch count */ |
1786 | @@ -246,19 +245,19 @@ |
1787 | } |
1788 | } |
1789 | |
1790 | -static utouch_frame_time_t get_evtime_ms(const struct input_event *syn) |
1791 | +static oif_frame_time_t get_evtime_ms(const struct input_event *syn) |
1792 | { |
1793 | - static const utouch_frame_time_t ms = 1000; |
1794 | + static const oif_frame_time_t ms = 1000; |
1795 | return syn->time.tv_usec / ms + syn->time.tv_sec * ms; |
1796 | } |
1797 | |
1798 | -const struct utouch_frame * |
1799 | -utouch_frame_pump_mtdev(utouch_frame_handle fh, const struct input_event *ev) |
1800 | +const struct oif_frame * |
1801 | +oif_frame_pump_mtdev(oif_frame_handle fh, const struct input_event *ev) |
1802 | { |
1803 | - const struct utouch_frame *f = 0; |
1804 | + const struct oif_frame *f = 0; |
1805 | |
1806 | if (ev->type == EV_SYN && ev->code == SYN_REPORT) |
1807 | - f = utouch_frame_sync(fh, get_evtime_ms(ev)); |
1808 | + f = oif_frame_sync(fh, get_evtime_ms(ev)); |
1809 | else if (ev->type == EV_ABS) |
1810 | handle_abs_event(fh, ev); |
1811 | else if (ev->type == EV_KEY) |
1812 | |
1813 | === modified file 'src/frame-xi2.c' |
1814 | --- src/frame-xi2.c 2011-08-09 19:22:39 +0000 |
1815 | +++ src/frame-xi2.c 2012-08-22 16:25:28 +0000 |
1816 | @@ -1,6 +1,6 @@ |
1817 | /***************************************************************************** |
1818 | * |
1819 | - * utouch-frame - Touch Frame Library |
1820 | + * frame - Touch Frame Library |
1821 | * |
1822 | * Copyright (C) 2010 Canonical Ltd. |
1823 | * |
1824 | @@ -18,7 +18,7 @@ |
1825 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1826 | * |
1827 | ****************************************************************************/ |
1828 | -#include <utouch/frame-xi2.h> |
1829 | +#include <oif/frame-xi2.h> |
1830 | #include <xorg/xserver-properties.h> |
1831 | #include <linux/input.h> |
1832 | #include "frame-impl.h" |
1833 | @@ -36,7 +36,7 @@ |
1834 | if (!strcmp(name, AXIS_LABEL_PROP_##field) && \ |
1835 | (fh->evmap[number] = field)) |
1836 | |
1837 | -int utouch_frame_is_supported_xi2(Display *dpy, const XIDeviceInfo *dev) |
1838 | +int oif_frame_is_supported_xi2(Display *dpy, const XIDeviceInfo *dev) |
1839 | { |
1840 | |
1841 | int i; |
1842 | @@ -48,10 +48,10 @@ |
1843 | return 0; |
1844 | } |
1845 | |
1846 | -static void init_properties(utouch_frame_handle fh, |
1847 | - Display *dpy, const XIDeviceInfo *dev) |
1848 | +static void init_properties(oif_frame_handle fh, Display *dpy, |
1849 | + const XIDeviceInfo *dev) |
1850 | { |
1851 | - struct utouch_surface *s = fh->surface; |
1852 | + struct oif_surface *s = fh->surface; |
1853 | XITouchClassInfo *v; |
1854 | int i; |
1855 | |
1856 | @@ -78,7 +78,7 @@ |
1857 | fh->map[0] = fh->map[4] = fh->map[8] = 1; |
1858 | } |
1859 | |
1860 | -static void update_transform(utouch_frame_handle fh, Display *dpy, int devid) |
1861 | +static void update_transform(oif_frame_handle fh, Display *dpy, int devid) |
1862 | { |
1863 | unsigned long nitem, nbyte; |
1864 | unsigned char *data; |
1865 | @@ -99,9 +99,9 @@ |
1866 | XFree(data); |
1867 | } |
1868 | |
1869 | -static void update_screen(utouch_frame_handle fh, Display *dpy) |
1870 | +static void update_screen(oif_frame_handle fh, Display *dpy) |
1871 | { |
1872 | - struct utouch_surface *s = fh->surface; |
1873 | + struct oif_surface *s = fh->surface; |
1874 | XWindowAttributes attrs; |
1875 | float x1, y1, x2, y2; |
1876 | |
1877 | @@ -123,10 +123,10 @@ |
1878 | s->mapped_max_x, s->mapped_max_y, s->mapped_max_pressure); |
1879 | } |
1880 | |
1881 | -static void init_valuators(utouch_frame_handle fh, |
1882 | - Display *dpy, const XIDeviceInfo *dev) |
1883 | +static void init_valuators(oif_frame_handle fh, Display *dpy, |
1884 | + const XIDeviceInfo *dev) |
1885 | { |
1886 | - struct utouch_surface *s = fh->surface; |
1887 | + struct oif_surface *s = fh->surface; |
1888 | XITouchValuatorClassInfo *v; |
1889 | char *name; |
1890 | int i; |
1891 | @@ -193,15 +193,15 @@ |
1892 | } |
1893 | } |
1894 | |
1895 | -int utouch_frame_init_xi2(utouch_frame_handle fh, |
1896 | - Display *dpy, const XIDeviceInfo *dev) |
1897 | +int oif_frame_init_xi2(oif_frame_handle fh, Display *dpy, |
1898 | + const XIDeviceInfo *dev) |
1899 | { |
1900 | free(fh->evmap); |
1901 | fh->evmap =calloc(dev->num_classes, sizeof(int)); |
1902 | if (!fh->evmap) |
1903 | return -ENOMEM; |
1904 | |
1905 | - if (!utouch_frame_is_supported_xi2(dpy, dev)) |
1906 | + if (!oif_frame_is_supported_xi2(dpy, dev)) |
1907 | return -ENODEV; |
1908 | |
1909 | init_properties(fh, dpy, dev); |
1910 | @@ -212,9 +212,8 @@ |
1911 | return 0; |
1912 | } |
1913 | |
1914 | -static int handle_event(utouch_frame_handle fh, |
1915 | - struct utouch_contact *slot, |
1916 | - int ix, float value) |
1917 | +static int handle_event(oif_frame_handle fh, struct oif_contact *slot, int ix, |
1918 | + float value) |
1919 | { |
1920 | switch (fh->evmap[ix]) { |
1921 | case ABS_MT_POSITION_X: |
1922 | @@ -257,37 +256,35 @@ |
1923 | } |
1924 | } |
1925 | |
1926 | -int utouch_frame_configure_xi2(utouch_frame_handle fh, |
1927 | - const XConfigureEvent *ev) |
1928 | +int oif_frame_configure_xi2(oif_frame_handle fh, const XConfigureEvent *ev) |
1929 | { |
1930 | if (ev->display) |
1931 | update_screen(fh, ev->display); |
1932 | return 1; |
1933 | } |
1934 | |
1935 | -const struct utouch_frame *sync_xi2(utouch_frame_handle fh, |
1936 | - utouch_frame_time_t time) |
1937 | +const struct oif_frame *sync_xi2(oif_frame_handle fh, oif_frame_time_t time) |
1938 | { |
1939 | - struct utouch_frame *next = fh->next; |
1940 | + struct oif_frame *next = fh->next; |
1941 | int i; |
1942 | |
1943 | /* no velocity adjustments without device time stamps in place */ |
1944 | for (i = 0; i < fh->num_slots; i++) { |
1945 | - struct utouch_contact *q = next->slots[i]; |
1946 | + struct oif_contact *q = next->slots[i]; |
1947 | q->vx = 0; |
1948 | q->vy = 0; |
1949 | } |
1950 | |
1951 | - return utouch_frame_sync(fh, time); |
1952 | + return oif_frame_sync(fh, time); |
1953 | } |
1954 | |
1955 | -const struct utouch_frame * |
1956 | -utouch_frame_pump_xi2(utouch_frame_handle fh, const XIDeviceEvent *ev) |
1957 | +const struct oif_frame * |
1958 | +oif_frame_pump_xi2(oif_frame_handle fh, const XIDeviceEvent *ev) |
1959 | { |
1960 | const XIPropertyEvent *prop_ev; |
1961 | const double *value; |
1962 | const unsigned char *mask; |
1963 | - struct utouch_contact *slot; |
1964 | + struct oif_contact *slot; |
1965 | int touchid, nbyte, nbit, num, i; |
1966 | |
1967 | switch (ev->evtype) { |
1968 | @@ -300,16 +297,16 @@ |
1969 | nbyte = ev->valuators.mask_len; |
1970 | nbit = nbyte << 3; |
1971 | |
1972 | - utouch_frame_set_current_id(fh, touchid); |
1973 | - slot = utouch_frame_get_current_slot(fh); |
1974 | + oif_frame_set_current_id(fh, touchid); |
1975 | + slot = oif_frame_get_current_slot(fh); |
1976 | num = 0; |
1977 | for (i = 0; i < nbit; i++) |
1978 | if (XIMaskIsSet(mask, i)) |
1979 | handle_event(fh, slot, i, value[num++]); |
1980 | if (ev->evtype == XI_TouchBegin) |
1981 | - utouch_frame_get_current_slot(fh)->active = 1; |
1982 | + oif_frame_get_current_slot(fh)->active = 1; |
1983 | else if (ev->evtype == XI_TouchEnd) |
1984 | - utouch_frame_get_current_slot(fh)->active = 0; |
1985 | + oif_frame_get_current_slot(fh)->active = 0; |
1986 | return sync_xi2(fh, ev->time); |
1987 | case XI_PropertyEvent: |
1988 | prop_ev = (XIPropertyEvent *)ev; |
1989 | |
1990 | === modified file 'src/frame.c' |
1991 | --- src/frame.c 2011-08-09 19:22:39 +0000 |
1992 | +++ src/frame.c 2012-08-22 16:25:28 +0000 |
1993 | @@ -1,6 +1,6 @@ |
1994 | /***************************************************************************** |
1995 | * |
1996 | - * utouch-frame - Touch Frame Library |
1997 | + * frame - Touch Frame Library |
1998 | * |
1999 | * Copyright (C) 2010 Canonical Ltd. |
2000 | * |
2001 | @@ -28,22 +28,22 @@ |
2002 | |
2003 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) |
2004 | |
2005 | -unsigned int utouch_frame_get_version(void) |
2006 | +unsigned int oif_frame_get_version(void) |
2007 | { |
2008 | - return UTOUCH_FRAME_VERSION; |
2009 | + return OIF_FRAME_VERSION; |
2010 | } |
2011 | |
2012 | -unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh) |
2013 | +unsigned int oif_frame_get_num_frames(oif_frame_handle fh) |
2014 | { |
2015 | return fh->num_frames; |
2016 | } |
2017 | |
2018 | -unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh) |
2019 | +unsigned int oif_frame_get_num_slots(oif_frame_handle fh) |
2020 | { |
2021 | return fh->num_slots; |
2022 | } |
2023 | |
2024 | -static void destroy_slots(struct utouch_contact **slots, int nslot) |
2025 | +static void destroy_slots(struct oif_contact **slots, int nslot) |
2026 | { |
2027 | int i; |
2028 | |
2029 | @@ -54,7 +54,7 @@ |
2030 | } |
2031 | } |
2032 | |
2033 | -static void destroy_frame(struct utouch_frame *frame, int nslot) |
2034 | +static void destroy_frame(struct oif_frame *frame, int nslot) |
2035 | { |
2036 | if (frame) { |
2037 | destroy_slots(frame->slots, nslot); |
2038 | @@ -63,7 +63,7 @@ |
2039 | } |
2040 | } |
2041 | |
2042 | -static void destroy_frames(struct utouch_frame **frames, int nframe, int nslot) |
2043 | +static void destroy_frames(struct oif_frame **frames, int nframe, int nslot) |
2044 | { |
2045 | int i; |
2046 | |
2047 | @@ -74,10 +74,10 @@ |
2048 | } |
2049 | } |
2050 | |
2051 | -static struct utouch_contact **create_slots(int nslot, int size) |
2052 | +static struct oif_contact **create_slots(int nslot, int size) |
2053 | { |
2054 | - struct utouch_contact **slots; |
2055 | - struct utouch_contact *s; |
2056 | + struct oif_contact **slots; |
2057 | + struct oif_contact *s; |
2058 | int i; |
2059 | |
2060 | slots = calloc(nslot, sizeof(slots[0])); |
2061 | @@ -99,10 +99,9 @@ |
2062 | return 0; |
2063 | } |
2064 | |
2065 | -static struct utouch_frame *create_frame(int nslot, |
2066 | - int frame_size, int slot_size) |
2067 | +static struct oif_frame *create_frame(int nslot, int frame_size, int slot_size) |
2068 | { |
2069 | - struct utouch_frame *frame; |
2070 | + struct oif_frame *frame; |
2071 | |
2072 | frame = calloc(1, frame_size); |
2073 | if (!frame) |
2074 | @@ -119,11 +118,11 @@ |
2075 | return 0; |
2076 | } |
2077 | |
2078 | -static struct utouch_frame **create_frames(int nframe, int nslot, |
2079 | - int frame_size, int slot_size) |
2080 | +static struct oif_frame **create_frames(int nframe, int nslot, int frame_size, |
2081 | + int slot_size) |
2082 | { |
2083 | - struct utouch_frame **frames; |
2084 | - struct utouch_frame *f; |
2085 | + struct oif_frame **frames; |
2086 | + struct oif_frame *f; |
2087 | int i; |
2088 | |
2089 | frames = calloc(nframe, sizeof(frames[0])); |
2090 | @@ -143,19 +142,19 @@ |
2091 | return 0; |
2092 | } |
2093 | |
2094 | -utouch_frame_handle utouch_frame_new_engine_raw(unsigned int nframe, |
2095 | - unsigned int nslot, |
2096 | - unsigned int rate, |
2097 | - unsigned int version, |
2098 | - unsigned int surface_size, |
2099 | - unsigned int frame_size, |
2100 | - unsigned int slot_size) |
2101 | +oif_frame_handle oif_frame_new_engine_raw(unsigned int nframe, |
2102 | + unsigned int nslot, |
2103 | + unsigned int rate, |
2104 | + unsigned int version, |
2105 | + unsigned int surface_size, |
2106 | + unsigned int frame_size, |
2107 | + unsigned int slot_size) |
2108 | { |
2109 | - struct utouch_frame *f, *pf; |
2110 | - utouch_frame_handle fh; |
2111 | + struct oif_frame *f, *pf; |
2112 | + oif_frame_handle fh; |
2113 | int i, j; |
2114 | |
2115 | - fh = calloc(1, sizeof(struct utouch_frame_engine)); |
2116 | + fh = calloc(1, sizeof(struct oif_frame_engine)); |
2117 | if (!fh) |
2118 | return 0; |
2119 | |
2120 | @@ -163,9 +162,9 @@ |
2121 | fh->num_slots = nslot; |
2122 | fh->hold_ms = 1000 / rate; |
2123 | |
2124 | - surface_size = MAX(surface_size, sizeof(struct utouch_surface)); |
2125 | - frame_size = MAX(frame_size, sizeof(struct utouch_frame)); |
2126 | - slot_size = MAX(slot_size, sizeof(struct utouch_contact)); |
2127 | + surface_size = MAX(surface_size, sizeof(struct oif_surface)); |
2128 | + frame_size = MAX(frame_size, sizeof(struct oif_frame)); |
2129 | + slot_size = MAX(slot_size, sizeof(struct oif_contact)); |
2130 | |
2131 | fh->surface = calloc(1, surface_size); |
2132 | fh->frames = create_frames(nframe, nslot, frame_size, slot_size); |
2133 | @@ -184,11 +183,11 @@ |
2134 | |
2135 | return fh; |
2136 | out: |
2137 | - utouch_frame_delete_engine(fh); |
2138 | + oif_frame_delete_engine(fh); |
2139 | return 0; |
2140 | } |
2141 | |
2142 | -void utouch_frame_delete_engine(utouch_frame_handle fh) |
2143 | +void oif_frame_delete_engine(oif_frame_handle fh) |
2144 | { |
2145 | free(fh->evmap); |
2146 | destroy_frame(fh->next, fh->num_slots); |
2147 | @@ -197,17 +196,17 @@ |
2148 | free(fh); |
2149 | } |
2150 | |
2151 | -struct utouch_surface *utouch_frame_get_surface(utouch_frame_handle fh) |
2152 | +struct oif_surface *oif_frame_get_surface(oif_frame_handle fh) |
2153 | { |
2154 | return fh->surface; |
2155 | } |
2156 | |
2157 | -struct utouch_contact *utouch_frame_get_current_slot(utouch_frame_handle fh) |
2158 | +struct oif_contact *oif_frame_get_current_slot(oif_frame_handle fh) |
2159 | { |
2160 | return fh->next->slots[fh->slot]; |
2161 | } |
2162 | |
2163 | -int utouch_frame_set_current_slot(utouch_frame_handle fh, int slot) |
2164 | +int oif_frame_set_current_slot(oif_frame_handle fh, int slot) |
2165 | { |
2166 | if (slot < 0 || slot >= fh->num_slots) |
2167 | return -EINVAL; |
2168 | @@ -215,29 +214,29 @@ |
2169 | return 0; |
2170 | } |
2171 | |
2172 | -int utouch_frame_set_current_id(utouch_frame_handle fh, int id) |
2173 | +int oif_frame_set_current_id(oif_frame_handle fh, int id) |
2174 | { |
2175 | - struct utouch_contact *t; |
2176 | + struct oif_contact *t; |
2177 | int i; |
2178 | |
2179 | for (i = 0; i < fh->num_slots; i++) { |
2180 | t = fh->next->slots[i]; |
2181 | if (t->active && t->id == id) |
2182 | - return utouch_frame_set_current_slot(fh, i); |
2183 | + return oif_frame_set_current_slot(fh, i); |
2184 | } |
2185 | for (i = 0; i < fh->num_slots; i++) { |
2186 | t = fh->next->slots[i]; |
2187 | if (!t->active) { |
2188 | t->active = 1; |
2189 | t->id = id; |
2190 | - return utouch_frame_set_current_slot(fh, i); |
2191 | + return oif_frame_set_current_slot(fh, i); |
2192 | } |
2193 | } |
2194 | return -ENOMEM; |
2195 | } |
2196 | |
2197 | -static void transform_slot(struct utouch_contact *slot, |
2198 | - const struct utouch_surface *s) |
2199 | +static void transform_slot(struct oif_contact *slot, |
2200 | + const struct oif_surface *s) |
2201 | { |
2202 | float fx = (s->mapped_max_x - s->mapped_min_x) / (s->max_x - s->min_x); |
2203 | float fy = (s->mapped_max_y - s->mapped_min_y) / (s->max_y - s->min_y); |
2204 | @@ -255,14 +254,12 @@ |
2205 | slot->distance *= f; |
2206 | } |
2207 | |
2208 | -static void set_contact(utouch_frame_handle fh, |
2209 | - struct utouch_contact *a, |
2210 | - struct utouch_contact *b, |
2211 | - utouch_frame_time_t dt) |
2212 | +static void set_contact(oif_frame_handle fh, struct oif_contact *a, |
2213 | + struct oif_contact *b, oif_frame_time_t dt) |
2214 | { |
2215 | static const float D = 0.333; |
2216 | - struct utouch_surface *s = fh->surface; |
2217 | - const struct utouch_contact *ap = a->prev; |
2218 | + struct oif_surface *s = fh->surface; |
2219 | + const struct oif_contact *ap = a->prev; |
2220 | |
2221 | a->active = b->active; |
2222 | a->id = b->id; |
2223 | @@ -297,15 +294,14 @@ |
2224 | b->vy = a->vy; |
2225 | } |
2226 | |
2227 | -static int detect_addrem(const struct utouch_contact *a, |
2228 | - const struct utouch_contact *b) |
2229 | +static int detect_addrem(const struct oif_contact *a, |
2230 | + const struct oif_contact *b) |
2231 | { |
2232 | return a->id != b->id || a->tool_type != b->tool_type || |
2233 | a->active != b->active; |
2234 | } |
2235 | |
2236 | -static int detect_mod(const struct utouch_contact *a, |
2237 | - const struct utouch_contact *b) |
2238 | +static int detect_mod(const struct oif_contact *a, const struct oif_contact *b) |
2239 | { |
2240 | return a->x != b->x || a->y != b->y || |
2241 | a->touch_major != b->touch_major || |
2242 | @@ -317,20 +313,20 @@ |
2243 | a->distance != b->distance; |
2244 | } |
2245 | |
2246 | -static utouch_frame_time_t get_time_ms() |
2247 | +static oif_frame_time_t get_time_ms() |
2248 | { |
2249 | - static const utouch_frame_time_t ms = 1000; |
2250 | + static const oif_frame_time_t ms = 1000; |
2251 | struct timeval tv; |
2252 | gettimeofday(&tv, 0); |
2253 | return tv.tv_usec / ms + tv.tv_sec * ms; |
2254 | } |
2255 | |
2256 | -static void set_semi_mt_touches(utouch_frame_handle fh) |
2257 | +static void set_semi_mt_touches(oif_frame_handle fh) |
2258 | { |
2259 | - struct utouch_frame *next = fh->next; |
2260 | - struct utouch_contact *a = next->slots[0]; |
2261 | - struct utouch_contact *b = next->slots[1]; |
2262 | - struct utouch_surface *s = fh->surface; |
2263 | + struct oif_frame *next = fh->next; |
2264 | + struct oif_contact *a = next->slots[0]; |
2265 | + struct oif_contact *b = next->slots[1]; |
2266 | + struct oif_surface *s = fh->surface; |
2267 | /* use touch ids half way around the ID range */ |
2268 | unsigned int id = a->id + (s->max_id - s->min_id) / 2; |
2269 | float x = (a->x + b->x) / 2; |
2270 | @@ -338,9 +334,9 @@ |
2271 | int i; |
2272 | |
2273 | for (i = 2; i < fh->semi_mt_num_active; i++) { |
2274 | - struct utouch_contact *c = next->slots[i]; |
2275 | + struct oif_contact *c = next->slots[i]; |
2276 | |
2277 | - memset(c, 0, sizeof(struct utouch_contact)); |
2278 | + memset(c, 0, sizeof(struct oif_contact)); |
2279 | c->active = 1; |
2280 | if (id > s->max_id) |
2281 | id -= (s->max_id - s->min_id + 1); |
2282 | @@ -353,14 +349,14 @@ |
2283 | next->slots[i]->active = 0; |
2284 | } |
2285 | |
2286 | -const struct utouch_frame *utouch_frame_sync(utouch_frame_handle fh, |
2287 | - utouch_frame_time_t time) |
2288 | +const struct oif_frame *oif_frame_sync(oif_frame_handle fh, |
2289 | + oif_frame_time_t time) |
2290 | { |
2291 | - struct utouch_frame *frame = fh->frames[fh->frame]; |
2292 | - const struct utouch_frame *prev = frame->prev; |
2293 | - struct utouch_frame *next = fh->next; |
2294 | + struct oif_frame *frame = fh->frames[fh->frame]; |
2295 | + const struct oif_frame *prev = frame->prev; |
2296 | + struct oif_frame *next = fh->next; |
2297 | int naddrem = 0, nmod = 0; |
2298 | - utouch_frame_time_t dt; |
2299 | + oif_frame_time_t dt; |
2300 | int i; |
2301 | |
2302 | frame->time = time ? time : get_time_ms(); |
2303 | @@ -371,8 +367,8 @@ |
2304 | set_semi_mt_touches(fh); |
2305 | |
2306 | for (i = 0; i < fh->num_slots; i++) { |
2307 | - struct utouch_contact *p = frame->slots[i]; |
2308 | - struct utouch_contact *q = next->slots[i]; |
2309 | + struct oif_contact *p = frame->slots[i]; |
2310 | + struct oif_contact *q = next->slots[i]; |
2311 | |
2312 | set_contact(fh, p, q, dt); |
2313 | if (p->active) |
2314 | |
2315 | === added file 'src/libframe.ver' |
2316 | --- src/libframe.ver 1970-01-01 00:00:00 +0000 |
2317 | +++ src/libframe.ver 2012-08-22 16:25:28 +0000 |
2318 | @@ -0,0 +1,21 @@ |
2319 | +FRAME_1.1 { |
2320 | + global: |
2321 | + oif_frame_configure_xi2; |
2322 | + oif_frame_delete_engine; |
2323 | + oif_frame_get_current_slot; |
2324 | + oif_frame_get_num_frames; |
2325 | + oif_frame_get_num_slots; |
2326 | + oif_frame_get_surface; |
2327 | + oif_frame_get_version; |
2328 | + oif_frame_init_mtdev; |
2329 | + oif_frame_init_xi2; |
2330 | + oif_frame_is_supported_mtdev; |
2331 | + oif_frame_is_supported_xi2; |
2332 | + oif_frame_new_engine_raw; |
2333 | + oif_frame_pump_mtdev; |
2334 | + oif_frame_pump_xi2; |
2335 | + |
2336 | + local: |
2337 | + *; |
2338 | +}; |
2339 | + |
2340 | |
2341 | === removed file 'src/libutouch-frame.ver' |
2342 | --- src/libutouch-frame.ver 2011-06-14 13:27:45 +0000 |
2343 | +++ src/libutouch-frame.ver 1970-01-01 00:00:00 +0000 |
2344 | @@ -1,21 +0,0 @@ |
2345 | -UTOUCH_FRAME_1.1 { |
2346 | - global: |
2347 | - utouch_frame_configure_xi2; |
2348 | - utouch_frame_delete_engine; |
2349 | - utouch_frame_get_current_slot; |
2350 | - utouch_frame_get_num_frames; |
2351 | - utouch_frame_get_num_slots; |
2352 | - utouch_frame_get_surface; |
2353 | - utouch_frame_get_version; |
2354 | - utouch_frame_init_mtdev; |
2355 | - utouch_frame_init_xi2; |
2356 | - utouch_frame_is_supported_mtdev; |
2357 | - utouch_frame_is_supported_xi2; |
2358 | - utouch_frame_new_engine_raw; |
2359 | - utouch_frame_pump_mtdev; |
2360 | - utouch_frame_pump_xi2; |
2361 | - |
2362 | - local: |
2363 | - *; |
2364 | -}; |
2365 | - |
2366 | |
2367 | === modified file 'tools/Makefile.am' |
2368 | --- tools/Makefile.am 2011-04-29 13:11:26 +0000 |
2369 | +++ tools/Makefile.am 2012-08-22 16:25:28 +0000 |
2370 | @@ -1,24 +1,24 @@ |
2371 | -bin_PROGRAMS = utouch-frame-test-mtdev |
2372 | +bin_PROGRAMS = frame-test-mtdev |
2373 | |
2374 | INCLUDES=-I$(top_srcdir)/include/ |
2375 | |
2376 | -utouch_frame_test_mtdev_SOURCES = common-defs.h utouch-frame-test-mtdev.c \ |
2377 | - utouch-frame-test-mtdev.txt |
2378 | -utouch_frame_test_mtdev_LDFLAGS = -L$(top_builddir)/src/.libs/ \ |
2379 | - -lutouch-frame -lutouch-evemu -lmtdev -lm |
2380 | -local_manpages = utouch-frame-test-mtdev.1 |
2381 | +frame_test_mtdev_SOURCES = common-defs.h frame-test-mtdev.c \ |
2382 | + frame-test-mtdev.txt |
2383 | +frame_test_mtdev_LDFLAGS = -L$(top_builddir)/src/.libs/ \ |
2384 | + -lframe -levemu -lmtdev -lm |
2385 | +local_manpages = frame-test-mtdev.1 |
2386 | |
2387 | if HAVE_XI |
2388 | |
2389 | AM_CFLAGS = $(XINPUT_CFLAGS) |
2390 | |
2391 | -bin_PROGRAMS += utouch-frame-test-xi2 |
2392 | +bin_PROGRAMS += frame-test-xi2 |
2393 | |
2394 | -utouch_frame_test_xi2_SOURCES = common-defs.h utouch-frame-test-xi2.c \ |
2395 | - utouch-frame-test-xi2.txt |
2396 | -utouch_frame_test_xi2_LDFLAGS = $(XINPUT_LIBS) $(X11_LIBS) \ |
2397 | - -L$(top_builddir)/src/.libs/ -lutouch-frame |
2398 | -local_manpages += utouch-frame-test-xi2.1 |
2399 | +frame_test_xi2_SOURCES = common-defs.h frame-test-xi2.c \ |
2400 | + frame-test-xi2.txt |
2401 | +frame_test_xi2_LDFLAGS = $(XINPUT_LIBS) $(X11_LIBS) \ |
2402 | + -L$(top_builddir)/src/.libs/ -lframe |
2403 | +local_manpages += frame-test-xi2.1 |
2404 | |
2405 | endif |
2406 | |
2407 | |
2408 | === modified file 'tools/Makefile.in' |
2409 | --- tools/Makefile.in 2011-08-09 21:40:37 +0000 |
2410 | +++ tools/Makefile.in 2012-08-22 16:25:28 +0000 |
2411 | @@ -34,9 +34,9 @@ |
2412 | POST_UNINSTALL = : |
2413 | build_triplet = @build@ |
2414 | host_triplet = @host@ |
2415 | -bin_PROGRAMS = utouch-frame-test-mtdev$(EXEEXT) $(am__EXEEXT_1) |
2416 | -@HAVE_XI_TRUE@am__append_1 = utouch-frame-test-xi2 |
2417 | -@HAVE_XI_TRUE@am__append_2 = utouch-frame-test-xi2.1 |
2418 | +bin_PROGRAMS = frame-test-mtdev$(EXEEXT) $(am__EXEEXT_1) |
2419 | +@HAVE_XI_TRUE@am__append_1 = frame-test-xi2 |
2420 | +@HAVE_XI_TRUE@am__append_2 = frame-test-xi2.1 |
2421 | subdir = tools |
2422 | DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ |
2423 | $(srcdir)/Makefile.in |
2424 | @@ -48,31 +48,28 @@ |
2425 | CONFIG_HEADER = $(top_builddir)/config.h |
2426 | CONFIG_CLEAN_FILES = |
2427 | CONFIG_CLEAN_VPATH_FILES = |
2428 | -@HAVE_XI_TRUE@am__EXEEXT_1 = utouch-frame-test-xi2$(EXEEXT) |
2429 | +@HAVE_XI_TRUE@am__EXEEXT_1 = frame-test-xi2$(EXEEXT) |
2430 | am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" |
2431 | PROGRAMS = $(bin_PROGRAMS) |
2432 | -am_utouch_frame_test_mtdev_OBJECTS = \ |
2433 | - utouch-frame-test-mtdev.$(OBJEXT) |
2434 | -utouch_frame_test_mtdev_OBJECTS = \ |
2435 | - $(am_utouch_frame_test_mtdev_OBJECTS) |
2436 | -utouch_frame_test_mtdev_LDADD = $(LDADD) |
2437 | +am_frame_test_mtdev_OBJECTS = frame-test-mtdev.$(OBJEXT) |
2438 | +frame_test_mtdev_OBJECTS = $(am_frame_test_mtdev_OBJECTS) |
2439 | +frame_test_mtdev_LDADD = $(LDADD) |
2440 | AM_V_lt = $(am__v_lt_$(V)) |
2441 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) |
2442 | am__v_lt_0 = --silent |
2443 | -utouch_frame_test_mtdev_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ |
2444 | - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
2445 | - $(AM_CFLAGS) $(CFLAGS) $(utouch_frame_test_mtdev_LDFLAGS) \ |
2446 | - $(LDFLAGS) -o $@ |
2447 | -am__utouch_frame_test_xi2_SOURCES_DIST = common-defs.h \ |
2448 | - utouch-frame-test-xi2.c utouch-frame-test-xi2.txt |
2449 | -@HAVE_XI_TRUE@am_utouch_frame_test_xi2_OBJECTS = \ |
2450 | -@HAVE_XI_TRUE@ utouch-frame-test-xi2.$(OBJEXT) |
2451 | -utouch_frame_test_xi2_OBJECTS = $(am_utouch_frame_test_xi2_OBJECTS) |
2452 | -utouch_frame_test_xi2_LDADD = $(LDADD) |
2453 | -utouch_frame_test_xi2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ |
2454 | - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
2455 | - $(AM_CFLAGS) $(CFLAGS) $(utouch_frame_test_xi2_LDFLAGS) \ |
2456 | - $(LDFLAGS) -o $@ |
2457 | +frame_test_mtdev_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ |
2458 | + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
2459 | + $(AM_CFLAGS) $(CFLAGS) $(frame_test_mtdev_LDFLAGS) $(LDFLAGS) \ |
2460 | + -o $@ |
2461 | +am__frame_test_xi2_SOURCES_DIST = common-defs.h frame-test-xi2.c \ |
2462 | + frame-test-xi2.txt |
2463 | +@HAVE_XI_TRUE@am_frame_test_xi2_OBJECTS = frame-test-xi2.$(OBJEXT) |
2464 | +frame_test_xi2_OBJECTS = $(am_frame_test_xi2_OBJECTS) |
2465 | +frame_test_xi2_LDADD = $(LDADD) |
2466 | +frame_test_xi2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ |
2467 | + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
2468 | + $(AM_CFLAGS) $(CFLAGS) $(frame_test_xi2_LDFLAGS) $(LDFLAGS) -o \ |
2469 | + $@ |
2470 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
2471 | depcomp = $(SHELL) $(top_srcdir)/config-aux/depcomp |
2472 | am__depfiles_maybe = depfiles |
2473 | @@ -99,10 +96,9 @@ |
2474 | AM_V_GEN = $(am__v_GEN_$(V)) |
2475 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) |
2476 | am__v_GEN_0 = @echo " GEN " $@; |
2477 | -SOURCES = $(utouch_frame_test_mtdev_SOURCES) \ |
2478 | - $(utouch_frame_test_xi2_SOURCES) |
2479 | -DIST_SOURCES = $(utouch_frame_test_mtdev_SOURCES) \ |
2480 | - $(am__utouch_frame_test_xi2_SOURCES_DIST) |
2481 | +SOURCES = $(frame_test_mtdev_SOURCES) $(frame_test_xi2_SOURCES) |
2482 | +DIST_SOURCES = $(frame_test_mtdev_SOURCES) \ |
2483 | + $(am__frame_test_xi2_SOURCES_DIST) |
2484 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; |
2485 | am__vpath_adj = case $$p in \ |
2486 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ |
2487 | @@ -257,19 +253,19 @@ |
2488 | top_builddir = @top_builddir@ |
2489 | top_srcdir = @top_srcdir@ |
2490 | INCLUDES = -I$(top_srcdir)/include/ |
2491 | -utouch_frame_test_mtdev_SOURCES = common-defs.h utouch-frame-test-mtdev.c \ |
2492 | - utouch-frame-test-mtdev.txt |
2493 | - |
2494 | -utouch_frame_test_mtdev_LDFLAGS = -L$(top_builddir)/src/.libs/ \ |
2495 | - -lutouch-frame -lutouch-evemu -lmtdev -lm |
2496 | - |
2497 | -local_manpages = utouch-frame-test-mtdev.1 $(am__append_2) |
2498 | +frame_test_mtdev_SOURCES = common-defs.h frame-test-mtdev.c \ |
2499 | + frame-test-mtdev.txt |
2500 | + |
2501 | +frame_test_mtdev_LDFLAGS = -L$(top_builddir)/src/.libs/ \ |
2502 | + -lframe -levemu -lmtdev -lm |
2503 | + |
2504 | +local_manpages = frame-test-mtdev.1 $(am__append_2) |
2505 | @HAVE_XI_TRUE@AM_CFLAGS = $(XINPUT_CFLAGS) |
2506 | -@HAVE_XI_TRUE@utouch_frame_test_xi2_SOURCES = common-defs.h utouch-frame-test-xi2.c \ |
2507 | -@HAVE_XI_TRUE@ utouch-frame-test-xi2.txt |
2508 | +@HAVE_XI_TRUE@frame_test_xi2_SOURCES = common-defs.h frame-test-xi2.c \ |
2509 | +@HAVE_XI_TRUE@ frame-test-xi2.txt |
2510 | |
2511 | -@HAVE_XI_TRUE@utouch_frame_test_xi2_LDFLAGS = $(XINPUT_LIBS) $(X11_LIBS) \ |
2512 | -@HAVE_XI_TRUE@ -L$(top_builddir)/src/.libs/ -lutouch-frame |
2513 | +@HAVE_XI_TRUE@frame_test_xi2_LDFLAGS = $(XINPUT_LIBS) $(X11_LIBS) \ |
2514 | +@HAVE_XI_TRUE@ -L$(top_builddir)/src/.libs/ -lframe |
2515 | |
2516 | @HAVE_DOCTOOLS_TRUE@dist_man_MANS = $(local_manpages) |
2517 | @HAVE_DOCTOOLS_TRUE@CLEANFILES = $(dist_man_MANS) |
2518 | @@ -350,12 +346,12 @@ |
2519 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ |
2520 | echo " rm -f" $$list; \ |
2521 | rm -f $$list |
2522 | -utouch-frame-test-mtdev$(EXEEXT): $(utouch_frame_test_mtdev_OBJECTS) $(utouch_frame_test_mtdev_DEPENDENCIES) |
2523 | - @rm -f utouch-frame-test-mtdev$(EXEEXT) |
2524 | - $(AM_V_CCLD)$(utouch_frame_test_mtdev_LINK) $(utouch_frame_test_mtdev_OBJECTS) $(utouch_frame_test_mtdev_LDADD) $(LIBS) |
2525 | -utouch-frame-test-xi2$(EXEEXT): $(utouch_frame_test_xi2_OBJECTS) $(utouch_frame_test_xi2_DEPENDENCIES) |
2526 | - @rm -f utouch-frame-test-xi2$(EXEEXT) |
2527 | - $(AM_V_CCLD)$(utouch_frame_test_xi2_LINK) $(utouch_frame_test_xi2_OBJECTS) $(utouch_frame_test_xi2_LDADD) $(LIBS) |
2528 | +frame-test-mtdev$(EXEEXT): $(frame_test_mtdev_OBJECTS) $(frame_test_mtdev_DEPENDENCIES) |
2529 | + @rm -f frame-test-mtdev$(EXEEXT) |
2530 | + $(AM_V_CCLD)$(frame_test_mtdev_LINK) $(frame_test_mtdev_OBJECTS) $(frame_test_mtdev_LDADD) $(LIBS) |
2531 | +frame-test-xi2$(EXEEXT): $(frame_test_xi2_OBJECTS) $(frame_test_xi2_DEPENDENCIES) |
2532 | + @rm -f frame-test-xi2$(EXEEXT) |
2533 | + $(AM_V_CCLD)$(frame_test_xi2_LINK) $(frame_test_xi2_OBJECTS) $(frame_test_xi2_LDADD) $(LIBS) |
2534 | |
2535 | mostlyclean-compile: |
2536 | -rm -f *.$(OBJEXT) |
2537 | @@ -363,8 +359,8 @@ |
2538 | distclean-compile: |
2539 | -rm -f *.tab.c |
2540 | |
2541 | -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utouch-frame-test-mtdev.Po@am__quote@ |
2542 | -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utouch-frame-test-xi2.Po@am__quote@ |
2543 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame-test-mtdev.Po@am__quote@ |
2544 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame-test-xi2.Po@am__quote@ |
2545 | |
2546 | .c.o: |
2547 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
2548 | |
2549 | === modified file 'tools/common-defs.h' |
2550 | --- tools/common-defs.h 2011-02-21 12:15:30 +0000 |
2551 | +++ tools/common-defs.h 2012-08-22 16:25:28 +0000 |
2552 | @@ -1,6 +1,6 @@ |
2553 | /***************************************************************************** |
2554 | * |
2555 | - * utouch-frame - Touch Frame Library |
2556 | + * frame - Touch Frame Library |
2557 | * |
2558 | * Copyright (C) 2010-2011 Canonical Ltd. |
2559 | * |
2560 | @@ -22,9 +22,9 @@ |
2561 | * |
2562 | ****************************************************************************/ |
2563 | |
2564 | -static void report_device_caps(utouch_frame_handle fh) |
2565 | +static void report_device_caps(oif_frame_handle fh) |
2566 | { |
2567 | - const struct utouch_surface *s = utouch_frame_get_surface(fh); |
2568 | + const struct oif_surface *s = oif_frame_get_surface(fh); |
2569 | |
2570 | fprintf(stderr, "device props:\n"); |
2571 | if (s->needs_pointer) |
2572 | @@ -52,12 +52,12 @@ |
2573 | fprintf(stderr, "\tdistance\n"); |
2574 | } |
2575 | |
2576 | -static void report_frame(const struct utouch_frame *frame) |
2577 | +static void report_frame(const struct oif_frame *frame) |
2578 | { |
2579 | int i; |
2580 | |
2581 | for (i = 0; i < frame->num_active; i++) { |
2582 | - const struct utouch_contact *t = frame->active[i]; |
2583 | + const struct oif_contact *t = frame->active[i]; |
2584 | |
2585 | fprintf(stderr, "touch %d\n", i); |
2586 | fprintf(stderr, " slot: %d\n", t->slot); |
2587 | |
2588 | === added file 'tools/frame-test-mtdev.1' |
2589 | --- tools/frame-test-mtdev.1 1970-01-01 00:00:00 +0000 |
2590 | +++ tools/frame-test-mtdev.1 2012-08-22 16:25:28 +0000 |
2591 | @@ -0,0 +1,42 @@ |
2592 | +'\" t |
2593 | +.\" Title: frame-test-mtdev |
2594 | +.\" Author: [see the "AUTHOR" section] |
2595 | +.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> |
2596 | +.\" Date: 08/15/2012 |
2597 | +.\" Manual: \ \& |
2598 | +.\" Source: \ \& |
2599 | +.\" Language: English |
2600 | +.\" |
2601 | +.TH "FRAME\-TEST\-MTDEV" "1" "08/15/2012" "\ \&" "\ \&" |
2602 | +.\" ----------------------------------------------------------------- |
2603 | +.\" * Define some portability stuff |
2604 | +.\" ----------------------------------------------------------------- |
2605 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
2606 | +.\" http://bugs.debian.org/507673 |
2607 | +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
2608 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
2609 | +.ie \n(.g .ds Aq \(aq |
2610 | +.el .ds Aq ' |
2611 | +.\" ----------------------------------------------------------------- |
2612 | +.\" * set default formatting |
2613 | +.\" ----------------------------------------------------------------- |
2614 | +.\" disable hyphenation |
2615 | +.nh |
2616 | +.\" disable justification (adjust text to left margin only) |
2617 | +.ad l |
2618 | +.\" ----------------------------------------------------------------- |
2619 | +.\" * MAIN CONTENT STARTS HERE * |
2620 | +.\" ----------------------------------------------------------------- |
2621 | +.SH "NAME" |
2622 | +frame-test-mtdev \- describe a device and report frame events |
2623 | +.SH "SYNOPSIS" |
2624 | +.sp |
2625 | +.nf |
2626 | +frame\-test\-mtdev device |
2627 | +.fi |
2628 | +.SH "DESCRIPTION" |
2629 | +.sp |
2630 | +A test tool used to analyse the capabilities and act as a test driver for the Open Input Framework touch frame library\&. |
2631 | +.SH "AUTHOR" |
2632 | +.sp |
2633 | +frame\-test\-mtdev was written by Henrik Rydberg <rydberg@euromail\&.se> |
2634 | |
2635 | === added file 'tools/frame-test-mtdev.c' |
2636 | --- tools/frame-test-mtdev.c 1970-01-01 00:00:00 +0000 |
2637 | +++ tools/frame-test-mtdev.c 2012-08-22 16:25:28 +0000 |
2638 | @@ -0,0 +1,167 @@ |
2639 | +/***************************************************************************** |
2640 | + * |
2641 | + * frame - Touch Frame Library |
2642 | + * |
2643 | + * Copyright (C) 2010-2011 Canonical Ltd. |
2644 | + * |
2645 | + * This program is free software: you can redistribute it and/or modify it |
2646 | + * under the terms of the GNU General Public License as published by the |
2647 | + * Free Software Foundation, either version 3 of the License, or (at your |
2648 | + * option) any later version. |
2649 | + * |
2650 | + * This program is distributed in the hope that it will be useful, but |
2651 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
2652 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2653 | + * General Public License for more details. |
2654 | + * |
2655 | + * You should have received a copy of the GNU General Public License along |
2656 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
2657 | + * |
2658 | + * Authors: |
2659 | + * Henrik Rydberg <rydberg@bitmath.org> |
2660 | + * |
2661 | + ****************************************************************************/ |
2662 | + |
2663 | +#define MTDEV_NO_LEGACY_API |
2664 | + |
2665 | +#include <oif/frame-mtdev.h> |
2666 | +#include <mtdev.h> |
2667 | +#include <string.h> |
2668 | +#include <stdio.h> |
2669 | +#include <unistd.h> |
2670 | +#include <sys/stat.h> |
2671 | +#include <fcntl.h> |
2672 | +#include "common-defs.h" |
2673 | + |
2674 | +struct frame_test { |
2675 | + struct evemu_device *evemu; |
2676 | + struct mtdev *mtdev; |
2677 | + oif_frame_handle fh; |
2678 | + struct stat fs; |
2679 | + FILE *fptest; |
2680 | + int fd; |
2681 | +}; |
2682 | + |
2683 | +static int init_evemu(struct frame_test *test) |
2684 | +{ |
2685 | + test->evemu = evemu_new(NULL); |
2686 | + if (!test->evemu) |
2687 | + return -1; |
2688 | + if (test->fptest) |
2689 | + return evemu_read(test->evemu, test->fptest) <= 0; |
2690 | + return evemu_extract(test->evemu, test->fd); |
2691 | +} |
2692 | + |
2693 | +static int init_mtdev(struct frame_test *test) |
2694 | +{ |
2695 | + if (test->fptest) |
2696 | + return 0; |
2697 | + test->mtdev = mtdev_new_open(test->fd); |
2698 | + if (!test->mtdev) |
2699 | + return -1; |
2700 | + return 0; |
2701 | +} |
2702 | + |
2703 | +static int init_frame(struct frame_test *test) |
2704 | +{ |
2705 | + test->fh = oif_frame_new_engine(100, 32, 100); |
2706 | + if (!test->fh) |
2707 | + return -1; |
2708 | + return oif_frame_init_mtdev(test->fh, test->evemu); |
2709 | +} |
2710 | + |
2711 | +static void destroy_all(struct frame_test *test) |
2712 | +{ |
2713 | + oif_frame_delete_engine(test->fh); |
2714 | + if (test->mtdev) |
2715 | + mtdev_close_delete(test->mtdev); |
2716 | + evemu_delete(test->evemu); |
2717 | + if (test->fptest) |
2718 | + fclose(test->fptest); |
2719 | + else |
2720 | + ioctl(test->fd, EVIOCGRAB, 0); |
2721 | + close(test->fd); |
2722 | + memset(test, 0, sizeof(*test)); |
2723 | +} |
2724 | + |
2725 | +static void loop_device(struct frame_test *test) |
2726 | +{ |
2727 | + FILE * fp = test->fptest; |
2728 | + const struct oif_frame *frame; |
2729 | + struct input_event ev; |
2730 | + |
2731 | + if (fp) { |
2732 | + struct timeval evtime; |
2733 | + memset(&evtime, 0, sizeof(evtime)); |
2734 | + while (evemu_read_event_realtime(fp, &ev, &evtime) > 0) { |
2735 | + frame = oif_frame_pump_mtdev(test->fh, &ev); |
2736 | + if (frame) |
2737 | + report_frame(frame); |
2738 | + } |
2739 | + } else { |
2740 | + while (!mtdev_idle(test->mtdev, test->fd, 5000)) { |
2741 | + while (mtdev_get(test->mtdev, test->fd, &ev, 1) > 0) { |
2742 | + frame = oif_frame_pump_mtdev(test->fh, &ev); |
2743 | + if (frame) |
2744 | + report_frame(frame); |
2745 | + } |
2746 | + } |
2747 | + } |
2748 | +} |
2749 | + |
2750 | +int main(int argc, char *argv[]) |
2751 | +{ |
2752 | + struct frame_test test; |
2753 | + |
2754 | + if (argc < 2) { |
2755 | + fprintf(stderr, "Usage: %s <device>\n", argv[0]); |
2756 | + return -1; |
2757 | + } |
2758 | + |
2759 | + memset(&test, 0, sizeof(test)); |
2760 | + |
2761 | + test.fd = open(argv[1], O_RDONLY | O_NONBLOCK); |
2762 | + if (test.fd < 0) { |
2763 | + fprintf(stderr, "error: could not open device\n"); |
2764 | + return -1; |
2765 | + } |
2766 | + if (fstat(test.fd, &test.fs)) { |
2767 | + fprintf(stderr, "error: could not stat the device\n"); |
2768 | + return -1; |
2769 | + } |
2770 | + if (!test.fs.st_rdev) |
2771 | + test.fptest = fdopen(test.fd, "r"); |
2772 | + |
2773 | + if (!test.fptest && ioctl(test.fd, EVIOCGRAB, 1)) { |
2774 | + fprintf(stderr, "error: could not grab the device\n"); |
2775 | + return -1; |
2776 | + } |
2777 | + |
2778 | + if (init_evemu(&test)) { |
2779 | + fprintf(stderr, "error: could not describe device\n"); |
2780 | + return -1; |
2781 | + } |
2782 | + if (!oif_frame_is_supported_mtdev(test.evemu)) { |
2783 | + fprintf(stderr, "error: unsupported device\n"); |
2784 | + return -1; |
2785 | + } |
2786 | + |
2787 | + fprintf(stderr, "device: %s\n", evemu_get_name(test.evemu)); |
2788 | + |
2789 | + if (init_mtdev(&test)) { |
2790 | + fprintf(stderr, "error: could not init mtdev\n"); |
2791 | + return -1; |
2792 | + } |
2793 | + if (init_frame(&test)) { |
2794 | + fprintf(stderr, "error: could not init frame\n"); |
2795 | + return -1; |
2796 | + } |
2797 | + |
2798 | + report_device_caps(test.fh); |
2799 | + |
2800 | + loop_device(&test); |
2801 | + |
2802 | + destroy_all(&test); |
2803 | + |
2804 | + return 0; |
2805 | +} |
2806 | |
2807 | === added file 'tools/frame-test-mtdev.txt' |
2808 | --- tools/frame-test-mtdev.txt 1970-01-01 00:00:00 +0000 |
2809 | +++ tools/frame-test-mtdev.txt 2012-08-22 16:25:28 +0000 |
2810 | @@ -0,0 +1,22 @@ |
2811 | +FRAME-TEST-MTDEV(1) |
2812 | +=================== |
2813 | + |
2814 | +NAME |
2815 | +---- |
2816 | + |
2817 | + frame-test-mtdev - describe a device and report frame events |
2818 | + |
2819 | +SYNOPSIS |
2820 | +-------- |
2821 | + |
2822 | + frame-test-mtdev device |
2823 | + |
2824 | +DESCRIPTION |
2825 | +----------- |
2826 | + |
2827 | +A test tool used to analyse the capabilities and act as a test driver for the |
2828 | +Open Input Framework touch frame library. |
2829 | + |
2830 | +AUTHOR |
2831 | +------ |
2832 | +frame-test-mtdev was written by Henrik Rydberg <rydberg@euromail.se> |
2833 | |
2834 | === added file 'tools/frame-test-xi2.c' |
2835 | --- tools/frame-test-xi2.c 1970-01-01 00:00:00 +0000 |
2836 | +++ tools/frame-test-xi2.c 2012-08-22 16:25:28 +0000 |
2837 | @@ -0,0 +1,177 @@ |
2838 | +/***************************************************************************** |
2839 | + * |
2840 | + * frame - Touch Frame Library |
2841 | + * |
2842 | + * Copyright (C) 2010-2011 Canonical Ltd. |
2843 | + * |
2844 | + * This program is free software: you can redistribute it and/or modify it |
2845 | + * under the terms of the GNU General Public License as published by the |
2846 | + * Free Software Foundation, either version 3 of the License, or (at your |
2847 | + * option) any later version. |
2848 | + * |
2849 | + * This program is distributed in the hope that it will be useful, but |
2850 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
2851 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2852 | + * General Public License for more details. |
2853 | + * |
2854 | + * You should have received a copy of the GNU General Public License along |
2855 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
2856 | + * |
2857 | + * Authors: |
2858 | + * Henrik Rydberg <rydberg@bitmath.org> |
2859 | + * |
2860 | + ****************************************************************************/ |
2861 | + |
2862 | +#define MTDEV_NO_LEGACY_API |
2863 | + |
2864 | +#include <oif/frame-xi2.h> |
2865 | +#include <string.h> |
2866 | +#include <stdio.h> |
2867 | +#include <unistd.h> |
2868 | +#include <fcntl.h> |
2869 | +#include <stdlib.h> |
2870 | +#include "common-defs.h" |
2871 | + |
2872 | +static int opcode; |
2873 | + |
2874 | +struct frame_test { |
2875 | + Display *display; |
2876 | + Window root, win; |
2877 | + XIDeviceInfo *info, *dev; |
2878 | + oif_frame_handle fh; |
2879 | +}; |
2880 | + |
2881 | +static int init_xi2(struct frame_test *test, int id) |
2882 | +{ |
2883 | + Display *dpy; |
2884 | + int ndevices, i; |
2885 | + int event, error; |
2886 | + |
2887 | + dpy = XOpenDisplay(NULL); |
2888 | + if (!dpy) |
2889 | + return -1; |
2890 | + |
2891 | + if (!XQueryExtension(dpy, "XInputExtension", &opcode, &event, &error)) |
2892 | + return -1; |
2893 | + |
2894 | + test->display = dpy; |
2895 | + test->info = XIQueryDevice(dpy, XIAllDevices, &ndevices); |
2896 | + test->dev = 0; |
2897 | + for (i = 0; i < ndevices; i++) |
2898 | + if (test->info[i].deviceid == id) |
2899 | + test->dev = &test->info[i]; |
2900 | + if (!test->dev) |
2901 | + return -1; |
2902 | + |
2903 | + test->root = DefaultRootWindow(dpy); |
2904 | + test->win = XCreateSimpleWindow(dpy, test->root, |
2905 | + 0, 0, 400, 400, 0, |
2906 | + BlackPixel(dpy, 0), |
2907 | + WhitePixel(dpy, 0)); |
2908 | + |
2909 | + XMapWindow(test->display, test->win); |
2910 | + XFlush(test->display); |
2911 | + |
2912 | + return 0; |
2913 | +} |
2914 | + |
2915 | +static int init_frame(struct frame_test *test) |
2916 | +{ |
2917 | + test->fh = oif_frame_new_engine(100, 32, 100); |
2918 | + if (!test->fh) |
2919 | + return -1; |
2920 | + return oif_frame_init_xi2(test->fh, test->display, test->dev); |
2921 | +} |
2922 | + |
2923 | +static void destroy_all(struct frame_test *test) |
2924 | +{ |
2925 | + oif_frame_delete_engine(test->fh); |
2926 | + XIFreeDeviceInfo(test->info); |
2927 | + XDestroyWindow(test->display, test->win); |
2928 | + XCloseDisplay(test->display); |
2929 | + memset(test, 0, sizeof(*test)); |
2930 | +} |
2931 | + |
2932 | +static void handle_event(struct frame_test *test, XEvent *ev) |
2933 | +{ |
2934 | + XGenericEventCookie *gev = &ev->xcookie; |
2935 | + const struct oif_frame *frame; |
2936 | + XConfigureEvent *cev; |
2937 | + XIDeviceEvent *dev; |
2938 | + |
2939 | + switch(ev->type) { |
2940 | + case ConfigureNotify: |
2941 | + cev = (XConfigureEvent *)ev; |
2942 | + if (cev->window == XDefaultRootWindow(cev->display)) |
2943 | + oif_frame_configure_xi2(test->fh, cev); |
2944 | + break; |
2945 | + case GenericEvent: |
2946 | + if (!XGetEventData(test->display, gev)) |
2947 | + break; |
2948 | + dev = gev->data; |
2949 | + /* null for some requests, quite odd */ |
2950 | + dev->display = ev->xany.display; |
2951 | + if (gev->type == GenericEvent && gev->extension == opcode) { |
2952 | + frame = oif_frame_pump_xi2(test->fh, dev); |
2953 | + if (frame) |
2954 | + report_frame(frame); |
2955 | + } |
2956 | + XFreeEventData(test->display, gev); |
2957 | + break; |
2958 | + } |
2959 | +} |
2960 | + |
2961 | +static void loop_device(struct frame_test *test) |
2962 | +{ |
2963 | + XIEventMask mask; |
2964 | + |
2965 | + mask.deviceid = XIAllDevices; |
2966 | + mask.mask_len = XIMaskLen(XI_LASTEVENT); |
2967 | + mask.mask = calloc(mask.mask_len, sizeof(char)); |
2968 | + |
2969 | + XISetMask(mask.mask, XI_TouchBegin); |
2970 | + XISetMask(mask.mask, XI_TouchUpdate); |
2971 | + XISetMask(mask.mask, XI_TouchEnd); |
2972 | + XISetMask(mask.mask, XI_PropertyEvent); |
2973 | + XISelectEvents(test->display, test->win, &mask, 1); |
2974 | + |
2975 | + XSelectInput(test->display, test->root, StructureNotifyMask); |
2976 | + |
2977 | + while (1) { |
2978 | + XEvent ev; |
2979 | + XNextEvent(test->display, &ev); |
2980 | + handle_event(test, &ev); |
2981 | + } |
2982 | +} |
2983 | + |
2984 | +int main(int argc, char *argv[]) |
2985 | +{ |
2986 | + struct frame_test test; |
2987 | + int id; |
2988 | + |
2989 | + if (argc < 2) { |
2990 | + fprintf(stderr, "Usage: %s <xinput_device_number>\n", argv[0]); |
2991 | + return -1; |
2992 | + } |
2993 | + id = atoi(argv[1]); |
2994 | + |
2995 | + if (init_xi2(&test, id)) { |
2996 | + fprintf(stderr, "error: could not describe device\n"); |
2997 | + return -1; |
2998 | + } |
2999 | + if (!oif_frame_is_supported_xi2(test.display, test.dev)) { |
3000 | + fprintf(stderr, "error: unsupported device\n"); |
3001 | + return -1; |
3002 | + } |
3003 | + if (init_frame(&test)) { |
3004 | + fprintf(stderr, "error: could not init frame\n"); |
3005 | + return -1; |
3006 | + } |
3007 | + |
3008 | + report_device_caps(test.fh); |
3009 | + |
3010 | + loop_device(&test); |
3011 | + |
3012 | + destroy_all(&test); |
3013 | + return 0; |
3014 | +} |
3015 | |
3016 | === added file 'tools/frame-test-xi2.txt' |
3017 | --- tools/frame-test-xi2.txt 1970-01-01 00:00:00 +0000 |
3018 | +++ tools/frame-test-xi2.txt 2012-08-22 16:25:28 +0000 |
3019 | @@ -0,0 +1,22 @@ |
3020 | +FRAME-TEST-XI2(1) |
3021 | +================= |
3022 | + |
3023 | +NAME |
3024 | +---- |
3025 | + |
3026 | + frame-test-xi2 - report frame events from an xinput device |
3027 | + |
3028 | +SYNOPSIS |
3029 | +-------- |
3030 | + |
3031 | + frame-test-xi2 xinput-device-number |
3032 | + |
3033 | +DESCRIPTION |
3034 | +----------- |
3035 | + |
3036 | +A test tool used to analyse the capabilities and act as a test driver for the |
3037 | +Open Input Framework touch frame library. |
3038 | + |
3039 | +AUTHOR |
3040 | +------ |
3041 | +frame-test-xi2 was written by Henrik Rydberg <rydberg@euromail.se> |
3042 | |
3043 | === removed file 'tools/utouch-frame-test-mtdev.1' |
3044 | --- tools/utouch-frame-test-mtdev.1 2011-08-09 21:39:02 +0000 |
3045 | +++ tools/utouch-frame-test-mtdev.1 1970-01-01 00:00:00 +0000 |
3046 | @@ -1,42 +0,0 @@ |
3047 | -'\" t |
3048 | -.\" Title: utouch-frame-test-mtdev |
3049 | -.\" Author: [see the "AUTHOR" section] |
3050 | -.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> |
3051 | -.\" Date: 08/09/2011 |
3052 | -.\" Manual: \ \& |
3053 | -.\" Source: \ \& |
3054 | -.\" Language: English |
3055 | -.\" |
3056 | -.TH "UTOUCH\-FRAME\-TEST\" "1" "08/09/2011" "\ \&" "\ \&" |
3057 | -.\" ----------------------------------------------------------------- |
3058 | -.\" * Define some portability stuff |
3059 | -.\" ----------------------------------------------------------------- |
3060 | -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3061 | -.\" http://bugs.debian.org/507673 |
3062 | -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
3063 | -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3064 | -.ie \n(.g .ds Aq \(aq |
3065 | -.el .ds Aq ' |
3066 | -.\" ----------------------------------------------------------------- |
3067 | -.\" * set default formatting |
3068 | -.\" ----------------------------------------------------------------- |
3069 | -.\" disable hyphenation |
3070 | -.nh |
3071 | -.\" disable justification (adjust text to left margin only) |
3072 | -.ad l |
3073 | -.\" ----------------------------------------------------------------- |
3074 | -.\" * MAIN CONTENT STARTS HERE * |
3075 | -.\" ----------------------------------------------------------------- |
3076 | -.SH "NAME" |
3077 | -utouch-frame-test-mtdev \- describe a device and report frame events |
3078 | -.SH "SYNOPSIS" |
3079 | -.sp |
3080 | -.nf |
3081 | -utouch\-frame\-test\-mtdev device |
3082 | -.fi |
3083 | -.SH "DESCRIPTION" |
3084 | -.sp |
3085 | -A test tool used to analyse the capabilities and act as a test driver for the uTouch touch frame library\&. |
3086 | -.SH "AUTHOR" |
3087 | -.sp |
3088 | -utouch\-frame\-test\-mtdev was written by Henrik Rydberg <rydberg@euromail\&.se> |
3089 | |
3090 | === removed file 'tools/utouch-frame-test-mtdev.c' |
3091 | --- tools/utouch-frame-test-mtdev.c 2011-04-29 07:04:53 +0000 |
3092 | +++ tools/utouch-frame-test-mtdev.c 1970-01-01 00:00:00 +0000 |
3093 | @@ -1,167 +0,0 @@ |
3094 | -/***************************************************************************** |
3095 | - * |
3096 | - * utouch-frame - Touch Frame Library |
3097 | - * |
3098 | - * Copyright (C) 2010-2011 Canonical Ltd. |
3099 | - * |
3100 | - * This program is free software: you can redistribute it and/or modify it |
3101 | - * under the terms of the GNU General Public License as published by the |
3102 | - * Free Software Foundation, either version 3 of the License, or (at your |
3103 | - * option) any later version. |
3104 | - * |
3105 | - * This program is distributed in the hope that it will be useful, but |
3106 | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
3107 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3108 | - * General Public License for more details. |
3109 | - * |
3110 | - * You should have received a copy of the GNU General Public License along |
3111 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
3112 | - * |
3113 | - * Authors: |
3114 | - * Henrik Rydberg <rydberg@bitmath.org> |
3115 | - * |
3116 | - ****************************************************************************/ |
3117 | - |
3118 | -#define MTDEV_NO_LEGACY_API |
3119 | - |
3120 | -#include <utouch/frame-mtdev.h> |
3121 | -#include <mtdev.h> |
3122 | -#include <string.h> |
3123 | -#include <stdio.h> |
3124 | -#include <unistd.h> |
3125 | -#include <sys/stat.h> |
3126 | -#include <fcntl.h> |
3127 | -#include "common-defs.h" |
3128 | - |
3129 | -struct frame_test { |
3130 | - struct evemu_device *evemu; |
3131 | - struct mtdev *mtdev; |
3132 | - utouch_frame_handle fh; |
3133 | - struct stat fs; |
3134 | - FILE *fptest; |
3135 | - int fd; |
3136 | -}; |
3137 | - |
3138 | -static int init_evemu(struct frame_test *test) |
3139 | -{ |
3140 | - test->evemu = evemu_new(NULL); |
3141 | - if (!test->evemu) |
3142 | - return -1; |
3143 | - if (test->fptest) |
3144 | - return evemu_read(test->evemu, test->fptest) <= 0; |
3145 | - return evemu_extract(test->evemu, test->fd); |
3146 | -} |
3147 | - |
3148 | -static int init_mtdev(struct frame_test *test) |
3149 | -{ |
3150 | - if (test->fptest) |
3151 | - return 0; |
3152 | - test->mtdev = mtdev_new_open(test->fd); |
3153 | - if (!test->mtdev) |
3154 | - return -1; |
3155 | - return 0; |
3156 | -} |
3157 | - |
3158 | -static int init_frame(struct frame_test *test) |
3159 | -{ |
3160 | - test->fh = utouch_frame_new_engine(100, 32, 100); |
3161 | - if (!test->fh) |
3162 | - return -1; |
3163 | - return utouch_frame_init_mtdev(test->fh, test->evemu); |
3164 | -} |
3165 | - |
3166 | -static void destroy_all(struct frame_test *test) |
3167 | -{ |
3168 | - utouch_frame_delete_engine(test->fh); |
3169 | - if (test->mtdev) |
3170 | - mtdev_close_delete(test->mtdev); |
3171 | - evemu_delete(test->evemu); |
3172 | - if (test->fptest) |
3173 | - fclose(test->fptest); |
3174 | - else |
3175 | - ioctl(test->fd, EVIOCGRAB, 0); |
3176 | - close(test->fd); |
3177 | - memset(test, 0, sizeof(*test)); |
3178 | -} |
3179 | - |
3180 | -static void loop_device(struct frame_test *test) |
3181 | -{ |
3182 | - FILE * fp = test->fptest; |
3183 | - const struct utouch_frame *frame; |
3184 | - struct input_event ev; |
3185 | - |
3186 | - if (fp) { |
3187 | - struct timeval evtime; |
3188 | - memset(&evtime, 0, sizeof(evtime)); |
3189 | - while (evemu_read_event_realtime(fp, &ev, &evtime) > 0) { |
3190 | - frame = utouch_frame_pump_mtdev(test->fh, &ev); |
3191 | - if (frame) |
3192 | - report_frame(frame); |
3193 | - } |
3194 | - } else { |
3195 | - while (!mtdev_idle(test->mtdev, test->fd, 5000)) { |
3196 | - while (mtdev_get(test->mtdev, test->fd, &ev, 1) > 0) { |
3197 | - frame = utouch_frame_pump_mtdev(test->fh, &ev); |
3198 | - if (frame) |
3199 | - report_frame(frame); |
3200 | - } |
3201 | - } |
3202 | - } |
3203 | -} |
3204 | - |
3205 | -int main(int argc, char *argv[]) |
3206 | -{ |
3207 | - struct frame_test test; |
3208 | - |
3209 | - if (argc < 2) { |
3210 | - fprintf(stderr, "Usage: %s <device>\n", argv[0]); |
3211 | - return -1; |
3212 | - } |
3213 | - |
3214 | - memset(&test, 0, sizeof(test)); |
3215 | - |
3216 | - test.fd = open(argv[1], O_RDONLY | O_NONBLOCK); |
3217 | - if (test.fd < 0) { |
3218 | - fprintf(stderr, "error: could not open device\n"); |
3219 | - return -1; |
3220 | - } |
3221 | - if (fstat(test.fd, &test.fs)) { |
3222 | - fprintf(stderr, "error: could not stat the device\n"); |
3223 | - return -1; |
3224 | - } |
3225 | - if (!test.fs.st_rdev) |
3226 | - test.fptest = fdopen(test.fd, "r"); |
3227 | - |
3228 | - if (!test.fptest && ioctl(test.fd, EVIOCGRAB, 1)) { |
3229 | - fprintf(stderr, "error: could not grab the device\n"); |
3230 | - return -1; |
3231 | - } |
3232 | - |
3233 | - if (init_evemu(&test)) { |
3234 | - fprintf(stderr, "error: could not describe device\n"); |
3235 | - return -1; |
3236 | - } |
3237 | - if (!utouch_frame_is_supported_mtdev(test.evemu)) { |
3238 | - fprintf(stderr, "error: unsupported device\n"); |
3239 | - return -1; |
3240 | - } |
3241 | - |
3242 | - fprintf(stderr, "device: %s\n", evemu_get_name(test.evemu)); |
3243 | - |
3244 | - if (init_mtdev(&test)) { |
3245 | - fprintf(stderr, "error: could not init mtdev\n"); |
3246 | - return -1; |
3247 | - } |
3248 | - if (init_frame(&test)) { |
3249 | - fprintf(stderr, "error: could not init frame\n"); |
3250 | - return -1; |
3251 | - } |
3252 | - |
3253 | - report_device_caps(test.fh); |
3254 | - |
3255 | - loop_device(&test); |
3256 | - |
3257 | - destroy_all(&test); |
3258 | - |
3259 | - return 0; |
3260 | -} |
3261 | |
3262 | === removed file 'tools/utouch-frame-test-mtdev.txt' |
3263 | --- tools/utouch-frame-test-mtdev.txt 2011-02-03 16:07:34 +0000 |
3264 | +++ tools/utouch-frame-test-mtdev.txt 1970-01-01 00:00:00 +0000 |
3265 | @@ -1,22 +0,0 @@ |
3266 | -UTOUCH-FRAME-TEST-MTDEV(1) |
3267 | -========================== |
3268 | - |
3269 | -NAME |
3270 | ----- |
3271 | - |
3272 | - utouch-frame-test-mtdev - describe a device and report frame events |
3273 | - |
3274 | -SYNOPSIS |
3275 | --------- |
3276 | - |
3277 | - utouch-frame-test-mtdev device |
3278 | - |
3279 | -DESCRIPTION |
3280 | ------------ |
3281 | - |
3282 | -A test tool used to analyse the capabilities and act as a test driver for the |
3283 | -uTouch touch frame library. |
3284 | - |
3285 | -AUTHOR |
3286 | ------- |
3287 | -utouch-frame-test-mtdev was written by Henrik Rydberg <rydberg@euromail.se> |
3288 | |
3289 | === removed file 'tools/utouch-frame-test-xi2.c' |
3290 | --- tools/utouch-frame-test-xi2.c 2011-02-21 12:16:19 +0000 |
3291 | +++ tools/utouch-frame-test-xi2.c 1970-01-01 00:00:00 +0000 |
3292 | @@ -1,177 +0,0 @@ |
3293 | -/***************************************************************************** |
3294 | - * |
3295 | - * utouch-frame - Touch Frame Library |
3296 | - * |
3297 | - * Copyright (C) 2010-2011 Canonical Ltd. |
3298 | - * |
3299 | - * This program is free software: you can redistribute it and/or modify it |
3300 | - * under the terms of the GNU General Public License as published by the |
3301 | - * Free Software Foundation, either version 3 of the License, or (at your |
3302 | - * option) any later version. |
3303 | - * |
3304 | - * This program is distributed in the hope that it will be useful, but |
3305 | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
3306 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3307 | - * General Public License for more details. |
3308 | - * |
3309 | - * You should have received a copy of the GNU General Public License along |
3310 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
3311 | - * |
3312 | - * Authors: |
3313 | - * Henrik Rydberg <rydberg@bitmath.org> |
3314 | - * |
3315 | - ****************************************************************************/ |
3316 | - |
3317 | -#define MTDEV_NO_LEGACY_API |
3318 | - |
3319 | -#include <utouch/frame-xi2.h> |
3320 | -#include <string.h> |
3321 | -#include <stdio.h> |
3322 | -#include <unistd.h> |
3323 | -#include <fcntl.h> |
3324 | -#include <stdlib.h> |
3325 | -#include "common-defs.h" |
3326 | - |
3327 | -static int opcode; |
3328 | - |
3329 | -struct frame_test { |
3330 | - Display *display; |
3331 | - Window root, win; |
3332 | - XIDeviceInfo *info, *dev; |
3333 | - utouch_frame_handle fh; |
3334 | -}; |
3335 | - |
3336 | -static int init_xi2(struct frame_test *test, int id) |
3337 | -{ |
3338 | - Display *dpy; |
3339 | - int ndevices, i; |
3340 | - int event, error; |
3341 | - |
3342 | - dpy = XOpenDisplay(NULL); |
3343 | - if (!dpy) |
3344 | - return -1; |
3345 | - |
3346 | - if (!XQueryExtension(dpy, "XInputExtension", &opcode, &event, &error)) |
3347 | - return -1; |
3348 | - |
3349 | - test->display = dpy; |
3350 | - test->info = XIQueryDevice(dpy, XIAllDevices, &ndevices); |
3351 | - test->dev = 0; |
3352 | - for (i = 0; i < ndevices; i++) |
3353 | - if (test->info[i].deviceid == id) |
3354 | - test->dev = &test->info[i]; |
3355 | - if (!test->dev) |
3356 | - return -1; |
3357 | - |
3358 | - test->root = DefaultRootWindow(dpy); |
3359 | - test->win = XCreateSimpleWindow(dpy, test->root, |
3360 | - 0, 0, 400, 400, 0, |
3361 | - BlackPixel(dpy, 0), |
3362 | - WhitePixel(dpy, 0)); |
3363 | - |
3364 | - XMapWindow(test->display, test->win); |
3365 | - XFlush(test->display); |
3366 | - |
3367 | - return 0; |
3368 | -} |
3369 | - |
3370 | -static int init_frame(struct frame_test *test) |
3371 | -{ |
3372 | - test->fh = utouch_frame_new_engine(100, 32, 100); |
3373 | - if (!test->fh) |
3374 | - return -1; |
3375 | - return utouch_frame_init_xi2(test->fh, test->display, test->dev); |
3376 | -} |
3377 | - |
3378 | -static void destroy_all(struct frame_test *test) |
3379 | -{ |
3380 | - utouch_frame_delete_engine(test->fh); |
3381 | - XIFreeDeviceInfo(test->info); |
3382 | - XDestroyWindow(test->display, test->win); |
3383 | - XCloseDisplay(test->display); |
3384 | - memset(test, 0, sizeof(*test)); |
3385 | -} |
3386 | - |
3387 | -static void handle_event(struct frame_test *test, XEvent *ev) |
3388 | -{ |
3389 | - XGenericEventCookie *gev = &ev->xcookie; |
3390 | - const struct utouch_frame *frame; |
3391 | - XConfigureEvent *cev; |
3392 | - XIDeviceEvent *dev; |
3393 | - |
3394 | - switch(ev->type) { |
3395 | - case ConfigureNotify: |
3396 | - cev = (XConfigureEvent *)ev; |
3397 | - if (cev->window == XDefaultRootWindow(cev->display)) |
3398 | - utouch_frame_configure_xi2(test->fh, cev); |
3399 | - break; |
3400 | - case GenericEvent: |
3401 | - if (!XGetEventData(test->display, gev)) |
3402 | - break; |
3403 | - dev = gev->data; |
3404 | - /* null for some requests, quite odd */ |
3405 | - dev->display = ev->xany.display; |
3406 | - if (gev->type == GenericEvent && gev->extension == opcode) { |
3407 | - frame = utouch_frame_pump_xi2(test->fh, dev); |
3408 | - if (frame) |
3409 | - report_frame(frame); |
3410 | - } |
3411 | - XFreeEventData(test->display, gev); |
3412 | - break; |
3413 | - } |
3414 | -} |
3415 | - |
3416 | -static void loop_device(struct frame_test *test) |
3417 | -{ |
3418 | - XIEventMask mask; |
3419 | - |
3420 | - mask.deviceid = XIAllDevices; |
3421 | - mask.mask_len = XIMaskLen(XI_LASTEVENT); |
3422 | - mask.mask = calloc(mask.mask_len, sizeof(char)); |
3423 | - |
3424 | - XISetMask(mask.mask, XI_TouchBegin); |
3425 | - XISetMask(mask.mask, XI_TouchUpdate); |
3426 | - XISetMask(mask.mask, XI_TouchEnd); |
3427 | - XISetMask(mask.mask, XI_PropertyEvent); |
3428 | - XISelectEvents(test->display, test->win, &mask, 1); |
3429 | - |
3430 | - XSelectInput(test->display, test->root, StructureNotifyMask); |
3431 | - |
3432 | - while (1) { |
3433 | - XEvent ev; |
3434 | - XNextEvent(test->display, &ev); |
3435 | - handle_event(test, &ev); |
3436 | - } |
3437 | -} |
3438 | - |
3439 | -int main(int argc, char *argv[]) |
3440 | -{ |
3441 | - struct frame_test test; |
3442 | - int id; |
3443 | - |
3444 | - if (argc < 2) { |
3445 | - fprintf(stderr, "Usage: %s <xinput_device_number>\n", argv[0]); |
3446 | - return -1; |
3447 | - } |
3448 | - id = atoi(argv[1]); |
3449 | - |
3450 | - if (init_xi2(&test, id)) { |
3451 | - fprintf(stderr, "error: could not describe device\n"); |
3452 | - return -1; |
3453 | - } |
3454 | - if (!utouch_frame_is_supported_xi2(test.display, test.dev)) { |
3455 | - fprintf(stderr, "error: unsupported device\n"); |
3456 | - return -1; |
3457 | - } |
3458 | - if (init_frame(&test)) { |
3459 | - fprintf(stderr, "error: could not init frame\n"); |
3460 | - return -1; |
3461 | - } |
3462 | - |
3463 | - report_device_caps(test.fh); |
3464 | - |
3465 | - loop_device(&test); |
3466 | - |
3467 | - destroy_all(&test); |
3468 | - return 0; |
3469 | -} |
3470 | |
3471 | === removed file 'tools/utouch-frame-test-xi2.txt' |
3472 | --- tools/utouch-frame-test-xi2.txt 2011-02-15 14:01:51 +0000 |
3473 | +++ tools/utouch-frame-test-xi2.txt 1970-01-01 00:00:00 +0000 |
3474 | @@ -1,22 +0,0 @@ |
3475 | -UTOUCH-FRAME-TEST-XI2(1) |
3476 | -========================== |
3477 | - |
3478 | -NAME |
3479 | ----- |
3480 | - |
3481 | - utouch-frame-test-xi2 - report frame events from an xinput device |
3482 | - |
3483 | -SYNOPSIS |
3484 | --------- |
3485 | - |
3486 | - utouch-frame-test-xi2 xinput-device-number |
3487 | - |
3488 | -DESCRIPTION |
3489 | ------------ |
3490 | - |
3491 | -A test tool used to analyse the capabilities and act as a test driver for the |
3492 | -uTouch touch frame library. |
3493 | - |
3494 | -AUTHOR |
3495 | ------- |
3496 | -utouch-frame-test-xi2 was written by Henrik Rydberg <rydberg@euromail.se> |
3497 | |
3498 | === removed file 'utouch-frame.pc.in' |
3499 | --- utouch-frame.pc.in 2011-07-08 00:38:12 +0000 |
3500 | +++ utouch-frame.pc.in 1970-01-01 00:00:00 +0000 |
3501 | @@ -1,10 +0,0 @@ |
3502 | -prefix=@prefix@ |
3503 | -exec_prefix=@exec_prefix@ |
3504 | -libdir=@libdir@ |
3505 | -includedir=@includedir@ |
3506 | - |
3507 | -Name: utouch-frame |
3508 | -Description: Touch Frame Library |
3509 | -Version: @PACKAGE_VERSION@ |
3510 | -Cflags: -I${includedir} |
3511 | -Libs: -L${libdir} -lutouch-frame |
Looks ok and builds fine.