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

Side by Side Diff: platform_tools/android/apps/sample_app/src/main/jni/AndroidKeyToSkKey.h

Issue 2117793002: Try fix the mac build bot after removing Android SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Try fix the build bot Created 4 years, 5 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2011 Skia
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9 #ifndef _ANDROID_TO_SKIA_KEYCODES_H
10 #define _ANDROID_TO_SKIA_KEYCODES_H
11
12 #include "android/keycodes.h"
13 #include "SkKey.h"
14
15 // Convert an Android keycode to an SkKey. This is an incomplete list, only
16 // including keys used by the sample app.
17 SkKey AndroidKeycodeToSkKey(int keycode) {
18 switch (keycode) {
19 case AKEYCODE_DPAD_LEFT:
20 return kLeft_SkKey;
21 case AKEYCODE_DPAD_RIGHT:
22 return kRight_SkKey;
23 case AKEYCODE_DPAD_UP:
24 return kUp_SkKey;
25 case AKEYCODE_DPAD_DOWN:
26 return kDown_SkKey;
27 case AKEYCODE_BACK:
28 return kBack_SkKey;
29 default:
30 return kNONE_SkKey;
31 }
32 }
33
34 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698