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 <stdint.h> 18 19 typedef struct QAndroidMultiDisplayAgent { 20 int (*setMultiDisplay)(uint32_t id, 21 int32_t x, 22 int32_t y, 23 uint32_t w, 24 uint32_t h, 25 uint32_t dpi, 26 uint32_t flag, 27 bool add); 28 bool (*getMultiDisplay)(uint32_t id, 29 int32_t* x, 30 int32_t* y, 31 uint32_t* w, 32 uint32_t* h, 33 uint32_t* dpi, 34 uint32_t* flag, 35 bool* enable); 36 bool (*getNextMultiDisplay)(int32_t start_id, 37 uint32_t* id, 38 int32_t* x, 39 int32_t* y, 40 uint32_t* w, 41 uint32_t* h, 42 uint32_t* dpi, 43 uint32_t* flag, 44 uint32_t* cb); 45 bool (*isMultiDisplayEnabled)(void); 46 void (*getCombinedDisplaySize)(uint32_t* width, uint32_t* height); 47 bool (*multiDisplayParamValidate)(uint32_t id, uint32_t w, uint32_t h, 48 uint32_t dpi, uint32_t flag); 49 bool (*translateCoordination)(uint32_t* x, uint32_t*y, uint32_t* displayId); 50 void (*setGpuMode)(bool isGuestMode, uint32_t w, uint32_t h); 51 int (*createDisplay)(uint32_t* displayId); 52 int (*destroyDisplay)(uint32_t displayId); 53 int (*setDisplayPose)(uint32_t displayId, 54 int32_t x, 55 int32_t y, 56 uint32_t w, 57 uint32_t h, 58 uint32_t dpi); 59 int (*getDisplayPose)(uint32_t displayId, 60 int32_t* x, 61 int32_t* y, 62 uint32_t* w, 63 uint32_t* h); 64 int (*getDisplayColorBuffer)(uint32_t displayId, uint32_t* colorBuffer); 65 int (*getColorBufferDisplay)(uint32_t colorBuffer, uint32_t* displayId); 66 int (*setDisplayColorBuffer)(uint32_t displayId, uint32_t colorBuffer); 67 } QAndroidMultiDisplayAgent; 68