blob: 9e020c7c7f92f60659c0bf77214fa172c0840553 [file] [log] [blame]
Prabir Pradhanb56e92c2023-06-09 23:40:37 +00001/*
2 * Copyright 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "PointerControllerInterface.h"
20
21namespace android {
22
23/**
24 * The PointerChoreographer policy interface.
25 *
26 * This is the interface that PointerChoreographer uses to talk to Window Manager and other
27 * system components.
28 */
29class PointerChoreographerPolicyInterface {
30public:
31 virtual ~PointerChoreographerPolicyInterface() = default;
32
33 /**
34 * A factory method for PointerController. The PointerController implementation has
35 * dependencies on a graphical library - libgui, used to draw icons on the screen - which
36 * isn't available for the host. Since we want libinputflinger and its test to be buildable
37 * for and runnable on the host, the PointerController implementation must be in a separate
38 * library, libinputservice, that has the additional dependencies. The PointerController
39 * will be mocked when testing PointerChoreographer.
40 */
41 virtual std::shared_ptr<PointerControllerInterface> createPointerController() = 0;
42};
43
44} // namespace android