// Path: app/src/main/java/rkr/simplekeyboard/inputmethod/latin/settings/SettingsValues.java
// public class SettingsValues {
//     public static final float DEFAULT_SIZE_SCALE = 1.0f; // 100%
// 
//     // From resources:
//     public final SpacingAndPunctuations mSpacingAndPunctuations;
//     // From configuration:
//     public final boolean mHasHardwareKeyboard;
//     public final int mDisplayOrientation;
//     // From preferences, in the same order as xml/prefs.xml:
//     public final boolean mAutoCap;
//     public final boolean mVibrateOn;
//     public final boolean mSoundOn;
//     public final boolean mKeyPreviewPopupOn;
//     public final boolean mShowsLanguageSwitchKey;
//     public final boolean mImeSwitchEnabled;
//     public final int mKeyLongpressTimeout;
//     public final boolean mHideSpecialChars;
//     public final boolean mShowNumberRow;
//     public final boolean mSpaceSwipeEnabled;
//     public final boolean mDeleteSwipeEnabled;
//     public final boolean mUseMatchingNavbarColor;
// 
//     // From the input box
//     public final InputAttributes mInputAttributes;
// 
//     // Deduced settings
//     public final int mKeypressVibrationDuration;
//     public final float mKeypressSoundVolume;
//     public final int mKeyPreviewPopupDismissDelay;
// 
//     // Debug settings
//     public final float mKeyboardHeightScale;
// 
//     public SettingsValues(final SharedPreferences prefs, final Resources res,
//             final InputAttributes inputAttributes) {
//         // Get the resources
//         mSpacingAndPunctuations = new SpacingAndPunctuations(res);
// 
//         // Store the input attributes
//         mInputAttributes = inputAttributes;
// 
//         // Get the settings preferences
//         mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true);
//         mVibrateOn = Settings.readVibrationEnabled(prefs, res);
//         mSoundOn = Settings.readKeypressSoundEnabled(prefs, res);
//         mKeyPreviewPopupOn = Settings.readKeyPreviewPopupEnabled(prefs, res);
//         mShowsLanguageSwitchKey = Settings.readShowLanguageSwitchKey(prefs);
//         mImeSwitchEnabled = Settings.readEnableImeSwitch(prefs);
//         mHasHardwareKeyboard = Settings.readHasHardwareKeyboard(res.getConfiguration());
// 
//         // Compute other readable settings
//         mKeyLongpressTimeout = Settings.readKeyLongpressTimeout(prefs, res);
//         mKeypressVibrationDuration = Settings.readKeypressVibrationDuration(prefs, res);
//         mKeypressSoundVolume = Settings.readKeypressSoundVolume(prefs, res);
//         mKeyPreviewPopupDismissDelay = res.getInteger(R.integer.config_key_preview_linger_timeout);
//         mKeyboardHeightScale = Settings.readKeyboardHeight(prefs, DEFAULT_SIZE_SCALE);
//         mDisplayOrientation = res.getConfiguration().orientation;
//         mHideSpecialChars = Settings.readHideSpecialChars(prefs);
//         mShowNumberRow = Settings.readShowNumberRow(prefs);
//         mSpaceSwipeEnabled = Settings.readSpaceSwipeEnabled(prefs);
//         mDeleteSwipeEnabled = Settings.readDeleteSwipeEnabled(prefs);
//         mUseMatchingNavbarColor = Settings.readUseMatchingNavbarColor(prefs);
//     }
// 
//     public boolean isWordSeparator(final int code) {
//         return mSpacingAndPunctuations.isWordSeparator(code);
//     }
// 
//     public boolean isLanguageSwitchKeyDisabled() {
//         return !mShowsLanguageSwitchKey;
//     }
// 
//     public boolean isSameInputType(final EditorInfo editorInfo) {
//         return mInputAttributes.isSameInputType(editorInfo);
//     }
// 
//     public boolean hasSameOrientation(final Configuration configuration) {
//         return mDisplayOrientation == configuration.orientation;
//     }
// }


import rkr.simplekeyboard.inputmethod.latin.settings.SettingsValues;
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package rkr.simplekeyboard.inputmethod.event;


/**
 * An object encapsulating a single transaction for input.
 */
public class InputTransaction {
    // UPDATE_LATER is stronger than UPDATE_NOW. The reason for this is, if we have to update later,
    // it's because something will change that we can't evaluate now, which means that even if we
    // re-evaluate now we'll have to do it again later. The only case where that wouldn't apply
    // would be if we needed to update now to find out the new state right away, but then we
    // can't do it with this deferred mechanism anyway.
    public static final int SHIFT_NO_UPDATE = 0;
    public static final int SHIFT_UPDATE_NOW = 1;
    public static final int SHIFT_UPDATE_LATER = 2;

