12d4d9a4dSopenharmony_ci/*
22d4d9a4dSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
32d4d9a4dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
42d4d9a4dSopenharmony_ci * you may not use this file except in compliance with the License.
52d4d9a4dSopenharmony_ci * You may obtain a copy of the License at
62d4d9a4dSopenharmony_ci *
72d4d9a4dSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
82d4d9a4dSopenharmony_ci *
92d4d9a4dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
102d4d9a4dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
112d4d9a4dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122d4d9a4dSopenharmony_ci * See the License for the specific language governing permissions and
132d4d9a4dSopenharmony_ci * limitations under the License.
142d4d9a4dSopenharmony_ci */
152d4d9a4dSopenharmony_ci
162d4d9a4dSopenharmony_ci#ifndef OHOS_I_DINPUT_CONTEXT_H
172d4d9a4dSopenharmony_ci#define OHOS_I_DINPUT_CONTEXT_H
182d4d9a4dSopenharmony_ci
192d4d9a4dSopenharmony_ci#include <cstdint>
202d4d9a4dSopenharmony_ci#include <string>
212d4d9a4dSopenharmony_ci
222d4d9a4dSopenharmony_ci#include "constants_dinput.h"
232d4d9a4dSopenharmony_ci
242d4d9a4dSopenharmony_cinamespace OHOS {
252d4d9a4dSopenharmony_cinamespace DistributedHardware {
262d4d9a4dSopenharmony_cinamespace DistributedInput {
272d4d9a4dSopenharmony_cistruct LocalAbsInfo {
282d4d9a4dSopenharmony_ci    int32_t absXMin = 0;
292d4d9a4dSopenharmony_ci    int32_t absXMax = 0;
302d4d9a4dSopenharmony_ci    int32_t absYMin = 0;
312d4d9a4dSopenharmony_ci    int32_t absYMax = 0;
322d4d9a4dSopenharmony_ci    int32_t absPressureMin = 0;
332d4d9a4dSopenharmony_ci    int32_t absPressureMax = 0;
342d4d9a4dSopenharmony_ci    int32_t absMtTouchMajorMin = 0;
352d4d9a4dSopenharmony_ci    int32_t absMtTouchMajorMax = 0;
362d4d9a4dSopenharmony_ci    int32_t absMtTouchMinorMin = 0;
372d4d9a4dSopenharmony_ci    int32_t absMtTouchMinorMax = 0;
382d4d9a4dSopenharmony_ci    int32_t absMtOrientationMin = 0;
392d4d9a4dSopenharmony_ci    int32_t absMtOrientationMax = 0;
402d4d9a4dSopenharmony_ci    int32_t absMtPositionXMin = 0;
412d4d9a4dSopenharmony_ci    int32_t absMtPositionXMax = 0;
422d4d9a4dSopenharmony_ci    int32_t absMtPositionYMin = 0;
432d4d9a4dSopenharmony_ci    int32_t absMtPositionYMax = 0;
442d4d9a4dSopenharmony_ci    int32_t absMtBlobIdMin = 0;
452d4d9a4dSopenharmony_ci    int32_t absMtBlobIdMax = 0;
462d4d9a4dSopenharmony_ci    int32_t absMtTrackingIdMin = 0;
472d4d9a4dSopenharmony_ci    int32_t absMtTrackingIdMax = 0;
482d4d9a4dSopenharmony_ci    int32_t absMtPressureMin = 0;
492d4d9a4dSopenharmony_ci    int32_t absMtPressureMax = 0;
502d4d9a4dSopenharmony_ci    InputDevice deviceInfo;
512d4d9a4dSopenharmony_ci};
522d4d9a4dSopenharmony_ci
532d4d9a4dSopenharmony_cistruct LocalTouchScreenInfo {
542d4d9a4dSopenharmony_ci    uint32_t sinkShowWidth = 0;
552d4d9a4dSopenharmony_ci    uint32_t sinkShowHeight = 0;
562d4d9a4dSopenharmony_ci    uint32_t sinkPhyWidth = 0;
572d4d9a4dSopenharmony_ci    uint32_t sinkPhyHeight = 0;
582d4d9a4dSopenharmony_ci    LocalAbsInfo localAbsInfo;
592d4d9a4dSopenharmony_ci};
602d4d9a4dSopenharmony_ci
612d4d9a4dSopenharmony_cistruct TransformInfo {
622d4d9a4dSopenharmony_ci    uint32_t sinkWinPhyX = 0;           // projection area X coordinate in touch coordinate
632d4d9a4dSopenharmony_ci    uint32_t sinkWinPhyY = 0;           // projection area Y coordinate in touch coordinate
642d4d9a4dSopenharmony_ci    uint32_t sinkProjPhyWidth = 0;      // projection area width in touch coordinate
652d4d9a4dSopenharmony_ci    uint32_t sinkProjPhyHeight = 0;     // projection area height in touch coordinate
662d4d9a4dSopenharmony_ci    double coeffWidth = 0.0;            // sink width transform source coefficient
672d4d9a4dSopenharmony_ci    double coeffHeight = 0.0;           // sink height transform source coefficient
682d4d9a4dSopenharmony_ci};
692d4d9a4dSopenharmony_ci
702d4d9a4dSopenharmony_cistruct SrcScreenInfo {
712d4d9a4dSopenharmony_ci    std::string devId = "";             // source device id
722d4d9a4dSopenharmony_ci    std::string uuid = "";              // source device uuid
732d4d9a4dSopenharmony_ci    int32_t sessionId = 0;              // source device session id
742d4d9a4dSopenharmony_ci    uint64_t sourceWinId = 0;           // source projection window id
752d4d9a4dSopenharmony_ci    uint32_t sourceWinWidth = 0;        // source projection window width
762d4d9a4dSopenharmony_ci    uint32_t sourceWinHeight = 0;       // source projection window height
772d4d9a4dSopenharmony_ci    std::string sourcePhyId = "";       // source virtual screen driver id
782d4d9a4dSopenharmony_ci    uint32_t sourcePhyFd = 0;           // source virtual screen driver fd
792d4d9a4dSopenharmony_ci    uint32_t sourcePhyWidth = 0;        // source virtual screen driver width
802d4d9a4dSopenharmony_ci    uint32_t sourcePhyHeight = 0;       // source virtual screen driver height
812d4d9a4dSopenharmony_ci};
822d4d9a4dSopenharmony_ci
832d4d9a4dSopenharmony_cistruct SinkScreenInfo {
842d4d9a4dSopenharmony_ci    uint32_t sinkShowWidth = 0;         // sink show width
852d4d9a4dSopenharmony_ci    uint32_t sinkShowHeight = 0;        // sink show height
862d4d9a4dSopenharmony_ci    uint32_t sinkPhyWidth = 0;          // sink touch screen width
872d4d9a4dSopenharmony_ci    uint32_t sinkPhyHeight = 0;         // sink touch screen height
882d4d9a4dSopenharmony_ci    uint64_t sinkShowWinId = 0;         // sink show window id
892d4d9a4dSopenharmony_ci    uint32_t sinkWinShowX = 0;          // sink show window x coordinate
902d4d9a4dSopenharmony_ci    uint32_t sinkWinShowY = 0;          // sink show window y coordinate
912d4d9a4dSopenharmony_ci    uint32_t sinkProjShowWidth = 0;     // sink show window width
922d4d9a4dSopenharmony_ci    uint32_t sinkProjShowHeight = 0;    // sink show window height
932d4d9a4dSopenharmony_ci    SrcScreenInfo srcScreenInfo;
942d4d9a4dSopenharmony_ci    TransformInfo transformInfo;
952d4d9a4dSopenharmony_ci};
962d4d9a4dSopenharmony_ci} // namespace DistributedInput
972d4d9a4dSopenharmony_ci} // namespace DistributedHardware
982d4d9a4dSopenharmony_ci} // namespace OHOS
992d4d9a4dSopenharmony_ci
1002d4d9a4dSopenharmony_ci#endif // OHOS_I_DINPUT_CONTEXT_H
101