Merge lp://staging/~robertcarr/mir/more-event-pretty-printing into lp://staging/mir
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~robertcarr/mir/more-event-pretty-printing |
Merge into: | lp://staging/mir |
Diff against target: |
195 lines (+132/-16) 1 file modified
src/client/logging/input_receiver_report.cpp (+132/-16) |
To merge this branch: | bzr merge lp://staging/~robertcarr/mir/more-event-pretty-printing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Needs Fixing | ||
Alexandros Frantzis (community) | Needs Fixing | ||
Review via email: mp+194765@code.staging.launchpad.net |
Commit message
Add enumeration/flag printing to event pretty printer.
Description of the change
Add enumeration/flag printing to event pretty printer.
i.e.
===
MirMotionEvent{
type: motion
device_id: 1
source_id: 8194
action: mir_motion_
flags: mir_motion_
modifiers:
edge_flags: 0
button_state:
x_offset: 0
y_offset: 0
x_precision: 1
y_precision: 1
down_time: 0
event_time: 1384211437272475834
pointer_count: 1
pointer[0]{
id: 0
raw_x: 2
raw_y: 2
x: 2
y: 2
touch_minor: 0
size: 0
pressure: 0
orientation: 0
vscroll: 0
hscroll: 0
}
}
===
Unmerged revisions
- 1213. By Robert Carr
-
Restore closing } to serialized event
- 1212. By Robert Carr
-
Improve client input report
8 +static std::string format_ key_action( MirKeyAction action)
... and others
No need for static, we are defining these inside an anonymous namespace.
(I know that existing functions there are already static, but I'd rather we fixed them than pollute all the new functions).
23 + static std::tuple< MirKeyFlag, char const*> key_flag_strings[] = {
... and others
Could be const.
36 + for (unsigned int i = 0; i < sizeof( key_flag_ strings) /sizeof( *key_flag_ strings) ; i++) {
... and others
for (auto const& key_flag_string : key_flag_strings)
{
}