1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.inputmethod.latin.touchinputconsumer;
18 
19 import android.view.inputmethod.EditorInfo;
20 
21 import com.android.inputmethod.keyboard.Keyboard;
22 import com.android.inputmethod.latin.DictionaryFacilitator;
23 import com.android.inputmethod.latin.SuggestedWords;
24 import com.android.inputmethod.latin.common.InputPointers;
25 import com.android.inputmethod.latin.inputlogic.PrivateCommandPerformer;
26 
27 import java.util.Locale;
28 
29 /**
30  * Stub for GestureConsumer.
31  * <br>
32  * The methods of this class should only be called from a single thread, e.g.,
33  * the UI Thread.
34  */
35 @SuppressWarnings("unused")
36 public class GestureConsumer {
37     public static final GestureConsumer NULL_GESTURE_CONSUMER =
38             new GestureConsumer();
39 
newInstance( final EditorInfo editorInfo, final PrivateCommandPerformer commandPerformer, final Locale locale, final Keyboard keyboard)40     public static GestureConsumer newInstance(
41             final EditorInfo editorInfo, final PrivateCommandPerformer commandPerformer,
42             final Locale locale, final Keyboard keyboard) {
43         return GestureConsumer.NULL_GESTURE_CONSUMER;
44     }
45 
GestureConsumer()46     private GestureConsumer() {
47     }
48 
willConsume()49     public boolean willConsume() {
50         return false;
51     }
52 
onInit(final Locale locale, final Keyboard keyboard)53     public void onInit(final Locale locale, final Keyboard keyboard) {
54     }
55 
onGestureStarted(final Locale locale, final Keyboard keyboard)56     public void onGestureStarted(final Locale locale, final Keyboard keyboard) {
57     }
58 
onGestureCanceled()59     public void onGestureCanceled() {
60     }
61 
onGestureCompleted(final InputPointers inputPointers)62     public void onGestureCompleted(final InputPointers inputPointers) {
63     }
64 
onImeSuggestionsProcessed(final SuggestedWords suggestedWords, final int composingStart, final int composingLength, final DictionaryFacilitator dictionaryFacilitator)65     public void onImeSuggestionsProcessed(final SuggestedWords suggestedWords,
66             final int composingStart, final int composingLength,
67             final DictionaryFacilitator dictionaryFacilitator) {
68     }
69 }
70