OLD | NEW |
| (Empty) |
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 | |
5 package org.chromium.chromoting; | |
6 | |
7 import android.graphics.Point; | |
8 | |
9 import org.chromium.chromoting.jni.Client; | |
10 | |
11 /** | |
12 * Callback interface to allow the TouchInputHandler to request actions on the D
esktopView. | |
13 */ | |
14 public interface DesktopViewInterface { | |
15 /** | |
16 * Initializes the instance. Implementations can assume this function will b
e called exactly | |
17 * once after constructor but before other functions. | |
18 */ | |
19 void init(Desktop desktop, Client client); | |
20 | |
21 /** Triggers a brief animation to indicate the existence and location of an
input event. */ | |
22 void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point p
os); | |
23 | |
24 /** Shows the action bar. */ | |
25 void showActionBar(); | |
26 | |
27 /** Shows the software keyboard. */ | |
28 void showKeyboard(); | |
29 | |
30 /** | |
31 * Informs the view that its transformation matrix (for rendering the remote
desktop bitmap) | |
32 * has been changed by the TouchInputHandler, which requires repainting. | |
33 */ | |
34 void transformationChanged(); | |
35 | |
36 /** | |
37 * Informs the view that the cursor has been moved by the TouchInputHandler,
which requires | |
38 * repainting. | |
39 */ | |
40 void cursorMoved(); | |
41 | |
42 /** | |
43 * Informs the view that the cursor visibility has been changed (for differe
nt input mode) by | |
44 * the TouchInputHandler, which requires repainting. | |
45 */ | |
46 void cursorVisibilityChanged(); | |
47 | |
48 /** | |
49 * Starts or stops an animation. Whilst the animation is running, the Deskto
pView will | |
50 * periodically call TouchInputHandler.processAnimation() and repaint itself
. | |
51 */ | |
52 void setAnimationEnabled(boolean enabled); | |
53 | |
54 /** | |
55 * An {@link Event} which is triggered when the view is being painted. Addin
g handlers to this | |
56 * event causes painting to be triggered continuously until they are all rem
oved. | |
57 */ | |
58 Event<PaintEventParameter> onPaint(); | |
59 | |
60 /** An {@link Event} which is triggered when the client size is changed. */ | |
61 Event<SizeChangedEventParameter> onClientSizeChanged(); | |
62 | |
63 /** An {@link Event} which is triggered when the host size is changed. */ | |
64 Event<SizeChangedEventParameter> onHostSizeChanged(); | |
65 | |
66 /** An {@link Event} which is triggered when user touchs the screen. */ | |
67 Event<TouchEventParameter> onTouch(); | |
68 } | |
OLD | NEW |