blob: 16df774c643e23bc8a7f9708db730d4a980d1aa2 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001#include <stdio.h>
2#include <ui/KeycodeLabels.h>
3
4int
5main(int argc, char** argv)
6{
7 // TODO: Add full copyright.
8 printf("// Copyright (C) 2008 The Android Open Source Project\n");
9 printf("//\n");
10 printf("// This file is generated by makekeycodes from the definitions.\n");
11 printf("// in includes/ui/KeycodeLabels.h.\n");
12 printf("//\n");
13 printf("// If you modify this, your changes will be overwritten.\n");
14 printf("\n");
15 printf("pacakge android.os;\n");
16 printf("\n");
17 printf("public class KeyEvent\n");
18 printf("{\n");
19
20 for (int i=0; KEYCODES[i].literal != NULL; i++) {
21 printf(" public static final int KEYCODE_%s = 0x%08x;\n",
22 KEYCODES[i].literal, KEYCODES[i].value);
23 }
24
25 printf("\n");
26 for (int i=0; FLAGS[i].literal != NULL; i++) {
27 printf(" public static final int MODIFIER_%s = 0x%08x;\n",
28 FLAGS[i].literal, FLAGS[i].value);
29 }
30
31 printf("}\n");
32 return 0;
33}