1 // Copyright (C) 2016 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #include "host-common/multi_display_agent.h" 18 #include "host-common/window_agent.h" 19 20 #ifdef _MSC_VER 21 # ifdef BUILDING_EMUGL_COMMON_SHARED 22 # define EMUGL_COMMON_API __declspec(dllexport) 23 # else 24 # define EMUGL_COMMON_API __declspec(dllimport) 25 #endif 26 #else 27 # define EMUGL_COMMON_API 28 #endif 29 30 // List of values used to identify a clockwise 90-degree rotation. 31 typedef enum { 32 SKIN_ROTATION_0, 33 SKIN_ROTATION_90, 34 SKIN_ROTATION_180, 35 SKIN_ROTATION_270 36 } SkinRotation; 37 38 #ifdef __cplusplus 39 namespace android { 40 41 namespace base { 42 43 class CpuUsage; 44 class MemoryTracker; 45 46 } // namespace base 47 } // namespace android 48 49 namespace emugl { 50 51 // Set and get API version of system image. 52 EMUGL_COMMON_API void setAvdInfo(bool isPhone, int apiLevel); 53 EMUGL_COMMON_API void getAvdInfo(bool* isPhone, int* apiLevel); 54 55 EMUGL_COMMON_API void setShouldSkipDraw(bool skip); 56 EMUGL_COMMON_API bool shouldSkipDraw(); 57 // CPU usage get/set. 58 EMUGL_COMMON_API void setCpuUsage(android::base::CpuUsage* usage); 59 EMUGL_COMMON_API android::base::CpuUsage* getCpuUsage(); 60 61 // Memory usage get/set 62 EMUGL_COMMON_API void setMemoryTracker(android::base::MemoryTracker* usage); 63 EMUGL_COMMON_API android::base::MemoryTracker* getMemoryTracker(); 64 65 // Window operation agent 66 EMUGL_COMMON_API void set_emugl_window_operations(const QAndroidEmulatorWindowAgent &voperations); 67 EMUGL_COMMON_API const QAndroidEmulatorWindowAgent &get_emugl_window_operations(); 68 69 // MultiDisplay operation agent 70 EMUGL_COMMON_API void set_emugl_multi_display_operations(const QAndroidMultiDisplayAgent &operations); 71 EMUGL_COMMON_API const QAndroidMultiDisplayAgent &get_emugl_multi_display_operations(); 72 73 } 74 #endif //__cplusplus 75