1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 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 16 #ifndef FRAMEWORKS_WMSERVER_SRC_SCREEN_INFO_H 17 #define FRAMEWORKS_WMSERVER_SRC_SCREEN_INFO_H 18 19 struct SurfaceInfo { 20 int surfaceId; 21 int dstX; 22 int dstY; 23 int dstW; 24 int dstH; 25 int srcX; 26 int srcY; 27 int srcW; 28 int srcH; 29 double opacity; 30 int visibility; // 0 or 1 31 int onLayerId; 32 }; 33 34 struct LayerInfo { 35 int layerId; 36 int dstX; 37 int dstY; 38 int dstW; 39 int dstH; 40 int srcX; 41 int srcY; 42 int srcW; 43 int srcH; 44 double opacity; 45 int visibility; // 0 or 1 46 int onScreenId; 47 int nSurfaces; 48 struct SurfaceInfo **surfaces; 49 }; 50 51 struct ScreenInfo { 52 int screenId; 53 char *connectorName; 54 int width; 55 int height; 56 int nLayers; 57 struct LayerInfo **layers; 58 }; 59 60 struct SeatInfo { 61 char *seatName; 62 int deviceFlags; 63 int focusWindowId; 64 }; 65 66 struct SeatInfo **GetSeatsInfo(void); 67 void FreeSeatsInfo(struct SeatInfo **seats); 68 69 struct ScreenInfo **GetScreensInfo(void); 70 void FreeScreensInfo(struct ScreenInfo **screens); 71 72 typedef void (*ScreenInfoChangeListener)(); 73 void SetScreenListener(const ScreenInfoChangeListener listener); 74 75 typedef void (*SeatInfoChangeListener)(); 76 void SetSeatListener(const SeatInfoChangeListener listener); 77 78 struct multimodal_libinput_event; 79 typedef void (*LibInputEventListener)(struct multimodal_libinput_event *event); 80 void SetLibInputEventListener(const LibInputEventListener listener); 81 82 #endif // FRAMEWORKS_WMSERVER_SRC_SCREEN_INFO_H 83