11e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file.
41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
51e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)package org.chromium.chromoting;
61e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)/**
81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) * Callback interface to allow the TouchInputHandler to request actions on the DesktopView.
91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) */
100f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)public interface DesktopViewInterface {
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    /** Injects a mouse-move event, with optional button press/release. */
120f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)    void injectMouseEvent(int x, int y, int button, boolean pressed);
131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    /** Injects a mouse-wheel event with delta values. */
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    void injectMouseWheelDeltaEvent(int deltaX, int deltaY);
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    /** Triggers a brief cursor animation to indicate a long-press event. */
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    void showLongPressFeedback();
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)    /** Shows the action bar. */
210f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)    void showActionBar();
221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)    /** Shows the software keyboard. */
240f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)    void showKeyboard();
251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)    /**
271e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)     * Informs the view that its transformation matrix (for rendering the remote desktop bitmap)
281e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)     * has been changed by the TouchInputHandler, which requires repainting.
291e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)     */
300f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)    void transformationChanged();
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    /**
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)     * Starts or stops an animation. Whilst the animation is running, the DesktopView will
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)     * periodically call TouchInputHandler.processAnimation() and repaint itself.
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)     */
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    void setAnimationEnabled(boolean enabled);
371e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)}
38