1 /* 2 * Copyright (C) 2018 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 17 #ifndef _NDK_CAMERA_WINDOW_TYPE_H 18 #define _NDK_CAMERA_WINDOW_TYPE_H 19 20 /** 21 * @addtogroup Camera 22 * @{ 23 */ 24 25 /** 26 * @file NdkCameraWindowType.h 27 */ 28 29 /* 30 * This file defines an NDK API. 31 * Do not remove methods. 32 * Do not change method signatures. 33 * Do not change the value of constants. 34 * Do not change the size of any of the classes defined in here. 35 * Do not reference types that are not part of the NDK. 36 * Do not #include files that aren't part of the NDK. 37 */ 38 39 /** 40 * This file defines the window type used by NDK and the VNDK variants of the 41 * camera2 NDK. This enables us to share the api definition headers and avoid 42 * code duplication (since the VNDK variant doesn't use ANativeWindow unlike the 43 * NDK variant). 44 */ 45 #ifdef __ANDROID_VNDK__ 46 #include <cutils/native_handle.h> 47 typedef native_handle_t ACameraWindowType; 48 #else 49 #include <android/native_window.h> 50 typedef ANativeWindow ACameraWindowType; 51 #endif 52 53 #endif //_NDK_CAMERA_WINDOW_TYPE_H 54