1 // Copyright 2020 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 "aemu/base/c_header.h" 18 19 #include <stdint.h> 20 #include <stdbool.h> 21 22 ANDROID_BEGIN_HEADER 23 24 typedef struct QAndroidMultiDisplayAgent { 25 bool (*notifyDisplayChanges)(); 26 int (*setMultiDisplay)(uint32_t id, 27 int32_t x, 28 int32_t y, 29 uint32_t w, 30 uint32_t h, 31 uint32_t dpi, 32 uint32_t flag, 33 bool add); 34 bool (*getMultiDisplay)(uint32_t id, 35 int32_t* x, 36 int32_t* y, 37 uint32_t* w, 38 uint32_t* h, 39 uint32_t* dpi, 40 uint32_t* flag, 41 bool* enable); 42 bool (*getNextMultiDisplay)(int32_t start_id, 43 uint32_t* id, 44 int32_t* x, 45 int32_t* y, 46 uint32_t* w, 47 uint32_t* h, 48 uint32_t* dpi, 49 uint32_t* flag, 50 uint32_t* cb); 51 bool (*isMultiDisplayEnabled)(void); 52 void (*getCombinedDisplaySize)(uint32_t* width, uint32_t* height); 53 bool (*multiDisplayParamValidate)(uint32_t id, uint32_t w, uint32_t h, 54 uint32_t dpi, uint32_t flag); 55 bool (*translateCoordination)(uint32_t* x, uint32_t*y, uint32_t* displayId); 56 void (*setGpuMode)(bool isGuestMode, uint32_t w, uint32_t h); 57 int (*createDisplay)(uint32_t* displayId); 58 int (*destroyDisplay)(uint32_t displayId); 59 int (*setDisplayPose)(uint32_t displayId, 60 int32_t x, 61 int32_t y, 62 uint32_t w, 63 uint32_t h, 64 uint32_t dpi); 65 int (*getDisplayPose)(uint32_t displayId, 66 int32_t* x, 67 int32_t* y, 68 uint32_t* w, 69 uint32_t* h); 70 int (*getDisplayColorBuffer)(uint32_t displayId, uint32_t* colorBuffer); 71 int (*getColorBufferDisplay)(uint32_t colorBuffer, uint32_t* displayId); 72 int (*setDisplayColorBuffer)(uint32_t displayId, uint32_t colorBuffer); 73 bool (*isMultiDisplayWindow)(); 74 void (*performRotation)(int rot); 75 bool (*isPixelFold)(); 76 } QAndroidMultiDisplayAgent; 77 78 79 ANDROID_END_HEADER 80