Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoWrapper.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoWrapper.java b/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoWrapper.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2262999ca6138599afe8d470a3348bb34904ecac |
| --- /dev/null |
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoWrapper.java |
| @@ -0,0 +1,64 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.content.browser.input; |
| + |
| +import android.graphics.Matrix; |
| +import android.graphics.RectF; |
| + |
| +/** |
| + * Wrapper around Android's {@link android.view.inputmethod.CursorAnchorInfo}. |
| + */ |
| +public interface CursorAnchorInfoWrapper { |
| + public static final int FLAG_HAS_VISIBLE_REGION = 0x01; |
| + public static final int FLAG_HAS_INVISIBLE_REGION = 0x02; |
| + public static final int FLAG_IS_RTL = 0x04; |
| + |
| + /** |
| + * Wrapper around Android's {@link android.view.inputmethod.CursorAnchorInfo.Builder}. |
| + */ |
| + interface Builder { |
| + Builder setSelectionRange(int newStart, int newEnd); |
| + |
| + Builder setComposingText(int composingTextStart, CharSequence composingText); |
| + |
| + Builder setInsertionMarkerLocation(float horizontalPosition, float lineTop, |
| + float lineBaseline, float lineBottom, int flags); |
| + |
| + Builder addCharacterBounds(int index, float left, float top, float right, float bottom, |
| + int flags); |
| + |
| + Builder setMatrix(Matrix matrix); |
| + |
| + CursorAnchorInfoWrapper build(); |
| + |
| + void reset(); |
| + } |
| + |
| + int getSelectionStart(); |
| + |
| + int getSelectionEnd(); |
| + |
| + int getComposingTextStart(); |
| + |
| + CharSequence getComposingText(); |
| + |
| + int getInsertionMarkerFlags(); |
| + |
| + float getInsertionMarkerHorizontal(); |
| + |
| + float getInsertionMarkerTop(); |
| + |
| + float getInsertionMarkerBaseline(); |
| + |
| + float getInsertionMarkerBottom(); |
| + |
| + RectF getCharacterBounds(final int index); |
| + |
| + int getCharacterBoundsFlags(final int index); |
| + |
| + Matrix getMatrix(); |
| + |
| + 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
|
| +} |