blob: 5abeab45414177be27bf7966b4f9b877037306a1 [file] [log] [blame]
Jeff Brown928e0542011-01-10 11:17:36 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Riddle Hsucd958bc2019-01-23 15:40:26 +080017#ifndef _ANDROID_VIEW_INPUT_APPLICATION_HANDLE_H
18#define _ANDROID_VIEW_INPUT_APPLICATION_HANDLE_H
Jeff Brown928e0542011-01-10 11:17:36 -080019
Robert Carre1db3202018-07-23 15:24:59 -070020#include <string>
21
22#include <input/InputApplication.h>
Jeff Brown928e0542011-01-10 11:17:36 -080023
Steven Moreland2279b252017-07-19 09:50:45 -070024#include <nativehelper/JNIHelp.h>
Jeff Brown928e0542011-01-10 11:17:36 -080025#include "jni.h"
26
27namespace android {
28
29class NativeInputApplicationHandle : public InputApplicationHandle {
30public:
Chih-Hung Hsieh6d09d542016-08-29 14:51:31 -070031 explicit NativeInputApplicationHandle(jweak objWeak);
Jeff Brown928e0542011-01-10 11:17:36 -080032 virtual ~NativeInputApplicationHandle();
33
34 jobject getInputApplicationHandleObjLocalRef(JNIEnv* env);
35
Jeff Browncc4f7db2011-08-30 20:34:48 -070036 virtual bool updateInfo();
Jeff Brown9302c872011-07-13 22:51:29 -070037
Jeff Brown928e0542011-01-10 11:17:36 -080038private:
39 jweak mObjWeak;
40};
41
42
Riddle Hsucd958bc2019-01-23 15:40:26 +080043extern sp<InputApplicationHandle> android_view_InputApplicationHandle_getHandle(
Jeff Brown928e0542011-01-10 11:17:36 -080044 JNIEnv* env, jobject inputApplicationHandleObj);
45
46} // namespace android
47
Riddle Hsucd958bc2019-01-23 15:40:26 +080048#endif // _ANDROID_VIEW_INPUT_APPLICATION_HANDLE_H