Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoWrapper.java

Issue 699333003: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the core logic into Java side Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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.content.browser.input;
6
7 import android.graphics.Matrix;
8 import android.graphics.RectF;
9
10 /**
11 * Wrapper around Android's {@link android.view.inputmethod.CursorAnchorInfo}.
12 */
13 public interface CursorAnchorInfoWrapper {
14 public static final int FLAG_HAS_VISIBLE_REGION = 0x01;
15 public static final int FLAG_HAS_INVISIBLE_REGION = 0x02;
16 public static final int FLAG_IS_RTL = 0x04;
17
18 /**
19 * Wrapper around Android's {@link android.view.inputmethod.CursorAnchorInfo .Builder}.
20 */
21 interface Builder {
22 Builder setSelectionRange(int newStart, int newEnd);
23
24 Builder setComposingText(int composingTextStart, CharSequence composingT ext);
25
26 Builder setInsertionMarkerLocation(float horizontalPosition, float lineT op,
27 float lineBaseline, float lineBottom, int flags);
28
29 Builder addCharacterBounds(int index, float left, float top, float right , float bottom,
30 int flags);
31
32 Builder setMatrix(Matrix matrix);
33
34 CursorAnchorInfoWrapper build();
35
36 void reset();
37 }
38
39 int getSelectionStart();
40
41 int getSelectionEnd();
42
43 int getComposingTextStart();
44
45 CharSequence getComposingText();
46
47 int getInsertionMarkerFlags();
48
49 float getInsertionMarkerHorizontal();
50
51 float getInsertionMarkerTop();
52
53 float getInsertionMarkerBaseline();
54
55 float getInsertionMarkerBottom();
56
57 RectF getCharacterBounds(final int index);
58
59 int getCharacterBoundsFlags(final int index);
60
61 Matrix getMatrix();
62
63 Object getObject();
jdduke (slow) 2015/02/09 17:01:17 This is an Object for testing purposes? If so, let
yukawa 2015/02/10 17:24:54 Sorry for the confusion. |CursorAnchorInfoWrapper
64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698