summaryrefslogtreecommitdiffstats
path: root/ui/events/android/key_event_utils.h
blob: 83445d1cd2746597eb3711f2d98836d2da610542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_
#define UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_

#include <jni.h>

#include "base/android/scoped_java_ref.h"
#include "ui/events/events_export.h"

namespace ui {
namespace events {
namespace android {

bool RegisterKeyEvent(JNIEnv* env);

EVENTS_EXPORT base::android::ScopedJavaLocalRef<jobject>
CreateKeyEvent(JNIEnv* env, int action, int key_code);

EVENTS_EXPORT int GetKeyEventUnicodeChar(
    JNIEnv* env,
    const base::android::JavaRef<jobject>& event,
    int meta_state);

}  // namespace android
}  // namespace events
}  // namespace ui

#endif  // UI_EVENTS_ANDROID_KEY_EVENT_UTISL_H_