summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-03-08 03:15:02 +0100
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:38 +0200
commitc39bf17f835122bdd1292271aac01498bb43286e (patch)
tree9475ef7e9150b3e80b4160a7225fc707fe82ff51 /src
parentandroid: Convert SettingsFragmentPresenter to Kotlin (diff)
downloadyuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar.gz
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar.bz2
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar.lz
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar.xz
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.tar.zst
yuzu-c39bf17f835122bdd1292271aac01498bb43286e.zip
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.kt (renamed from src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.java)33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.kt
index 3c1743fab..c4a586329 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.java
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentView.kt
@@ -1,25 +1,22 @@
-package org.yuzu.yuzu_emu.features.settings.ui;
+package org.yuzu.yuzu_emu.features.settings.ui
-import androidx.fragment.app.FragmentActivity;
-
-import org.yuzu.yuzu_emu.features.settings.model.Setting;
-import org.yuzu.yuzu_emu.features.settings.model.Settings;
-import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem;
-
-import java.util.ArrayList;
+import androidx.fragment.app.FragmentActivity
+import org.yuzu.yuzu_emu.features.settings.model.Setting
+import org.yuzu.yuzu_emu.features.settings.model.Settings
+import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
/**
* Abstraction for a screen showing a list of settings. Instances of
* this type of view will each display a layer of the setting hierarchy.
*/
-public interface SettingsFragmentView {
+interface SettingsFragmentView {
/**
* Called by the containing Activity to notify the Fragment that an
* asynchronous load operation completed.
*
* @param settings The (possibly null) result of the ini load operation.
*/
- void onSettingsFileLoaded(Settings settings);
+ fun onSettingsFileLoaded(settings: Settings?)
/**
* Pass a settings HashMap to the containing activity, so that it can
@@ -28,25 +25,25 @@ public interface SettingsFragmentView {
*
* @param settings An ArrayList containing all the settings HashMaps.
*/
- void passSettingsToActivity(Settings settings);
+ fun passSettingsToActivity(settings: Settings)
/**
* Pass an ArrayList to the View so that it can be displayed on screen.
*
* @param settingsList The result of converting the HashMap to an ArrayList
*/
- void showSettingsList(ArrayList<SettingsItem> settingsList);
+ fun showSettingsList(settingsList: ArrayList<SettingsItem>)
/**
* Called by the containing Activity when an asynchronous load operation fails.
* Instructs the Fragment to load the settings screen with defaults selected.
*/
- void loadDefaultSettings();
+ fun loadDefaultSettings()
/**
* @return The Fragment's containing activity.
*/
- FragmentActivity getActivity();
+ val fragmentActivity: FragmentActivity
/**
* Tell the Fragment to tell the containing Activity to show a new
@@ -54,7 +51,7 @@ public interface SettingsFragmentView {
*
* @param menuKey Identifier for the settings group that should be shown.
*/
- void loadSubMenu(String menuKey);
+ fun loadSubMenu(menuKey: String)
/**
* Tell the Fragment to tell the containing activity to display a toast message.
@@ -62,17 +59,17 @@ public interface SettingsFragmentView {
* @param message Text to be shown in the Toast
* @param is_long Whether this should be a long Toast or short one.
*/
- void showToastMessage(String message, boolean is_long);
+ fun showToastMessage(message: String?, is_long: Boolean)
/**
* Have the fragment add a setting to the HashMap.
*
* @param setting The (possibly previously missing) new setting.
*/
- void putSetting(Setting setting);
+ fun putSetting(setting: Setting)
/**
* Have the fragment tell the containing Activity that a setting was modified.
*/
- void onSettingChanged();
+ fun onSettingChanged()
}