PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/ime/latinime/src/com/googlecode/eyesfree/inputmethod/latin/tutorial/TutorialController.java

http://eyes-free.googlecode.com/
Java | 97 lines | 15 code | 13 blank | 69 comment | 0 complexity | 6bf5b797a108db8c1be743578253fbbe MD5 | raw file
 1/*
 2 * Copyright (C) 2011 Google Inc.
 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
17package com.googlecode.eyesfree.inputmethod.latin.tutorial;
18
19import android.content.Intent;
20
21/**
22 * @author alanv@google.com (Alan Viverette)
23 */
24public interface TutorialController {
25    /** Moves to the next tutorial. */
26    public void next();
27
28    /**
29     * Skips the specified number of tutorials. Calling skip(0) is equivalent to
30     * calling {@link TutorialController#next()}.
31     *
32     * @param count The number of tutorials to skip.
33     */
34    public void skip(int count);
35
36    /** Moves to the previous tutorial. */
37    public void previous();
38
39    /**
40     * Shows the tutorial at the specified index.
41     *
42     * @param index The index of the tutorial to show.
43     */
44    public void show(int index);
45
46    /**
47     * Returns the current keyboard mode.
48     *
49     * @return The current keyboard mode.
50     * @see com.googlecode.eyesfree.inputmethod.latin.KeyboardSwitcher#getKeyboardMode()
51     */
52    public int getKeyboardMode();
53
54    /**
55     * Requests a current keyboard mode update.
56     */
57    public void requestKeyboardModeUpdate();
58
59    /**
60     * Attempts to set the current keyboard mode.
61     *
62     * @param mode The desired mode.
63     * @see com.googlecode.eyesfree.inputmethod.latin.KeyboardSwitcher#setKeyboardMode(int)
64     */
65    public void setKeyboardMode(int mode);
66
67    /**
68     * Queues text for speaking.
69     *
70     * @param text The text to speak.
71     * @param utteranceId The utterance id for completion callbacks.
72     */
73    public void speak(String text, int utteranceId);
74
75    /**
76     * Runs the specified runnable on the UI thread.
77     *
78     * @param r The runnable to run.
79     */
80    public void runOnUiThread(Runnable r);
81
82    /**
83     * Starts an activity with the given intent and returns to the tutorial
84     * activity's onActivityResult(int, int, Intent) method with the specified
85     * request code.
86     *
87     * @param intent
88     * @param requestCode
89     * @see android.app.Activity#startActivityForResult(Intent, int)
90     */
91    public void startActivityForResult(Intent intent, int requestCode);
92
93    /**
94     * Closes and exits the tutorial.
95     */
96    public void finish();
97}