Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: native_client_sdk/src/examples/api/input_event/custom_events.h

Issue 14607005: [NaCl SDK] Cleanup examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CUSTOM_EVENTS_H 5 #ifndef CUSTOM_EVENTS_H
6 #define CUSTOM_EVENTS_H 6 #define CUSTOM_EVENTS_H
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 namespace event_queue {
13
14 // These functions and classes are used to define a non-Pepper set of 12 // These functions and classes are used to define a non-Pepper set of
15 // events. This is typical of what many developers might do, since it 13 // events. This is typical of what many developers might do, since it
16 // would be common to convert a Pepper event into some other more 14 // would be common to convert a Pepper event into some other more
17 // application-specific type of event (SDL, Qt, etc.). 15 // application-specific type of event (SDL, Qt, etc.).
18 16
19 // Constants used for Event::event_modifers_ (which is an int) 17 // Constants used for Event::event_modifers_ (which is an int)
20 // are given below. Use powers of 2 so we can use bitwise AND/OR operators. 18 // are given below. Use powers of 2 so we can use bitwise AND/OR operators.
21 const uint32_t kShiftKeyModifier = 1 << 0; 19 const uint32_t kShiftKeyModifier = 1 << 0;
22 const uint32_t kControlKeyModifier = 1 << 1; 20 const uint32_t kControlKeyModifier = 1 << 1;
23 const uint32_t kAltKeyModifier = 1 << 2; 21 const uint32_t kAltKeyModifier = 1 << 2;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 float radii_y; 178 float radii_y;
181 float angle; 179 float angle;
182 float pressure; 180 float pressure;
183 }; 181 };
184 182
185 Kind kind_; 183 Kind kind_;
186 std::vector<Touch> touches; 184 std::vector<Touch> touches;
187 double timestamp_; 185 double timestamp_;
188 }; 186 };
189 187
190 } // end namespace
191
192 #endif // CUSTOM_EVENTS_H 188 #endif // CUSTOM_EVENTS_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698