1// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.chromoting;
6
7/**
8 * Callback interface to allow the TouchInputHandler to request actions on the DesktopView.
9 */
10public interface DesktopViewInterface {
11    /** Injects a mouse-move event, with optional button press/release. */
12    void injectMouseEvent(int x, int y, int button, boolean pressed);
13
14    /** Injects a mouse-wheel event with delta values. */
15    void injectMouseWheelDeltaEvent(int deltaX, int deltaY);
16
17    /** Triggers a brief cursor animation to indicate a long-press event. */
18    void showLongPressFeedback();
19
20    /** Shows the action bar. */
21    void showActionBar();
22
23    /** Shows the software keyboard. */
24    void showKeyboard();
25
26    /**
27     * Informs the view that its transformation matrix (for rendering the remote desktop bitmap)
28     * has been changed by the TouchInputHandler, which requires repainting.
29     */
30    void transformationChanged();
31
32    /**
33     * Starts or stops an animation. Whilst the animation is running, the DesktopView will
34     * periodically call TouchInputHandler.processAnimation() and repaint itself.
35     */
36    void setAnimationEnabled(boolean enabled);
37}
38