Merge lp:~dandrader/frame/lp1080819 into lp:frame
- lp1080819
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 103 |
Proposed branch: | lp:~dandrader/frame/lp1080819 |
Merge into: | lp:frame |
Diff against target: |
399 lines (+139/-30) 12 files modified
.bzrignore (+1/-0) Makefile.am (+10/-1) configure.ac (+61/-2) frame-x11.pc.in (+9/-0) include/oif/frame.h.in (+4/-0) src/Makefile.am (+10/-2) src/value.h (+0/-2) test/Makefile.am (+11/-2) test/regular/Makefile.am (+17/-5) test/regular/accept-ended-touch.cpp (+2/-2) test/regular/frame-x11-fixture.cpp (+10/-10) test/regular/frame-x11-fixture.h (+4/-4) |
To merge this branch: | bzr merge lp:~dandrader/frame/lp1080819 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb (community) | Approve | ||
Review via email: mp+135162@code.launchpad.net |
Commit message
Description of the change
Fixes bug 1080819.
- 104. By Daniel d'Andrada
-
Add frame-x11.pc
So that configure scripts can know if the installed frame has X11 support.
- 105. By Daniel d'Andrada
-
Remove stray #include
- 106. By Daniel d'Andrada
-
Improve implementation of the pretty summary of the configure script
- Do not use device-specific terminal commands directly
- Use AC_MSG_NOTICE instead of echo to ensure the messages go to the right places
and obey configure options such as --quiet - 107. By Daniel d'Andrada
-
No need to configure libframe.ver
Fixed according to review comments from Stephen Webb:
"It is not an error to mention a symbol name in a GNU linker version script and
that symbol is not present. That means there is no need to run the preprocessor
on the version script. A single version script should suffice regardless of
package build options selected."
Daniel d'Andrada (dandrader) wrote : | # |
Updated according to comments.
Stephen M. Webb (bregma) wrote : | # |
include/
Other than that warning, this looks good.
Daniel d'Andrada (dandrader) wrote : | # |
That's odd, I've run "./configure --disable-x11" followed by "make dist" and the generated tarball did include frame_x11.h
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2012-08-31 19:39:22 +0000 | |||
3 | +++ .bzrignore 2012-11-26 20:02:21 +0000 | |||
4 | @@ -19,6 +19,7 @@ | |||
5 | 19 | coveragereport | 19 | coveragereport |
6 | 20 | doc/api | 20 | doc/api |
7 | 21 | libtool | 21 | libtool |
8 | 22 | include/oif/frame.h | ||
9 | 22 | m4/libtool.m4 | 23 | m4/libtool.m4 |
10 | 23 | m4/ltoptions.m4 | 24 | m4/ltoptions.m4 |
11 | 24 | m4/ltsugar.m4 | 25 | m4/ltsugar.m4 |
12 | 25 | 26 | ||
13 | === modified file 'Makefile.am' | |||
14 | --- Makefile.am 2012-07-25 22:43:17 +0000 | |||
15 | +++ Makefile.am 2012-11-26 20:02:21 +0000 | |||
16 | @@ -1,4 +1,9 @@ | |||
18 | 1 | SUBDIRS = doc src tools test | 1 | SUBDIRS = doc src test |
19 | 2 | |||
20 | 3 | # tools are all X11 based | ||
21 | 4 | if HAVE_XINPUT | ||
22 | 5 | SUBDIRS += tools | ||
23 | 6 | endif | ||
24 | 2 | 7 | ||
25 | 3 | ACLOCAL_AMFLAGS = -I m4 --install | 8 | ACLOCAL_AMFLAGS = -I m4 --install |
26 | 4 | 9 | ||
27 | @@ -9,6 +14,10 @@ | |||
28 | 9 | pkgconfigdir = $(libdir)/pkgconfig | 14 | pkgconfigdir = $(libdir)/pkgconfig |
29 | 10 | pkgconfig_DATA = frame.pc | 15 | pkgconfig_DATA = frame.pc |
30 | 11 | 16 | ||
31 | 17 | if HAVE_XINPUT | ||
32 | 18 | pkgconfig_DATA += frame-x11.pc | ||
33 | 19 | endif | ||
34 | 20 | |||
35 | 12 | if HAVE_GCOV | 21 | if HAVE_GCOV |
36 | 13 | .PHONY: clean-gcda | 22 | .PHONY: clean-gcda |
37 | 14 | clean-gcda: | 23 | clean-gcda: |
38 | 15 | 24 | ||
39 | === modified file 'configure.ac' | |||
40 | --- configure.ac 2012-11-08 15:55:43 +0000 | |||
41 | +++ configure.ac 2012-11-26 20:02:21 +0000 | |||
42 | @@ -25,7 +25,48 @@ | |||
43 | 25 | AC_PROG_CXX | 25 | AC_PROG_CXX |
44 | 26 | AC_PROG_INSTALL | 26 | AC_PROG_INSTALL |
45 | 27 | 27 | ||
47 | 28 | PKG_CHECK_MODULES(XINPUT, x11 xext xorg-server [xi >= 1.5.99.1] [inputproto >= 2.1.99.6]) | 28 | |
48 | 29 | # *** Enable/disable the X11 backend *** | ||
49 | 30 | AC_ARG_ENABLE(x11, | ||
50 | 31 | AC_HELP_STRING(--disable-x11, Do not build the X11 backend. (default: enable if available)), | ||
51 | 32 | [], | ||
52 | 33 | [enable_x11=auto]) | ||
53 | 34 | |||
54 | 35 | |||
55 | 36 | # Check for X11 as an optional dependency | ||
56 | 37 | AS_IF([test "x$enable_x11" = "xauto"], | ||
57 | 38 | [ | ||
58 | 39 | PKG_CHECK_MODULES(XINPUT, | ||
59 | 40 | x11 xext xorg-server [xi >= 1.5.99.1] [inputproto >= 2.1.99.6], | ||
60 | 41 | [have_xinput=yes], | ||
61 | 42 | [have_xinput=no]) | ||
62 | 43 | ]) | ||
63 | 44 | |||
64 | 45 | AS_IF([test "x$enable_x11" = "xyes"], | ||
65 | 46 | [ | ||
66 | 47 | PKG_CHECK_MODULES(XINPUT, | ||
67 | 48 | x11 xext xorg-server [xi >= 1.5.99.1] [inputproto >= 2.1.99.6], | ||
68 | 49 | [have_xinput=yes], | ||
69 | 50 | [ | ||
70 | 51 | AC_MSG_ERROR([x11 and/or XInput libraries not found!]) | ||
71 | 52 | have_xinput=no | ||
72 | 53 | ]) | ||
73 | 54 | ]) | ||
74 | 55 | |||
75 | 56 | AS_IF([test "x$enable_x11" = "xno"], | ||
76 | 57 | [have_xinput=no]) | ||
77 | 58 | |||
78 | 59 | AS_IF([test "x$have_xinput" = "xyes"], | ||
79 | 60 | [ | ||
80 | 61 | FRAME_X11_BACKEND="FRAME_X11_BACKEND" | ||
81 | 62 | AM_CONDITIONAL(HAVE_XINPUT, true) | ||
82 | 63 | ], | ||
83 | 64 | [ | ||
84 | 65 | FRAME_X11_BACKEND="FRAME_NO_X11_BACKEND" | ||
85 | 66 | AM_CONDITIONAL(HAVE_XINPUT, false) | ||
86 | 67 | ]) | ||
87 | 68 | AC_SUBST(FRAME_X11_BACKEND) | ||
88 | 69 | AC_SUBST(HAVE_XINPUT) | ||
89 | 29 | 70 | ||
90 | 30 | AC_CHECK_PROG([ASCIIDOC], [a2x], [a2x]) | 71 | AC_CHECK_PROG([ASCIIDOC], [a2x], [a2x]) |
91 | 31 | AM_CONDITIONAL([HAVE_DOCTOOLS], [test "x$ASCIIDOC" != "x"]) | 72 | AM_CONDITIONAL([HAVE_DOCTOOLS], [test "x$ASCIIDOC" != "x"]) |
92 | @@ -47,7 +88,8 @@ | |||
93 | 47 | AS_IF([test "x$enable_integration_tests" != xno], | 88 | AS_IF([test "x$enable_integration_tests" != xno], |
94 | 48 | [CHECK_XORG_GTEST( | 89 | [CHECK_XORG_GTEST( |
95 | 49 | [AC_MSG_NOTICE([xorg-gtest is available, integration tests will be built])], | 90 | [AC_MSG_NOTICE([xorg-gtest is available, integration tests will be built])], |
97 | 50 | [AC_MSG_WARN([xorg-gtest is not available, tests will not be built])])]) | 91 | [AC_MSG_WARN([xorg-gtest is not available, tests will not be built])])], |
98 | 92 | [have_xorg_gtest=no]) | ||
99 | 51 | 93 | ||
100 | 52 | AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], [test "x$have_xorg_gtest" = xyes]) | 94 | AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], [test "x$have_xorg_gtest" = xyes]) |
101 | 53 | 95 | ||
102 | @@ -65,6 +107,7 @@ | |||
103 | 65 | 107 | ||
104 | 66 | AC_CONFIG_FILES([Makefile | 108 | AC_CONFIG_FILES([Makefile |
105 | 67 | doc/Makefile | 109 | doc/Makefile |
106 | 110 | include/oif/frame.h | ||
107 | 68 | src/Makefile | 111 | src/Makefile |
108 | 69 | test/Makefile | 112 | test/Makefile |
109 | 70 | test/gtest/Makefile | 113 | test/gtest/Makefile |
110 | @@ -74,6 +117,9 @@ | |||
111 | 74 | tools/Makefile | 117 | tools/Makefile |
112 | 75 | frame.pc]) | 118 | frame.pc]) |
113 | 76 | 119 | ||
114 | 120 | AS_IF([test "x$have_xinput" = "xyes"], | ||
115 | 121 | [AC_CONFIG_FILES([frame-x11.pc])]) | ||
116 | 122 | |||
117 | 77 | AC_LANG_PUSH(C++) | 123 | AC_LANG_PUSH(C++) |
118 | 78 | AC_CHECK_DECL(__clang__, CXX_LIBS="-lstdc++") | 124 | AC_CHECK_DECL(__clang__, CXX_LIBS="-lstdc++") |
119 | 79 | AC_SUBST(CXX_LIBS) | 125 | AC_SUBST(CXX_LIBS) |
120 | @@ -86,3 +132,16 @@ | |||
121 | 86 | AC_SUBST(VISIBILITY_CXXFLAGS, "-fvisibility=hidden") | 132 | AC_SUBST(VISIBILITY_CXXFLAGS, "-fvisibility=hidden") |
122 | 87 | 133 | ||
123 | 88 | AC_OUTPUT | 134 | AC_OUTPUT |
124 | 135 | |||
125 | 136 | bold_green=$(tput bold)$(tput setf 2) | ||
126 | 137 | bold_white=$(tput bold)$(tput setf 7) | ||
127 | 138 | reset=$(tput sgr0) | ||
128 | 139 | |||
129 | 140 | AC_MSG_NOTICE([]) | ||
130 | 141 | AC_MSG_NOTICE([${bold_green}Open Input Framework - Frame library - $VERSION${reset}]) | ||
131 | 142 | AC_MSG_NOTICE([]) | ||
132 | 143 | AC_MSG_NOTICE([ Prefix : ${bold_white}${prefix}${reset}]) | ||
133 | 144 | AC_MSG_NOTICE([ CFLAGS : ${bold_white}${CFLAGS} ${GCC_FLAGS}${reset}]) | ||
134 | 145 | AC_MSG_NOTICE([ Build X11 backend : ${bold_white}${have_xinput}${reset}]) | ||
135 | 146 | AC_MSG_NOTICE([ Build integration tests : ${bold_white}${have_xorg_gtest}${reset}]) | ||
136 | 147 | AC_MSG_NOTICE([]) | ||
137 | 89 | 148 | ||
138 | === added file 'frame-x11.pc.in' | |||
139 | --- frame-x11.pc.in 1970-01-01 00:00:00 +0000 | |||
140 | +++ frame-x11.pc.in 2012-11-26 20:02:21 +0000 | |||
141 | @@ -0,0 +1,9 @@ | |||
142 | 1 | prefix=@prefix@ | ||
143 | 2 | exec_prefix=@exec_prefix@ | ||
144 | 3 | libdir=@libdir@ | ||
145 | 4 | includedir=@includedir@ | ||
146 | 5 | |||
147 | 6 | Name: frame-x11 | ||
148 | 7 | Description: Touch Frame Library - X11 support | ||
149 | 8 | Version: @PACKAGE_VERSION@ | ||
150 | 9 | Requires: frame = @PACKAGE_VERSION@ | ||
151 | 0 | 10 | ||
152 | === renamed file 'include/oif/frame.h' => 'include/oif/frame.h.in' | |||
153 | --- include/oif/frame.h 2012-08-31 17:04:43 +0000 | |||
154 | +++ include/oif/frame.h.in 2012-11-26 20:02:21 +0000 | |||
155 | @@ -52,6 +52,10 @@ | |||
156 | 52 | #endif // __has_feature | 52 | #endif // __has_feature |
157 | 53 | #endif // __has_feature(c_generic_selections) | 53 | #endif // __has_feature(c_generic_selections) |
158 | 54 | 54 | ||
159 | 55 | /* Whether the X11 backend (frame_x11.h) is available. | ||
160 | 56 | FRAME_X11_BACKEND will be defined if it is and FRAME_NO_X11_BACKEND otherwise. */ | ||
161 | 57 | #define @FRAME_X11_BACKEND@ | ||
162 | 58 | |||
163 | 55 | #ifdef __cplusplus | 59 | #ifdef __cplusplus |
164 | 56 | extern "C" { | 60 | extern "C" { |
165 | 57 | #endif | 61 | #endif |
166 | 58 | 62 | ||
167 | === modified file 'src/Makefile.am' | |||
168 | --- src/Makefile.am 2012-11-08 11:21:24 +0000 | |||
169 | +++ src/Makefile.am 2012-11-26 20:02:21 +0000 | |||
170 | @@ -31,8 +31,12 @@ | |||
171 | 31 | libframeinclude_HEADERS = \ | 31 | libframeinclude_HEADERS = \ |
172 | 32 | $(top_srcdir)/include/oif/frame.h \ | 32 | $(top_srcdir)/include/oif/frame.h \ |
173 | 33 | $(top_srcdir)/include/oif/frame_backend.h \ | 33 | $(top_srcdir)/include/oif/frame_backend.h \ |
175 | 34 | $(top_srcdir)/include/oif/frame_internal.h \ | 34 | $(top_srcdir)/include/oif/frame_internal.h |
176 | 35 | |||
177 | 36 | if HAVE_XINPUT | ||
178 | 37 | libframeinclude_HEADERS += \ | ||
179 | 35 | $(top_srcdir)/include/oif/frame_x11.h | 38 | $(top_srcdir)/include/oif/frame_x11.h |
180 | 39 | endif | ||
181 | 36 | 40 | ||
182 | 37 | libframe_la_SOURCES = \ | 41 | libframe_la_SOURCES = \ |
183 | 38 | axis.h \ | 42 | axis.h \ |
184 | @@ -52,7 +56,10 @@ | |||
185 | 52 | value.h \ | 56 | value.h \ |
186 | 53 | value.cpp \ | 57 | value.cpp \ |
187 | 54 | window.h \ | 58 | window.h \ |
189 | 55 | window.cpp \ | 59 | window.cpp |
190 | 60 | |||
191 | 61 | if HAVE_XINPUT | ||
192 | 62 | libframe_la_SOURCES += \ | ||
193 | 56 | x11/device_x11.h \ | 63 | x11/device_x11.h \ |
194 | 57 | x11/device_x11.cpp \ | 64 | x11/device_x11.cpp \ |
195 | 58 | x11/frame_x11.cpp \ | 65 | x11/frame_x11.cpp \ |
196 | @@ -60,5 +67,6 @@ | |||
197 | 60 | x11/handle_x11.cpp \ | 67 | x11/handle_x11.cpp \ |
198 | 61 | x11/window_x11.h \ | 68 | x11/window_x11.h \ |
199 | 62 | x11/window_x11.cpp | 69 | x11/window_x11.cpp |
200 | 70 | endif | ||
201 | 63 | 71 | ||
202 | 64 | EXTRA_DIST = $(version_script) | 72 | EXTRA_DIST = $(version_script) |
203 | 65 | 73 | ||
204 | === modified file 'src/value.h' | |||
205 | --- src/value.h 2012-06-21 19:41:40 +0000 | |||
206 | +++ src/value.h 2012-11-26 20:02:21 +0000 | |||
207 | @@ -25,8 +25,6 @@ | |||
208 | 25 | 25 | ||
209 | 26 | #include <memory> | 26 | #include <memory> |
210 | 27 | 27 | ||
211 | 28 | #include <X11/X.h> | ||
212 | 29 | |||
213 | 30 | #include "oif/frame.h" | 28 | #include "oif/frame.h" |
214 | 31 | #include "typedefs.h" | 29 | #include "typedefs.h" |
215 | 32 | 30 | ||
216 | 33 | 31 | ||
217 | === modified file 'test/Makefile.am' | |||
218 | --- test/Makefile.am 2012-07-17 13:57:32 +0000 | |||
219 | +++ test/Makefile.am 2012-11-26 20:02:21 +0000 | |||
220 | @@ -1,5 +1,14 @@ | |||
223 | 1 | SUBDIRS = gtest x11_mocks regular | 1 | SUBDIRS = gtest |
224 | 2 | 2 | ||
225 | 3 | if HAVE_XINPUT | ||
226 | 4 | SUBDIRS += x11_mocks | ||
227 | 5 | endif | ||
228 | 6 | |||
229 | 7 | SUBDIRS += regular | ||
230 | 8 | |||
231 | 9 | # integration tests are all X11 based | ||
232 | 10 | if HAVE_XINPUT | ||
233 | 3 | if ENABLE_INTEGRATION_TESTS | 11 | if ENABLE_INTEGRATION_TESTS |
234 | 4 | SUBDIRS += integration | 12 | SUBDIRS += integration |
235 | 5 | endif | 13 | endif |
236 | 14 | endif | ||
237 | 6 | 15 | ||
238 | === modified file 'test/regular/Makefile.am' | |||
239 | --- test/regular/Makefile.am 2012-08-24 16:30:05 +0000 | |||
240 | +++ test/regular/Makefile.am 2012-11-26 20:02:21 +0000 | |||
241 | @@ -1,4 +1,8 @@ | |||
243 | 1 | test_targets = check-c-compile check-cxx-compile | 1 | test_targets = |
244 | 2 | |||
245 | 3 | if HAVE_XINPUT | ||
246 | 4 | test_targets += check-c-compile check-cxx-compile | ||
247 | 5 | endif | ||
248 | 2 | 6 | ||
249 | 3 | if HAVE_GTEST | 7 | if HAVE_GTEST |
250 | 4 | test_targets += check-regular | 8 | test_targets += check-regular |
251 | @@ -37,10 +41,14 @@ | |||
252 | 37 | ### check-regular | 41 | ### check-regular |
253 | 38 | 42 | ||
254 | 39 | check_regular_SOURCES = \ | 43 | check_regular_SOURCES = \ |
255 | 44 | backend.cpp | ||
256 | 45 | |||
257 | 46 | if HAVE_XINPUT | ||
258 | 47 | check_regular_SOURCES += \ | ||
259 | 40 | accept-ended-touch.cpp \ | 48 | accept-ended-touch.cpp \ |
263 | 41 | backend.cpp \ | 49 | frame-x11-fixture.cpp \ |
264 | 42 | frame-fixture.cpp \ | 50 | frame-x11-fixture.h |
265 | 43 | frame-fixture.h | 51 | endif |
266 | 44 | 52 | ||
267 | 45 | # | 53 | # |
268 | 46 | # Link against the (non-distributed) static lib to pick up the | 54 | # Link against the (non-distributed) static lib to pick up the |
269 | @@ -50,10 +58,14 @@ | |||
270 | 50 | $(top_builddir)/src/.libs/libframe.a \ | 58 | $(top_builddir)/src/.libs/libframe.a \ |
271 | 51 | $(top_builddir)/test/gtest/libgtest.a \ | 59 | $(top_builddir)/test/gtest/libgtest.a \ |
272 | 52 | $(top_builddir)/test/gtest/libgtest_main.a \ | 60 | $(top_builddir)/test/gtest/libgtest_main.a \ |
273 | 53 | $(top_builddir)/test/x11_mocks/libx11_mocks.a \ | ||
274 | 54 | $(COVERAGE_LIBS) \ | 61 | $(COVERAGE_LIBS) \ |
275 | 55 | $(GTEST_LIBS) | 62 | $(GTEST_LIBS) |
276 | 56 | 63 | ||
277 | 64 | if HAVE_XINPUT | ||
278 | 65 | check_regular_LDADD += \ | ||
279 | 66 | $(top_builddir)/test/x11_mocks/libx11_mocks.a | ||
280 | 67 | endif | ||
281 | 68 | |||
282 | 57 | check_regular_CPPFLAGS = \ | 69 | check_regular_CPPFLAGS = \ |
283 | 58 | --std=c++0x \ | 70 | --std=c++0x \ |
284 | 59 | -I$(top_srcdir)/test/x11_mocks \ | 71 | -I$(top_srcdir)/test/x11_mocks \ |
285 | 60 | 72 | ||
286 | === modified file 'test/regular/accept-ended-touch.cpp' | |||
287 | --- test/regular/accept-ended-touch.cpp 2012-07-17 14:27:23 +0000 | |||
288 | +++ test/regular/accept-ended-touch.cpp 2012-11-26 20:02:21 +0000 | |||
289 | @@ -1,7 +1,7 @@ | |||
291 | 1 | #include "frame-fixture.h" | 1 | #include "frame-x11-fixture.h" |
292 | 2 | #include "x11_mocks.h" | 2 | #include "x11_mocks.h" |
293 | 3 | 3 | ||
295 | 4 | class AcceptEndedTouch : public FrameFixture | 4 | class AcceptEndedTouch : public FrameX11Fixture |
296 | 5 | { | 5 | { |
297 | 6 | }; | 6 | }; |
298 | 7 | 7 | ||
299 | 8 | 8 | ||
300 | === renamed file 'test/regular/frame-fixture.cpp' => 'test/regular/frame-x11-fixture.cpp' | |||
301 | --- test/regular/frame-fixture.cpp 2012-08-31 19:45:35 +0000 | |||
302 | +++ test/regular/frame-x11-fixture.cpp 2012-11-26 20:02:21 +0000 | |||
303 | @@ -1,23 +1,23 @@ | |||
305 | 1 | #include "frame-fixture.h" | 1 | #include "frame-x11-fixture.h" |
306 | 2 | #include "x11_mocks.h" | 2 | #include "x11_mocks.h" |
307 | 3 | 3 | ||
309 | 4 | FrameFixture::FrameFixture() | 4 | FrameX11Fixture::FrameX11Fixture() |
310 | 5 | : frame_handle(nullptr), | 5 | : frame_handle(nullptr), |
311 | 6 | _xevent_serial_number(1) | 6 | _xevent_serial_number(1) |
312 | 7 | { | 7 | { |
313 | 8 | } | 8 | } |
314 | 9 | 9 | ||
316 | 10 | void FrameFixture::SetUp() | 10 | void FrameX11Fixture::SetUp() |
317 | 11 | { | 11 | { |
318 | 12 | xmock_touch_acceptance.clear(); | 12 | xmock_touch_acceptance.clear(); |
319 | 13 | } | 13 | } |
320 | 14 | 14 | ||
322 | 15 | void FrameFixture::TearDown() | 15 | void FrameX11Fixture::TearDown() |
323 | 16 | { | 16 | { |
324 | 17 | ASSERT_EQ(nullptr, frame_handle); | 17 | ASSERT_EQ(nullptr, frame_handle); |
325 | 18 | } | 18 | } |
326 | 19 | 19 | ||
328 | 20 | void FrameFixture::CreateXMockTouchScreenDevice() | 20 | void FrameX11Fixture::CreateXMockTouchScreenDevice() |
329 | 21 | { | 21 | { |
330 | 22 | xmock_devices_count = 1; | 22 | xmock_devices_count = 1; |
331 | 23 | xmock_devices = (XIDeviceInfo*) calloc(xmock_devices_count, | 23 | xmock_devices = (XIDeviceInfo*) calloc(xmock_devices_count, |
332 | @@ -59,7 +59,7 @@ | |||
333 | 59 | xmock_devices[0].classes = classes; | 59 | xmock_devices[0].classes = classes; |
334 | 60 | } | 60 | } |
335 | 61 | 61 | ||
337 | 62 | void FrameFixture::DestroyXMockDevices() | 62 | void FrameX11Fixture::DestroyXMockDevices() |
338 | 63 | { | 63 | { |
339 | 64 | for (int i = 0; i < xmock_devices_count; ++i) | 64 | for (int i = 0; i < xmock_devices_count; ++i) |
340 | 65 | { | 65 | { |
341 | @@ -70,7 +70,7 @@ | |||
342 | 70 | free(xmock_devices); | 70 | free(xmock_devices); |
343 | 71 | } | 71 | } |
344 | 72 | 72 | ||
346 | 73 | void FrameFixture::SendTouchEvent( | 73 | void FrameX11Fixture::SendTouchEvent( |
347 | 74 | int event_type, int touch_id, float x, float y) | 74 | int event_type, int touch_id, float x, float y) |
348 | 75 | { | 75 | { |
349 | 76 | UFStatus status; | 76 | UFStatus status; |
350 | @@ -112,7 +112,7 @@ | |||
351 | 112 | free(device_event); | 112 | free(device_event); |
352 | 113 | } | 113 | } |
353 | 114 | 114 | ||
355 | 115 | void FrameFixture::SendTouchOwnershipEvent(int touch_id) | 115 | void FrameX11Fixture::SendTouchOwnershipEvent(int touch_id) |
356 | 116 | { | 116 | { |
357 | 117 | UFStatus status; | 117 | UFStatus status; |
358 | 118 | XGenericEventCookie xcookie; | 118 | XGenericEventCookie xcookie; |
359 | @@ -141,7 +141,7 @@ | |||
360 | 141 | free(ownership_event); | 141 | free(ownership_event); |
361 | 142 | } | 142 | } |
362 | 143 | 143 | ||
364 | 144 | void FrameFixture::FetchDeviceAddedEvent(UFDevice *device) | 144 | void FrameX11Fixture::FetchDeviceAddedEvent(UFDevice *device) |
365 | 145 | { | 145 | { |
366 | 146 | UFEvent event; | 146 | UFEvent event; |
367 | 147 | UFStatus status; | 147 | UFStatus status; |
368 | @@ -157,7 +157,7 @@ | |||
369 | 157 | frame_event_unref(event); | 157 | frame_event_unref(event); |
370 | 158 | } | 158 | } |
371 | 159 | 159 | ||
373 | 160 | void FrameFixture::AssertNoMoreEvents() | 160 | void FrameX11Fixture::AssertNoMoreEvents() |
374 | 161 | { | 161 | { |
375 | 162 | UFEvent event; | 162 | UFEvent event; |
376 | 163 | UFStatus status; | 163 | UFStatus status; |
377 | 164 | 164 | ||
378 | === renamed file 'test/regular/frame-fixture.h' => 'test/regular/frame-x11-fixture.h' | |||
379 | --- test/regular/frame-fixture.h 2012-07-24 20:47:15 +0000 | |||
380 | +++ test/regular/frame-x11-fixture.h 2012-11-26 20:02:21 +0000 | |||
381 | @@ -1,14 +1,14 @@ | |||
384 | 1 | #ifndef GTEST_FRAME_FIXTURE_H | 1 | #ifndef GTEST_FRAME_X11_FIXTURE_H |
385 | 2 | #define GTEST_FRAME_FIXTURE_H | 2 | #define GTEST_FRAME_X11_FIXTURE_H |
386 | 3 | 3 | ||
387 | 4 | #include <gtest/gtest.h> | 4 | #include <gtest/gtest.h> |
388 | 5 | #include "oif/frame.h" | 5 | #include "oif/frame.h" |
389 | 6 | #include "oif/frame_x11.h" | 6 | #include "oif/frame_x11.h" |
390 | 7 | 7 | ||
392 | 8 | class FrameFixture : public ::testing::Test | 8 | class FrameX11Fixture : public ::testing::Test |
393 | 9 | { | 9 | { |
394 | 10 | protected: | 10 | protected: |
396 | 11 | FrameFixture(); | 11 | FrameX11Fixture(); |
397 | 12 | 12 | ||
398 | 13 | virtual void SetUp(); | 13 | virtual void SetUp(); |
399 | 14 | virtual void TearDown(); | 14 | virtual void TearDown(); |
I approve of most of these changes in general, with the following exceptions.
(1) as far as I know, it is not an error to mention a symbol name in a GNU linker version script and that symbol is not present. That means there is no need to run the preprocessor on the version script; a single version script should suffice regardless of package build options selected. Less to go wrong.
(2) You should avoid embedding device-specific control in the diagnostic output of configure. The right way to get pretty colour into the diagnostic output is to use the tput program. For example,
bold_green=$(tput bold)$(tput setf 2)
bold_white=$(tput bold)$(tput setf 7)
reset=$(tput sgr0)
You should also use AC_MSG_NOTICE to send notices to the diagnostic output because (a) it send it to all the right places (echo only sends to stdout), and (2) the autoconf tool facilities react properly to command-line options like --quiet.