Merge lp:~mir-team/mir/port-examples-off-mir-event-access into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Cemil Azizoglu on 2015-01-05 |
| Approved revision: | 2124 |
| Merged at revision: | 2192 |
| Proposed branch: | lp:~mir-team/mir/port-examples-off-mir-event-access |
| Merge into: | lp:mir |
| Diff against target: |
357 lines (+158/-82) 9 files modified
client-ABI-sha1sums (+1/-1) common-ABI-sha1sums (+1/-1) examples/demo_client_display_config.c (+42/-32) examples/eglapp.c (+44/-16) examples/server_example_input_event_filter.cpp (+12/-5) examples/server_example_input_filter.cpp (+51/-25) include/common/mir_toolkit/events/event.h (+5/-0) platform-ABI-sha1sums (+1/-1) server-ABI-sha1sums (+1/-1) |
| To merge this branch: | bzr merge lp:~mir-team/mir/port-examples-off-mir-event-access |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | 2014-12-19 | Approve on 2015-01-05 |
| Alan Griffiths | 2014-12-19 | Abstain on 2015-01-05 | |
| Daniel van Vugt | Abstain on 2014-12-29 | ||
| Alberto Aguirre | Approve on 2014-12-19 | ||
| Kevin DuBois (community) | Approve on 2014-12-19 | ||
|
Review via email:
|
|||
This proposal supersedes a proposal from 2014-12-19.
Commit Message
Port examples to new event access API.
Description of the Change
Port examples to new event access API. I also updated events.h to include the particular event types...having each client include resize event, input event, etc is frustrating especially considering any realistic client will want them all.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2113
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2114
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2115
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2116
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2117
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Alan Griffiths (alan-griffiths) wrote : | # |
222 - else if (ev->surface.value == mir_surface_
223 - printf("Surface occluded\n");
vs
179 + case mir_surface_
180 + printf("Surface exposed\n");
I think "Surface exposed" is misleading for a mir_surface_
| Robert Carr (robertcarr) wrote : | # |
Whoops! Fixed.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2119
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2120
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Alan Griffiths (alan-griffiths) wrote : | # |
Looks as though lp:~mir-team/mir/add-more-event-getters should be a prerequisite as we're seeing those diffs here.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2120
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Kevin DuBois (kdub) wrote : | # |
I'm not quite sure what the goals of MirEvent2.0 are, but looks okay to me. The logic in line 205 seems more wordy with MirEvent2.0 than with 1.0...
| Robert Carr (robertcarr) wrote : | # |
Hey kevin, thanks.
The long term goals are a pretty big redesign of the event semantics. This includes, differentation of pointer/touch events, event synthesis, cleaned up touch model, input methods, etc...
I felt like the only way we were going to get there is if we can quickly iterate MirEvent without breaking Client ABI. The verbosity is unfortunate but the cost isn't really so high. I'd be interested in adding some C++ API to cut down on the verbosity as some of our main clients (though not all) are C++.
| Alberto Aguirre (albaguirre) wrote : | # |
opaquifying leads to wordiness but much better to easier to support a stable ABI.
| Alberto Aguirre (albaguirre) wrote : | # |
Heh I don't know how to write....
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2122
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
- 2123. By Robert Carr <racarr@ocelot> on 2014-12-24
-
Merge trunk
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2123
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel van Vugt (vanvugt) wrote : | # |
I think we've now got an API that is unacceptably complex to use. First notice this proposal introduces twice the amount of code that it replaces. Second notice specific instances of using the new API:
205 - if (event.type == mir_event_type_key &&
206 - event.key.action == mir_key_action_down &&
207 - (event.
208 - (event.
209 - event.key.scan_code == KEY_BACKSPACE)
210 + if (mir_event_
211 + return false;
212 + MirInputEvent const* input_event = mir_event_
213 + if (mir_input_
214 + return false;
215 + MirKeyInputEvent const* kev = mir_input_
216 + if (mir_key_
217 + return false;
218 + MirInputEventMo
219 + if (!(mods & mir_input_
220 + return false;
221 + if (mir_key_
I am not a fan. But I know it's too late to disapprove again.
| Robert Carr (robertcarr) wrote : | # |
Hi Daniel. Nice to hear from you...inbox was so quiet! This is a good example you point out, where its not just find replace accessors->function name...
I had an idea for an API improvement classes of convenience functions e.g.
MirKeyEvent* mir_is_
Should help a little...
Ill whip something up tomorrow.
| Alan Griffiths (alan-griffiths) wrote : | # |
Yes, some event matcher functions could help. But I'm not not sure what the right design is for those...
MirKeyEvent* mir_matches_
...is perhaps a little too specific.
- 2124. By Robert Carr on 2015-01-05
-
Merge trunk
| Robert Carr (robertcarr) wrote : | # |
I thought about the mir_is_key_event accessor...but that doesnt help
it just changes
if (type != foo)
return;
mir_event_
to
ev = mir_event_
if (!ev)
return
I think deeper accessors, e.g. mir_matches_
Test code uses the gmock matchers.
Realistic clients (toolkits or apps with a platform abstraction layer) translate MirEvent to something else and thus are interested in accessing every field, not matching it.
I think the cost is not that high to pay.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2124
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://

FAILED: Continuous integration, rev:2111 jenkins. qa.ubuntu. com/job/ mir-ci/ 2368/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/477 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/477/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/451/ console jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 365/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 451/console
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/2368/ rebuild
http://