    // Initial conditions
// Path: app/src/main/java/rkr/simplekeyboard/inputmethod/latin/settings/SettingsValues.java
// public class SettingsValues {
//     public static final float DEFAULT_SIZE_SCALE = 1.0f; // 100%
// 
//     // From resources:
//     public final SpacingAndPunctuations mSpacingAndPunctuations;
//     // From configuration:
//     public final boolean mHasHardwareKeyboard;
//     public final int mDisplayOrientation;
//     // From preferences, in the same order as xml/prefs.xml:
//     public final boolean mAutoCap;
//     public final boolean mVibrateOn;
//     public final boolean mSoundOn;
//     public final boolean mKeyPreviewPopupOn;
//     public final boolean mShowsLanguageSwitchKey;
//     public final boolean mImeSwitchEnabled;
//     public final int mKeyLongpressTimeout;
//     public final boolean mHideSpecialChars;
//     public final boolean mShowNumberRow;
//     public final boolean mSpaceSwipeEnabled;
//     public final boolean mDeleteSwipeEnabled;
//     public final boolean mUseMatchingNavbarColor;
// 
//     // From the input box
//     public final InputAttributes mInputAttributes;
// 
//     // Deduced settings
//     public final int mKeypressVibrationDuration;
//     public final float mKeypressSoundVolume;
//     public final int mKeyPreviewPopupDismissDelay;
// 
//     // Debug settings
//     public final float mKeyboardHeightScale;
// 
//     public SettingsValues(final SharedPreferences prefs, final Resources res,
//             final InputAttributes inputAttributes) {
//         // Get the resources
//         mSpacingAndPunctuations = new SpacingAndPunctuations(res);
// 
//         // Store the input attributes
//         mInputAttributes = inputAttributes;
// 
//         // Get the settings preferences
//         mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true);
//         mVibrateOn = Settings.readVibrationEnabled(prefs, res);
//         mSoundOn = Settings.readKeypressSoundEnabled(prefs, res);
//         mKeyPreviewPopupOn = Settings.readKeyPreviewPopupEnabled(prefs, res);
//         mShowsLanguageSwitchKey = Settings.readShowLanguageSwitchKey(prefs);
//         mImeSwitchEnabled = Settings.readEnableImeSwitch(prefs);
//         mHasHardwareKeyboard = Settings.readHasHardwareKeyboard(res.getConfiguration());
// 
//         // Compute other readable settings
//         mKeyLongpressTimeout = Settings.readKeyLongpressTimeout(prefs, res);
//         mKeypressVibrationDuration = Settings.readKeypressVibrationDuration(prefs, res);
//         mKeypressSoundVolume = Settings.readKeypressSoundVolume(prefs, res);
//         mKeyPreviewPopupDismissDelay = res.getInteger(R.integer.config_key_preview_linger_timeout);
//         mKeyboardHeightScale = Settings.readKeyboardHeight(prefs, DEFAULT_SIZE_SCALE);
//         mDisplayOrientation = res.getConfiguration().orientation;
//         mHideSpecialChars = Settings.readHideSpecialChars(prefs);
//         mShowNumberRow = Settings.readShowNumberRow(prefs);
//         mSpaceSwipeEnabled = Settings.readSpaceSwipeEnabled(prefs);
//         mDeleteSwipeEnabled = Settings.readDeleteSwipeEnabled(prefs);
//         mUseMatchingNavbarColor = Settings.readUseMatchingNavbarColor(prefs);
//     }
// 
//     public boolean isWordSeparator(final int code) {
//         return mSpacingAndPunctuations.isWordSeparator(code);
//     }
// 
//     public boolean isLanguageSwitchKeyDisabled() {
//         return !mShowsLanguageSwitchKey;
//     }
// 
//     public boolean isSameInputType(final EditorInfo editorInfo) {
//         return mInputAttributes.isSameInputType(editorInfo);
//     }
// 
//     public boolean hasSameOrientation(final Configuration configuration) {
//         return mDisplayOrientation == configuration.orientation;
//     }
// }


// Path: app/src/main/java/rkr/simplekeyboard/inputmethod/event/InputTransaction.java
import rkr.simplekeyboard.inputmethod.latin.settings.SettingsValues;

/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package rkr.simplekeyboard.inputmethod.event;


/**
 * An object encapsulating a single transaction for input.
 */
public class InputTransaction {
    // UPDATE_LATER is stronger than UPDATE_NOW. The reason for this is, if we have to update later,
    // it's because something will change that we can't evaluate now, which means that even if we
    // re-evaluate now we'll have to do it again later. The only case where that wouldn't apply
    // would be if we needed to update now to find out the new state right away, but then we
    // can't do it with this deferred mechanism anyway.
    public static final int SHIFT_NO_UPDATE = 0;
    public static final int SHIFT_UPDATE_NOW = 1;
    public static final int SHIFT_UPDATE_LATER = 2;

    // Initial conditions
    public final SettingsValues mSettingsValues;