diff --git a/.gitignore b/.gitignore index 0042435..c1011d6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,11 @@ refilc/.flutter-plugins refilc/.flutter-plugins-dependencies refilc/pubspec.lock refilc/.dart_tool/ -refilc/android/ -refilc/ios/ -refilc/windows/ -refilc/linux/ -refilc/macos/ +# refilc/android/ +# refilc/ios/ +# refilc/windows/ +# refilc/linux/ +# refilc/macos/ refilc/build/ refilc_desktop_ui/.flutter-plugins @@ -34,6 +34,14 @@ filcnaplo_premium/.dart_tool/ .github .idea .gitmodules +.gradle refilc/.DS_Store .DS_Store +refilc/linux/flutter/ +refilc/macos/flutter/ +.plugin_symlinks/ +refilc/ios/Flutter/flutter_export_environment.sh +refilc/ios/Flutter/Generated.xcconfig +refilc/ios/Runner/GeneratedPluginRegistrant.h +refilc/ios/Runner/GeneratedPluginRegistrant.m diff --git a/refilc/android/app/build.gradle b/refilc/android/app/build.gradle new file mode 100644 index 0000000..db5d6df --- /dev/null +++ b/refilc/android/app/build.gradle @@ -0,0 +1,112 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + throw new GradleException("Undefined VersionCode") +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + throw new GradleException("Undefined VersionName") +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file("key.properties") +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + +android { + ndkVersion "25.1.8937393" + + compileSdkVersion rootProject.ext.compileSdkVersion + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + disable "Instantiatable" + checkReleaseBuilds false + abortOnError false + } + + defaultConfig { + applicationId "hu.refilc.naplo" + minSdkVersion 21 + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled true + } + + compileOptions { + // Flag to enable support for the new language APIs + coreLibraryDesugaringEnabled true + // Sets Java compatibility to Java 8 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + signingConfigs { + debug { + keyAlias "androiddebugkey" + keyPassword "Jelszo123" + storeFile file("C:/Users/kima/debugkeystore.jks") + storePassword "Jelszo123" + } + + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } + } + + buildTypes { + debug { + signingConfig signingConfigs.debug + } + + release { + signingConfig signingConfigs.release + shrinkResources false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + buildFeatures { + viewBinding true + } +} + +flutter { + source '../..' +} + +dependencies { + implementation 'com.android.support:multidex:2.0.1' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'joda-time:joda-time:2.9.4' + androidTestImplementation 'androidx.test:runner:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + implementation 'androidx.window:window:1.0.0' + implementation 'androidx.window:window-java:1.0.0' +} diff --git a/refilc/android/app/google-services.json b/refilc/android/app/google-services.json new file mode 100644 index 0000000..09ea9d9 --- /dev/null +++ b/refilc/android/app/google-services.json @@ -0,0 +1,38 @@ +{ + "project_info": { + "project_number": "584481527599", + "project_id": "refilc-mobile-login", + "storage_bucket": "refilc-mobile-login.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:584481527599:android:cd0fef08720efc4de033da", + "android_client_info": { + "package_name": "hu.refilc.naplo" + } + }, + "oauth_client": [ + { + "client_id": "584481527599-2cpalmvit8kl489aoj3v6t28ujcbcd62.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "hu.refilc.naplo", + "certificate_hash": "3c61db0984e5db01569cb084c83f9b3e058d94dc" + } + } + ], + "api_key": [ + { + "current_key": "AIzaSyAl8eWn7XVeWeA9dPMrWtzdRhhH4XOWOaY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/refilc/android/app/proguard-rules.pro b/refilc/android/app/proguard-rules.pro new file mode 100644 index 0000000..2f9ff85 --- /dev/null +++ b/refilc/android/app/proguard-rules.pro @@ -0,0 +1,11 @@ +-keep class io.flutter.plugin.editing.** { *; } +-keep class androidx.lifecycle.DefaultLifecycleObserver +-keep class com.pauldemarco.flutter_blue.** { *; } +-keep class com.mr.flutter.plugin.filepicker.** { *; } +-keep class com.shockwave.** + +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider \ No newline at end of file diff --git a/refilc/android/app/src/debug/AndroidManifest.xml b/refilc/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..fcc14fa --- /dev/null +++ b/refilc/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo"> + <!-- Permissions --> + <uses-permission android:name="android.permission.INTERNET"/> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> +</manifest> diff --git a/refilc/android/app/src/main/AndroidManifest.xml b/refilc/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7914701 --- /dev/null +++ b/refilc/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,160 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo"> + <application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher" + android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false"> + <activity android:exported="true" android:name="hu.refilc.naplo.MainActivity" + android:launchMode="singleTop" android:theme="@style/LaunchTheme" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" + android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" + android:showWhenLocked="false" + android:turnScreenOn="true"> + <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" + android:resource="@drawable/launch_background" /> + <meta-data android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> + <intent-filter> + <!-- commented bc of dynamic app icons --> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <!-- Deep Links --> + <intent-filter android:autoVerify="true"> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <!-- Accepts URIs that begin with YOUR_SCHEME://YOUR_HOST --> + <data + android:scheme="refilcapp" + android:host="refilc.hu" /> + </intent-filter> + <!-- <intent-filter android:autoVerify="true"> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <!- Accepts URIs that begin with https://api.refilc.hu -> + <data + android:scheme="https" + android:host="api.refilc.hu" + android:pathPrefix="/v2/rf-plus/auth/finish" /> + </intent-filter> --> + <intent-filter android:autoVerify="true"> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <!-- Accepts URIs that begin with https://refilc.hu --> + <data + android:scheme="https" + android:host="refilc.hu" + android:pathPrefix="/app" /> + </intent-filter> + </activity> + <meta-data android:name="flutterEmbedding" android:value="2" /> + + <!-- custom app icon thingies from here --> + <!-- <activity-alias + android:label="reFilc" + android:icon="@drawable/launch_ic_refilc_default" + android:name=".MainActivityAlias" + android:enabled="true" + android:exported="true" + android:targetActivity=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity-alias> + <activity-alias + android:label="reFilc" + android:icon="@drawable/launch_ic_refilc_default" + android:name=".MainActivityAliasrefilc_default" + android:enabled="false" + android:exported="true" + android:targetActivity=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity-alias> + <activity-alias + android:label="reFilc" + android:icon="@drawable/launch_ic_refilc_overcomplicated" + android:name=".MainActivityAliasrefilc_overcomplicated" + android:enabled="false" + android:exported="true" + android:targetActivity=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity-alias> + <activity-alias + android:label="reFilc" + android:icon="@drawable/launch_ic_refilc_concept" + android:name=".MainActivityAliasrefilc_concept" + android:enabled="false" + android:exported="true" + android:targetActivity=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity-alias> + <activity-alias + android:label="reFilc" + android:icon="@drawable/launch_ic_refilc_pride" + android:name=".MainActivityAliasrefilc_pride" + android:enabled="false" + android:exported="true" + android:targetActivity=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity-alias> --> + <!-- end of custom app icon thingies --> + + <receiver android:name="hu.refilc.naplo.widget_timetable.WidgetTimetable" + android:exported="true"> + <intent-filter> + <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> + <action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_LEFT" /> + <action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT" /> + <action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_TODAY" /> + <action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH" /> + <action android:name="list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM" /> + </intent-filter> + + <meta-data + android:name="android.appwidget.provider" + android:resource="@xml/home_widget_test_info" /> + </receiver> + + <service android:name="hu.refilc.naplo.widget_timetable.WidgetTimetableService" + android:permission="android.permission.BIND_REMOTEVIEWS" /> + + <receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver" + android:exported="true"> + <intent-filter> + <action android:name="es.antonborri.home_widget.action.BACKGROUND" /> + </intent-filter> + </receiver> + + <service android:name="es.antonborri.home_widget.HomeWidgetBackgroundService" + android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" /> + </application> + + <meta-data android:name="flutterEmbedding" android:value="2" /> + + <!-- Permissions --> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> + <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> + <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> + <uses-permission android:name="android.permission.WAKE_LOCK" /> + <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> +</manifest> diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java b/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java new file mode 100644 index 0000000..915d9ae --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java @@ -0,0 +1,8 @@ +package hu.refilc.naplo; + +import io.flutter.embedding.android.FlutterActivity; +import io.flutter.embedding.android.FlutterFragmentActivity; + +public class MainActivity extends FlutterFragmentActivity { + +} diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java b/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java new file mode 100644 index 0000000..b39409d --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java @@ -0,0 +1,119 @@ +package hu.refilc.naplo.database; + +import android.content.ContentValues; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; + +import java.sql.SQLException; + +import hu.refilc.naplo.database.SQLiteHelper; + +public class DBManager { + private Context context; + private SQLiteDatabase database; + private SQLiteHelper dbHelper; + + public DBManager(Context c) { + this.context = c; + } + + public DBManager open() throws SQLException { + this.dbHelper = new SQLiteHelper(this.context); + this.database = this.dbHelper.getWritableDatabase(); + return this; + } + + public void close() { + this.dbHelper.close(); + } + + public Cursor fetchWidget(int wid) { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_WIDGETS, new String[]{SQLiteHelper._ID, SQLiteHelper.DAY_SEL}, SQLiteHelper._ID + " = " + wid, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchTimetable() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_USER_DATA, new String[]{SQLiteHelper.TIMETABLE}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchLastUser() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LAST_ACCOUNT_ID}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchTheme() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.THEME, SQLiteHelper.ACCENT_COLOR}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchPremiumToken() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_TOKEN}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchPremiumScopes() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_SCOPES}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public Cursor fetchLocale() { + Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LOCALE}, null, null, null, null, null); + if (cursor != null) { + cursor.moveToFirst(); + } + return cursor; + } + + public void deleteWidget(int _id) { + this.database.delete(SQLiteHelper.TABLE_NAME_WIDGETS, "_id=" + _id, null); + } + + /*public void changeSettings(int _id, Map<String, String> map) { + ContentValues con = new ContentValues(); + for(Map.Entry<String, String> e: map.entrySet()){ + con.put(e.getKey(), e.getValue()); + } + this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, "_id = " + _id, null); + } + public void insertSettings(int _id, Map<String, String> map) { + ContentValues con = new ContentValues(); + for(Map.Entry<String, String> e: map.entrySet()){ + con.put(e.getKey(), e.getValue()); + //Log.d("Settings added", e.getKey() + " - " + e.getValue()); + } + this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con); + }*/ + + public void insertSelDay(int _id, int day_sel) { + ContentValues con = new ContentValues(); + con.put(SQLiteHelper._ID, _id); + con.put(SQLiteHelper.DAY_SEL, day_sel); + this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con); + } + + public int update(int _id, int day_sel) { + ContentValues con = new ContentValues(); + con.put(SQLiteHelper.DAY_SEL, day_sel); + return this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, SQLiteHelper._ID + " = " + _id, null); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java b/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java new file mode 100644 index 0000000..5944408 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java @@ -0,0 +1,36 @@ +package hu.refilc.naplo.database; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; + +public class SQLiteHelper extends SQLiteOpenHelper { + private static final String CREATE_TABLE_WIDGET = " create table widgets ( _id INTEGER NOT NULL, day_sel INTEGER NOT NULL);"; + private static final String DB_NAME = "app.db"; + private static final int DB_VERSION = 1; + public static final String _ID = "_id"; + public static final String DAY_SEL = "day_sel"; + public static final String TIMETABLE = "timetable"; + public static final String LAST_ACCOUNT_ID = "last_account_id"; + public static final String THEME = "theme"; + public static final String PREMIUM_TOKEN = "premium_token"; + public static final String PREMIUM_SCOPES = "premium_scopes"; + public static final String LOCALE = "language"; + public static final String ACCENT_COLOR = "accent_color"; + public static final String TABLE_NAME_WIDGETS = "widgets"; + public static final String TABLE_NAME_USER_DATA = "user_data"; + public static final String TABLE_NAME_SETTINGS = "settings"; + + public SQLiteHelper(Context context) { + super(context, DB_NAME, null, 7); + } + + public void onCreate(SQLiteDatabase db) { + db.execSQL(CREATE_TABLE_WIDGET); + } + + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + db.execSQL("DROP TABLE IF EXISTS widgets"); + onCreate(db); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java new file mode 100644 index 0000000..30f2a62 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java @@ -0,0 +1,36 @@ +package hu.refilc.naplo.utils; + +import android.content.Context; +import android.net.ConnectivityManager; +import android.net.NetworkInfo; + +import java.util.Calendar; +import java.util.Date; + +public class Utils { + public static boolean hasNetwork(Context context) { + ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); + NetworkInfo netInfo = cm.getActiveNetworkInfo(); + if (netInfo != null && netInfo.isConnectedOrConnecting()) { + return true; + } + return false; + } + + public static Date getWeekStartDate() { + Calendar calendar = Calendar.getInstance(); + while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) { + calendar.add(Calendar.DATE, -1); + } + return calendar.getTime(); + } + + public static Date getWeekEndDate() { + Calendar calendar = Calendar.getInstance(); + while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) { + calendar.add(Calendar.DATE, 1); + } + calendar.add(Calendar.DATE, -1); + return calendar.getTime(); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java new file mode 100644 index 0000000..9f62c3e --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java @@ -0,0 +1,65 @@ +package hu.refilc.naplo.utils; + +import java.time.DayOfWeek; +import java.time.Duration; +import java.time.LocalDate; + +public class Week { + private final LocalDate start; + private final LocalDate end; + + private Week(LocalDate start, LocalDate end) { + this.start = start; + this.end = end; + } + + public static Week current() { + return fromDate(LocalDate.now()); + } + + public static Week fromId(int id) { + LocalDate _now = getYearStart().plusDays(id * 7L); + return new Week(_now.minusDays(_now.getDayOfWeek().getValue() - 1), _now.plusDays(7 - _now.getDayOfWeek().getValue())); + } + + public static Week fromDate(LocalDate date) { + + return new Week(date.minusDays(date.getDayOfWeek().getValue() - 1), date.plusDays(7 - date.getDayOfWeek().getValue())); + } + + public Week next() { + return Week.fromDate(start.plusDays(8)); + } + + public int id() { + return (int) Math.ceil(Duration.between(getYearStart().atStartOfDay(), start.atStartOfDay()).toDays() / 7f); + } + + private static LocalDate getYearStart() { + LocalDate now = LocalDate.now(); + LocalDate start = getYearStart(now.getYear()); + return start.isBefore(now) ? start : getYearStart(now.getYear() -1); + } + + private static LocalDate getYearStart(int year) { + LocalDate time = LocalDate.of(year, 9, 1); + if (time.getDayOfWeek() == DayOfWeek.SATURDAY) + return time.plusDays(2); + else if (time.getDayOfWeek() == DayOfWeek.SUNDAY) + return time.plusDays(1); + return time; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Week week = (Week) o; + return this.id() == week.id(); + } + + @Override + public int hashCode() { + return id(); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java new file mode 100644 index 0000000..b433ec7 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java @@ -0,0 +1,392 @@ +package hu.refilc.naplo.widget_timetable; + +import android.app.PendingIntent; +import android.appwidget.AppWidgetManager; +import android.appwidget.AppWidgetProvider; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.database.Cursor; +import android.net.Uri; +import android.os.Build; +import android.util.Log; +import android.view.View; +import android.widget.RemoteViews; +import android.widget.Toast; + +import org.joda.time.DateTime; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.time.DayOfWeek; +import java.time.format.TextStyle; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import hu.refilc.naplo.database.DBManager; +import hu.refilc.naplo.MainActivity; +import hu.refilc.naplo.R; + +import hu.refilc.naplo.utils.Week; + +import static android.app.PendingIntent.FLAG_UPDATE_CURRENT; + +import es.antonborri.home_widget.HomeWidgetBackgroundIntent; +import es.antonborri.home_widget.HomeWidgetLaunchIntent; +import es.antonborri.home_widget.HomeWidgetProvider; + +public class WidgetTimetable extends HomeWidgetProvider { + + private static final String ACTION_WIDGET_CLICK_NAV_LEFT = "list_widget.ACTION_WIDGET_CLICK_NAV_LEFT"; + private static final String ACTION_WIDGET_CLICK_NAV_RIGHT = "list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT"; + private static final String ACTION_WIDGET_CLICK_NAV_TODAY = "list_widget.ACTION_WIDGET_CLICK_NAV_TODAY"; + private static final String ACTION_WIDGET_CLICK_NAV_REFRESH = "list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH"; + private static final String ACTION_WIDGET_CLICK_BUY_PREMIUM = "list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM"; + + @Override + public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, SharedPreferences widgetData) { + for (int i = 0; i < appWidgetIds.length; i++) { + RemoteViews views = generateView(context, appWidgetIds[i]); + + if(premiumEnabled(context) && userLoggedIn(context)) { + int rday = selectDay(context, appWidgetIds[i], 0, true); + views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday)); + } + + pushUpdate(context, views, appWidgetIds[i]); + } + } + + public static void pushUpdate(Context context, RemoteViews remoteViews, int appWidgetSingleId) { + AppWidgetManager manager = AppWidgetManager.getInstance(context); + + manager.updateAppWidget(appWidgetSingleId, remoteViews); + manager.notifyAppWidgetViewDataChanged(appWidgetSingleId, R.id.widget_list); + } + + public static RemoteViews generateView(Context context, int appId) { + Intent serviceIntent = new Intent(context, WidgetTimetableService.class); + serviceIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appId); + serviceIntent.setData(Uri.parse(serviceIntent.toUri(Intent.URI_INTENT_SCHEME))); + + RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_timetable); + + views.setViewVisibility(R.id.need_premium, View.GONE); + views.setViewVisibility(R.id.need_login, View.GONE); + views.setViewVisibility(R.id.tt_grid_cont, View.GONE); + + if(!userLoggedIn(context)) { + views.setViewVisibility(R.id.need_login, View.VISIBLE); + views.setOnClickPendingIntent(R.id.open_login, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId)); + } else if(premiumEnabled(context)) { + views.setViewVisibility(R.id.tt_grid_cont, View.VISIBLE); + views.setOnClickPendingIntent(R.id.nav_to_left, makePending(context, ACTION_WIDGET_CLICK_NAV_LEFT, appId)); + views.setOnClickPendingIntent(R.id.nav_to_right, makePending(context, ACTION_WIDGET_CLICK_NAV_RIGHT, appId)); + views.setOnClickPendingIntent(R.id.nav_current, makePending(context, ACTION_WIDGET_CLICK_NAV_TODAY, appId)); + views.setOnClickPendingIntent(R.id.nav_refresh, makePending(context, ACTION_WIDGET_CLICK_NAV_REFRESH, appId)); + views.setRemoteAdapter(R.id.widget_list, serviceIntent); + views.setEmptyView(R.id.widget_list, R.id.empty_view); + } else { + views.setViewVisibility(R.id.need_premium, View.VISIBLE); + views.setOnClickPendingIntent(R.id.buy_premium, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId)); + } + + return views; + } + + static PendingIntent makePending(Context context, String action, int appWidgetId) { + Intent activebtnnext = new Intent(context, WidgetTimetable.class); + activebtnnext.setAction(action); + activebtnnext.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); + return PendingIntent.getBroadcast(context, appWidgetId, activebtnnext , PendingIntent.FLAG_IMMUTABLE); + } + + @Override + public void onReceive(Context context, Intent intent) { + super.onReceive(context, intent); + + if(intent.hasExtra(AppWidgetManager.EXTRA_APPWIDGET_ID)) { + int appId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); + RemoteViews views = generateView(context, appId); + + try { + if(premiumEnabled(context) && userLoggedIn(context)) { + if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_LEFT)) { + int rday = selectDay(context, appId, -1, false); + views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday)); + + pushUpdate(context, views, appId); + } else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_RIGHT)) { + int rday = selectDay(context, appId, 1, false); + views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday)); + + pushUpdate(context, views, appId); + } else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_TODAY)) { + int rday = getToday(context); + setSelectedDay(context, appId, rday); + + views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday)); + + pushUpdate(context, views, appId); + } else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_REFRESH)) { + PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("timetable://refresh")); + pendingIntent.send(); + } else if (intent.getAction().equals("android.appwidget.action.APPWIDGET_DELETED")) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + dbManager.deleteWidget(appId); + dbManager.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + if(intent.getAction().equals(ACTION_WIDGET_CLICK_BUY_PREMIUM)) { + PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("settings://premium")); + pendingIntent.send(); + } + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + public static String convertDayOfWeek(Context context, int rday) { + + /*if(rday == -1) return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU")); + + String dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU"));*/ + + String dayOfWeek = "Unknown"; + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + Locale loc = getLocale(context); + + if (rday == -1) + return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, loc); + + dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, loc); + } + + return dayOfWeek.substring(0, 1).toUpperCase() + dayOfWeek.substring(1).toLowerCase(); + } + + public static void setSelectedDay(Context context, int wid, int day) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + dbManager.update(wid, day); + dbManager.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static int getToday(Context context) { + int rday = new DateTime().getDayOfWeek() - 1; + List<JSONArray> s = genJsonDays(context); + + try { + if(checkIsAfter(s, rday)) rday += 1; + } catch (Exception e) { + e.printStackTrace(); + } + return retDay(rday, s.size()); + } + + public static int selectDay(Context context, int wid, int add, Boolean afterSubjects) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + Cursor cursor = dbManager.fetchWidget(wid); + + List<JSONArray> s = genJsonDays(context); + int retday = new DateTime().getDayOfWeek() - 1; + + if(cursor.getCount() != 0) retday = retDay(cursor.getInt(1) + add, s.size()); + + if(afterSubjects) if(checkIsAfter(s, retday)) retday += 1; + retday = retDay(retday, s.size()); + + if(cursor.getCount() == 0) dbManager.insertSelDay(wid, retday); + else dbManager.update(wid, retday); + + dbManager.close(); + + return retday; + } catch (Exception e) { + e.printStackTrace(); + } + + return 0; + } + + public static Boolean checkIsAfter(List<JSONArray> s, int retday) throws Exception { + retday = retDay(retday, s.size()); + + String vegIdopont = s.get(retday).getJSONObject(s.get(retday).length() - 1).getString("VegIdopont"); + + return new DateTime().isAfter(new DateTime(vegIdopont)); + } + + public static int retDay(int retday, int size) { + if (retday < 0) retday = size - 1; + else if (retday > size - 1) retday = 0; + + return retday; + } + + public static List<JSONArray> genJsonDays(Context context) { + List<JSONArray> genDays = new ArrayList<>(); + Map<String, JSONArray> dayMap = new HashMap<>(); + + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + Cursor ct = dbManager.fetchTimetable(); + + if (ct.getCount() == 0) { + return genDays; + } + + JSONObject fetchedTimetable = new JSONObject(ct.getString(0)); + String currentWeek = String.valueOf(Week.current().id()); + JSONArray week = fetchedTimetable.getJSONArray(currentWeek); + + // Organize lessons into dates + for (int i = 0; i < week.length(); i++) { + try { + JSONObject entry = week.getJSONObject(i); + String date = entry.getString("Datum"); + dayMap.computeIfAbsent(date, k -> new JSONArray()).put(entry); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + genDays.addAll(dayMap.values()); + + // Sort the 'genDays' list of JSON based on the start time of the first entry + genDays.sort((day1, day2) -> { + try { + // Extract the start time of the first entry in each day's JSON + String startTime1 = day1.getJSONObject(0).getString("KezdetIdopont"); + String startTime2 = day2.getJSONObject(0).getString("KezdetIdopont"); + // Compare the start times and return the result for sorting + return startTime1.compareTo(startTime2); + } catch (JSONException e) { + e.printStackTrace(); + return 0; + } + }); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + dbManager.close(); + } + + return genDays; + } + + + + public static String zeroPad(int value, int padding){ + StringBuilder b = new StringBuilder(); + b.append(value); + while(b.length() < padding){ + b.insert(0,"0"); + } + return b.toString(); + } + + public static Locale getLocale(Context context) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + String loc = dbManager.fetchLocale().getString(0); + dbManager.close(); + + if(loc.equals("hu") || loc.equals("de")) { + return new Locale(loc, loc.toUpperCase()); + } + } catch (Exception e) { + e.printStackTrace(); + } + + return new Locale("en", "GB"); + } + + public static boolean premiumEnabled(Context context) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + String premium_token = dbManager.fetchPremiumToken().getString(0); + String premium_scopes_raw = dbManager.fetchPremiumScopes().getString(0); + dbManager.close(); + + JSONArray arr = new JSONArray(premium_scopes_raw); + List<String> premium_scopes = new ArrayList<>(); + for(int i = 0; i < arr.length(); i++){ + String scope = arr.getString(i); + premium_scopes.add(scope.substring(scope.lastIndexOf('.') + 1)); + } + + if(!premium_token.equals("") && (premium_scopes.contains("*") || premium_scopes.contains("TIMETALBE_WIDGET"))) { + return true; + } + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + public static boolean userLoggedIn(Context context) { + return !lastUserId(context).equals(""); + } + + public static String lastUserId(Context context) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + try { + dbManager.open(); + Cursor cursor = dbManager.fetchLastUser(); + dbManager.close(); + + if(cursor != null && !cursor.getString(0).equals("")) { + String last_user = cursor.getString(0); + return last_user; + } + } catch (Exception e) { + e.printStackTrace(); + } + + return ""; + } + + @Override + public void onEnabled(Context context) { + } + + @Override + public void onDisabled(Context context) { + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java new file mode 100644 index 0000000..55eaa98 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java @@ -0,0 +1,356 @@ +package hu.refilc.naplo.widget_timetable; + +import android.appwidget.AppWidgetManager; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.os.Build; +import android.util.Log; +import android.view.View; +import android.widget.RemoteViews; +import android.widget.RemoteViewsService; + +import org.joda.time.DateTime; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import hu.refilc.naplo.database.DBManager; +import hu.refilc.naplo.R; + +public class WidgetTimetableDataProvider implements RemoteViewsService.RemoteViewsFactory { + + private Context context; + private int appWidgetId; + + private int rday = 0; + + private int theme; + + private Integer[] colorValues; + + List<Lesson> day_subjects = new ArrayList<>(); + List<Integer> lessonIndexes = new ArrayList<>(); + + Item witem; + + /* Default values */ + + static class Item { + int Layout; + + int NumVisibility; + int NameVisibility; + int NameNodescVisibility; + int DescVisibility; + int RoomVisibility; + int TimeVisibility; + + int NumColor; + int NameColor; + int NameNodescColor; + int DescColor; + + Integer[] NameNodescPadding = {0, 0, 0, 0}; + + public Item(int Layout, int NumVisibility,int NameVisibility,int NameNodescVisibility,int DescVisibility,int RoomVisibility,int TimeVisibility,int NumColor,int NameColor,int NameNodescColor,int DescColor) { + this.Layout = Layout; + this.NumVisibility = NumVisibility; + this.NameVisibility = NameVisibility; + this.NameNodescVisibility = NameNodescVisibility; + this.DescVisibility = DescVisibility; + this.RoomVisibility = RoomVisibility; + this.TimeVisibility = TimeVisibility; + + this.NumColor = NumColor; + this.NameColor = NameColor; + this.NameNodescColor = NameNodescColor; + this.DescColor = DescColor; + } + } + + static class Lesson { + String status; + String lessonIndex; + String lessonName; + String lessonTopic; + String lessonRoom; + long lessonStart; + long lessonEnd; + String substituteTeacher; + + public Lesson(String status, String lessonIndex,String lessonName,String lessonTopic, String lessonRoom,long lessonStart,long lessonEnd,String substituteTeacher) { + this.status = status; + this.lessonIndex = lessonIndex; + this.lessonName = lessonName; + this.lessonTopic = lessonTopic; + this.lessonRoom = lessonRoom; + this.lessonStart = lessonStart; + this.lessonEnd = lessonEnd; + this.substituteTeacher = substituteTeacher; + } + } + + Integer[] itemNameNodescPadding = {0, 0, 0, 0}; + + public WidgetTimetableDataProvider(Context context, Intent intent) { + this.context = context; + this.appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); + + this.theme = getThemeAccent(context); + + this.colorValues = new Integer[]{R.color.filc, + R.color.blue_shade300, + R.color.green_shade300, + R.color.lime_shade300, + R.color.yellow_shade300, + R.color.orange_shade300, + R.color.red_shade300, + R.color.pink_shade300, + R.color.purple_shade300}; + + } + + @Override + public void onCreate() { + initData(); + } + + @Override + public void onDataSetChanged() { + initData(); + } + + @Override + public void onDestroy() { + + } + + @Override + public int getCount() { + + return day_subjects.size(); + } + + public void setLayout(final RemoteViews view) { + /* Visibilities */ + view.setViewVisibility(R.id.tt_item_num, witem.NumVisibility); + view.setViewVisibility(R.id.tt_item_name, witem.NameVisibility); + view.setViewVisibility(R.id.tt_item_name_nodesc, witem.NameNodescVisibility); + view.setViewVisibility(R.id.tt_item_desc, witem.DescVisibility); + view.setViewVisibility(R.id.tt_item_room, witem.RoomVisibility); + view.setViewVisibility(R.id.tt_item_time, witem.TimeVisibility); + + /* backgroundResources */ + view.setInt(R.id.main_lay, "setBackgroundResource", witem.Layout); + + /* Paddings */ + view.setViewPadding(R.id.tt_item_name_nodesc, witem.NameNodescPadding[0], witem.NameNodescPadding[1], witem.NameNodescPadding[2], witem.NameNodescPadding[3]); + + /* Text Colors */ + view.setInt(R.id.tt_item_num, "setTextColor", getColor(context, witem.NumColor)); + view.setInt(R.id.tt_item_name, "setTextColor", getColor(context, witem.NameColor)); + view.setInt(R.id.tt_item_name_nodesc, "setTextColor", getColor(context, witem.NameNodescColor)); + view.setInt(R.id.tt_item_desc, "setTextColor", getColor(context, witem.DescColor)); + } + + public int getColor(Context context, int color) { + return context.getResources().getColor(color); + } + + @Override + public RemoteViews getViewAt(int position) { + RemoteViews view = new RemoteViews(context.getPackageName(), R.layout.timetable_item); + + witem = defaultItem(theme); + + Lesson curr_subject = day_subjects.get(position); + + if (curr_subject.status.equals("empty")) { + witem.NumColor = R.color.text_miss_num; + + witem.TimeVisibility = View.GONE; + witem.RoomVisibility = View.GONE; + + witem.NameNodescColor = R.color.text_miss; + } + + if (!curr_subject.substituteTeacher.equals("null")) { + witem.NumColor = R.color.yellow; + witem.Layout = R.drawable.card_layout_tile_helyetesitett; + } + + if (curr_subject.status.equals("Elmaradt")) { + witem.NumColor = R.color.red; + witem.Layout = R.drawable.card_layout_tile_elmarad; + } else if (curr_subject.status.equals("TanevRendjeEsemeny")) { + witem.NumVisibility = View.GONE; + witem.TimeVisibility = View.GONE; + witem.RoomVisibility = View.GONE; + + witem.NameNodescPadding[0] = 50; + witem.NameNodescPadding[2] = 50; + + witem.NameNodescColor = R.color.text_miss; + } + + if (curr_subject.lessonTopic.equals("null")) { + witem.DescVisibility = View.GONE; + witem.NameVisibility = View.GONE; + + witem.NameNodescVisibility = View.VISIBLE; + } + + setLayout(view); + + String lessonIndexTrailing = curr_subject.lessonIndex.equals("+") ? "" : "."; + + view.setTextViewText(R.id.tt_item_num, curr_subject.lessonIndex + lessonIndexTrailing); + view.setTextViewText(R.id.tt_item_name, curr_subject.lessonName); + view.setTextViewText(R.id.tt_item_name_nodesc, curr_subject.lessonName); + view.setTextViewText(R.id.tt_item_desc, curr_subject.lessonTopic); + view.setTextViewText(R.id.tt_item_room, curr_subject.lessonRoom); + if(curr_subject.lessonStart != 0 && curr_subject.lessonEnd != 0) + view.setTextViewText(R.id.tt_item_time, WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getMinuteOfHour(), 2) + + "\n" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getMinuteOfHour(),2)); + + return view; + } + + @Override + public RemoteViews getLoadingView() { + return null; + } + + @Override + public int getViewTypeCount() { + return 1; + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public boolean hasStableIds() { + return true; + } + + private void initData() { + + theme = getThemeAccent(context); + + rday = WidgetTimetable.selectDay(context, appWidgetId, 0, false); + + day_subjects.clear(); + lessonIndexes.clear(); + + try { + List<JSONArray> arr = WidgetTimetable.genJsonDays(context); + + if(arr.isEmpty()) { + return; + } + JSONArray arr_lessons = WidgetTimetable.genJsonDays(context).get(rday); + + for (int i = 0; i < arr_lessons.length(); i++) { + JSONObject obj_lessons = arr_lessons.getJSONObject(i); + + day_subjects.add(jsonToLesson(obj_lessons)); + } + } catch (JSONException e) { + e.printStackTrace(); + } + + if(day_subjects.size() > 0) { + Collections.sort(day_subjects, new Comparator<Lesson>() { + public int compare(Lesson o1, Lesson o2) { + return new DateTime(o1.lessonStart).compareTo(new DateTime(o2.lessonStart)); + } + }); + + for (int i = 0; i < day_subjects.size(); i++) { + if(!day_subjects.get(i).lessonIndex.equals("+")) { + lessonIndexes.add(Integer.valueOf(day_subjects.get(i).lessonIndex)); + } + } + + if(lessonIndexes.size() > 0) { + + int lessonsChecked = Collections.min(lessonIndexes); + int i = 0; + + while(lessonsChecked < Collections.max(lessonIndexes)) { + if(!lessonIndexes.contains(lessonsChecked)) { + day_subjects.add(i, emptyLesson(lessonsChecked)); + } + lessonsChecked++; + i++; + } + } + } + } + + public static Integer getThemeAccent(Context context) { + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + Cursor cursor = dbManager.fetchTheme(); + dbManager.close(); + + return cursor.getInt(1); + } catch (Exception e) { + e.printStackTrace(); + } + + return 0; + } + + public Item defaultItem(int theme) { + return new Item( + R.drawable.card_layout_tile, + View.VISIBLE, + View.VISIBLE, + View.INVISIBLE, + View.VISIBLE, + View.VISIBLE, + View.VISIBLE, + colorValues[theme >= colorValues.length ? 0 : theme], + R.color.text, + R.color.text, + R.color.text_desc + ); + } + + public Lesson emptyLesson(int lessonIndex) { + return new Lesson("empty", String.valueOf(lessonIndex), "Lyukasóra", "null", "null", 0, 0, "null"); + } + + public Lesson jsonToLesson(JSONObject json) { + try { + String name = json.getString("Nev"); + name = name.substring(0, 1).toUpperCase() + name.substring(1); // Capitalize name + return new Lesson( + json.getJSONObject("Allapot").getString("Nev"), + !json.getString("Oraszam").equals("null") ? json.getString("Oraszam") : "+", + name, + json.getString("Tema"), + json.getString("TeremNeve"), + new DateTime(json.getString("KezdetIdopont")).getMillis(), + new DateTime(json.getString("VegIdopont")).getMillis(), + json.getString("HelyettesTanarNeve") + ); + }catch (Exception e) { + Log.d("Filc", "exception: " + e); + }; + + return null; + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java new file mode 100644 index 0000000..1864174 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java @@ -0,0 +1,12 @@ +package hu.refilc.naplo.widget_timetable; + +import android.content.Intent; +import android.os.Build; +import android.widget.RemoteViewsService; + +public class WidgetTimetableService extends RemoteViewsService { + @Override + public RemoteViewsFactory onGetViewFactory(Intent intent) { + return new WidgetTimetableDataProvider(getApplicationContext(), intent); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 0000000..90dcb8d --- /dev/null +++ b/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,189 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new com.example.android_dynamic_icon.AndroidDynamicIconPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin android_dynamic_icon, com.example.android_dynamic_icon.AndroidDynamicIconPlugin", e); + } + try { + flutterEngine.getPlugins().add(new me.wolszon.app_group_directory.AppGroupDirectoryPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin app_group_directory, me.wolszon.app_group_directory.AppGroupDirectoryPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin background_fetch, com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.material.plugins.dynamic_color.DynamicColorPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin dynamic_color, io.material.plugins.dynamic_color.DynamicColorPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin file_picker, com.mr.flutter.plugin.filepicker.FilePickerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_any_logo, com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_custom_tabs_android, com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.ajinasokan.flutterdisplaymode.DisplayModePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_displaymode, com.ajinasokan.flutterdisplaymode.DisplayModePlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_dynamic_icon, io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.fluttercandies.flutter_image_compress.ImageCompressPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_image_compress_common, com.fluttercandies.flutter_image_compress.ImageCompressPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_local_notifications, com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.flutternativeimage.FlutterNativeImagePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_native_image, com.example.flutternativeimage.FlutterNativeImagePlugin", e); + } + try { + flutterEngine.getPlugins().add(new net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_native_splash, net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin google_sign_in_android, io.flutter.plugins.googlesignin.GoogleSignInPlugin", e); + } + try { + flutterEngine.getPlugins().add(new es.antonborri.home_widget.HomeWidgetPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin home_widget, es.antonborri.home_widget.HomeWidgetPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.lykhonis.imagecrop.ImageCropPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_crop, com.lykhonis.imagecrop.ImageCropPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.imagegallerysaver.ImageGallerySaverPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_gallery_saver, com.example.imagegallerysaver.ImageGallerySaverPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_picker_android, io.flutter.plugins.imagepicker.ImagePickerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.flutter_live_activities.FlutterLiveActivitiesPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin live_activities, com.flutter_live_activities.FlutterLiveActivitiesPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.maps_launcher.MapsLauncherPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin maps_launcher, com.example.maps_launcher.MapsLauncherPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.crazecoder.openfile.OpenFilePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin open_filex, com.crazecoder.openfile.OpenFilePlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin package_info_plus, dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.baseflow.permissionhandler.PermissionHandlerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin permission_handler_android, com.baseflow.permissionhandler.PermissionHandlerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.quickactions.QuickActionsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin quick_actions_android, io.flutter.plugins.quickactions.QuickActionsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new app.rive.rive.RivePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin rive_common, app.rive.rive.RivePlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.share.SharePlusPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin share_plus, dev.fluttercommunity.plus.share.SharePlusPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.flutter.stripe.StripeAndroidPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin stripe_android, com.flutter.stripe.StripeAndroidPlugin", e); + } + try { + flutterEngine.getPlugins().add(new name.avioli.unilinks.UniLinksPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin uni_links, name.avioli.unilinks.UniLinksPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.workmanager.WorkmanagerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin workmanager, dev.fluttercommunity.workmanager.WorkmanagerPlugin", e); + } + } +} diff --git a/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..314c878 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..f180cf9 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/splash.png b/refilc/android/app/src/main/res/drawable-hdpi/splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png b/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png new file mode 100644 index 0000000..77f4ef2 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..aa13b85 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..b6b25d1 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/splash.png b/refilc/android/app/src/main/res/drawable-mdpi/splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml new file mode 100644 index 0000000..62d6723 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml @@ -0,0 +1,13 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M20,6l-11,11l-5,-5" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml new file mode 100644 index 0000000..01e9d40 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml @@ -0,0 +1,13 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M15,18l-6,-6l6,-6" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml new file mode 100644 index 0000000..c1e9015 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml @@ -0,0 +1,13 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M9,18l6,-6l-6,-6" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml new file mode 100644 index 0000000..cc3690b --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml @@ -0,0 +1,13 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M12,2.69l5.66,5.66a8,8 0,1 1,-11.31 0z" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml new file mode 100644 index 0000000..273720c --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml @@ -0,0 +1,13 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M12,2l7,19l-7,-4l-7,4l7,-19z" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml new file mode 100644 index 0000000..f2365a8 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml @@ -0,0 +1,27 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M23,4l0,6l-6,0" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> + <path + android:pathData="M1,20l0,-6l6,0" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> + <path + android:pathData="M3.51,9a9,9 0,0 1,14.85 -3.36L23,10M1,14l4.64,4.36A9,9 0,0 0,20.49 15" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#ff141516" + android:strokeLineCap="round"/> +</vector> diff --git a/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml b/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml new file mode 100644 index 0000000..785445c --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?><!-- +Background for widgets to make the rounded corners based on the +appWidgetRadius attribute value +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <corners android:radius="?attr/appWidgetRadius" /> + <solid android:color="?android:attr/colorBackground" /> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml b/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml new file mode 100644 index 0000000..007e287 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?><!-- +Background for views inside widgets to make the rounded corners based on the +appWidgetInnerRadius attribute value +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <corners android:radius="?attr/appWidgetInnerRadius" /> + <solid android:color="?android:attr/colorAccent" /> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-v21/background.png b/refilc/android/app/src/main/res/drawable-v21/background.png new file mode 100644 index 0000000..d90316e Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-v21/background.png differ diff --git a/refilc/android/app/src/main/res/drawable-v21/launch_background.xml b/refilc/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <bitmap android:gravity="fill" android:src="@drawable/background"/> + </item> + <item> + <bitmap android:gravity="center" android:src="@drawable/splash"/> + </item> +</layer-list> diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml new file mode 100644 index 0000000..860b811 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/white"/> + <stroke android:width="1dp" android:color="#D8E0E1" /> + <corners android:radius="10dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml new file mode 100644 index 0000000..6466eba --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#00FFFFFF"/> + <corners android:radius="10dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml new file mode 100644 index 0000000..426d5c1 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/light_red"/> + <corners android:radius="10dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml new file mode 100644 index 0000000..6e5cbff --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/light_yellow"/> + <corners android:radius="10dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..a83f396 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..7c96a2f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xhdpi/splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png b/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png new file mode 100644 index 0000000..7f61c65 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml new file mode 100644 index 0000000..8a99162 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/highlight_light"/> + <stroke android:width="1dp" android:color="@color/highlight_light" /> + <corners android:bottomLeftRadius="14dp" android:bottomRightRadius="14dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml new file mode 100644 index 0000000..2551ee3 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/highlight"/> + <stroke android:width="1dp" android:color="@color/highlight" /> + <corners android:bottomLeftRadius="14dp" android:bottomRightRadius="14dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml new file mode 100644 index 0000000..e0e9376 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/highlight_light"/> + <stroke android:width="1dp" android:color="@color/highlight_light" /> + <corners android:topLeftRadius="14dp" android:topRightRadius="14dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml new file mode 100644 index 0000000..4bbd0bb --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/highlight"/> + <stroke android:width="1dp" android:color="@color/highlight" /> + <corners android:topLeftRadius="14dp" android:topRightRadius="14dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/> +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml new file mode 100644 index 0000000..a8f281e --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" > + + <!--<gradient + android:angle="45" + android:endColor="@color/filc" + android:startColor="@color/filc" />--> + + <solid android:color="@color/highlight_light"/> + + <corners android:radius="12dp" /> + <size android:width="2dp"/> + <padding + android:left="0.5dp" + android:right="0.5dp" /> + +</shape> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..1de7a46 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..b8b19e7 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..beeae31 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..dd12562 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable/background.png b/refilc/android/app/src/main/res/drawable/background.png new file mode 100644 index 0000000..d90316e Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/background.png differ diff --git a/refilc/android/app/src/main/res/drawable/btn_shape.xml b/refilc/android/app/src/main/res/drawable/btn_shape.xml new file mode 100644 index 0000000..d91b3b2 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/btn_shape.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true"> + <shape android:shape="rectangle"> + <solid android:color="#ffE0CCEC"></solid> + <corners android:radius="10dp" /> + </shape> + </item> + + <item> + <shape android:shape="rectangle"> + <gradient android:endColor="#ffE0CCEC" android:startColor="#ffC9ABDC" /> + <corners android:radius="10dp" /> + </shape> + </item> + +</selector> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable/btn_shape_login.xml b/refilc/android/app/src/main/res/drawable/btn_shape_login.xml new file mode 100644 index 0000000..22c1d8f --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/btn_shape_login.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true"> + <shape android:shape="rectangle"> + <solid android:color="#ff1D8868"></solid> + <corners android:radius="10dp" /> + </shape> + </item> + + <item> + <shape android:shape="rectangle"> + <gradient android:endColor="#ff1D8868" android:startColor="#ff1EA18F" /> + <corners android:radius="10dp" /> + </shape> + </item> + +</selector> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable/ic_absences.png b/refilc/android/app/src/main/res/drawable/ic_absences.png new file mode 100644 index 0000000..97d6a2d Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_absences.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_grades.png b/refilc/android/app/src/main/res/drawable/ic_grades.png new file mode 100644 index 0000000..4528dd0 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_grades.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_home.png b/refilc/android/app/src/main/res/drawable/ic_home.png new file mode 100644 index 0000000..1321435 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_home.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_messages.png b/refilc/android/app/src/main/res/drawable/ic_messages.png new file mode 100644 index 0000000..e6b5178 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_messages.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_notification.png b/refilc/android/app/src/main/res/drawable/ic_notification.png new file mode 100644 index 0000000..67fd370 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_notification.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_timetable.png b/refilc/android/app/src/main/res/drawable/ic_timetable.png new file mode 100644 index 0000000..71a4621 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_timetable.png differ diff --git a/refilc/android/app/src/main/res/drawable/launch_background.xml b/refilc/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <bitmap android:gravity="fill" android:src="@drawable/background"/> + </item> + <item> + <bitmap android:gravity="center" android:src="@drawable/splash"/> + </item> +</layer-list> diff --git a/refilc/android/app/src/main/res/font/montserrat_medium.ttf b/refilc/android/app/src/main/res/font/montserrat_medium.ttf new file mode 100644 index 0000000..6e079f6 Binary files /dev/null and b/refilc/android/app/src/main/res/font/montserrat_medium.ttf differ diff --git a/refilc/android/app/src/main/res/ic_launcher-web.png b/refilc/android/app/src/main/res/ic_launcher-web.png new file mode 100644 index 0000000..25ed396 Binary files /dev/null and b/refilc/android/app/src/main/res/ic_launcher-web.png differ diff --git a/refilc/android/app/src/main/res/layout/home_widget_test.xml b/refilc/android/app/src/main/res/layout/home_widget_test.xml new file mode 100644 index 0000000..f0a315a --- /dev/null +++ b/refilc/android/app/src/main/res/layout/home_widget_test.xml @@ -0,0 +1,26 @@ + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="8dp" + android:orientation="vertical" + android:background="@drawable/app_widget_background" + android:padding="8dp" + android:id="@+id/widget_container"> + + <TextView + android:id="@+id/widget_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="36sp" + android:textStyle="bold" + tools:text="Title" /> + + <TextView + android:id="@+id/widget_message" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="18sp" + tools:text="Message" /> +</LinearLayout> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/layout/timetable_item.xml b/refilc/android/app/src/main/res/layout/timetable_item.xml new file mode 100644 index 0000000..f057d2d --- /dev/null +++ b/refilc/android/app/src/main/res/layout/timetable_item.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:id="@+id/main_lay" + android:layout_height="50dp" + android:paddingTop="0dp" + android:paddingBottom="0dp" + android:layout_marginTop="2.5dp" + android:layout_marginBottom="2.5dp" + android:layout_marginLeft="7.5dp" + android:layout_marginRight="7.5dp" + android:background="@drawable/card_layout_tile"> + + <TextView + android:id="@+id/tt_item_num" + android:layout_width="50dp" + android:layout_height="match_parent" + android:fontFamily="@font/montserrat_medium" + android:gravity="center" + android:text="1." + android:textColor="@color/filc" + android:textColorLink="#ff3D7BF4" + android:textSize="30sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + <TextView + android:id="@+id/tt_item_name" + android:layout_width="match_parent" + android:layout_height="20dp" + android:textSize="15.5sp" + android:textFontWeight="700" + android:fontFamily="@font/montserrat_medium" + android:layout_marginTop="2.5dp" + android:text="Óra neve" + android:maxLines="1" + android:ellipsize="end" + android:layout_toStartOf="@id/tt_item_room" + android:gravity="center_vertical" + android:layout_toEndOf="@id/tt_item_num" + android:textColor="@color/text" + tools:ignore="HardcodedText" /> + + <TextView + android:id="@+id/tt_item_name_nodesc" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:textSize="15.5sp" + android:textStyle="bold" + android:fontFamily="@font/montserrat_medium" + android:visibility="gone" + android:layout_marginTop="2.5dp" + android:layout_toStartOf="@id/tt_item_room" + android:text="Óra neve" + android:maxLines="1" + android:ellipsize="end" + android:gravity="center_vertical" + android:layout_toEndOf="@id/tt_item_num" + android:textColor="@color/text" + tools:ignore="HardcodedText" /> + + <TextView + android:id="@+id/tt_item_desc" + android:layout_width="match_parent" + android:layout_height="20dp" + android:textSize="14sp" + android:textStyle="bold" + android:textFontWeight="600" + android:fontFamily="@font/montserrat_medium" + android:text="Óra leírása" + android:maxLines="1" + android:ellipsize="end" + android:gravity="center_vertical" + android:layout_toEndOf="@id/tt_item_num" + android:layout_toStartOf="@id/tt_item_room" + android:layout_below="@id/tt_item_name" + android:textColor="@color/text_desc" + tools:ignore="HardcodedText" /> + + <TextView + android:id="@+id/tt_item_room" + android:layout_width="40dp" + android:layout_height="match_parent" + android:textSize="14sp" + android:textFontWeight="500" + android:fontFamily="@font/montserrat_medium" + android:textStyle="bold" + android:text="56." + android:ellipsize="end" + android:maxLines="2" + android:gravity="center" + android:layout_toStartOf="@id/tt_item_time" + android:textColor="@color/text_desc" + tools:ignore="HardcodedText" /> + + <TextView + android:id="@+id/tt_item_time" + android:layout_width="50dp" + android:layout_height="match_parent" + android:textSize="14sp" + android:textFontWeight="500" + android:fontFamily="@font/montserrat_medium" + android:textStyle="bold" + android:layout_marginStart="2dp" + android:layout_marginTop="-2dp" + android:text="8:30\n9:10" + android:gravity="center" + android:layout_alignParentEnd="true" + android:textColor="@color/white" + tools:ignore="HardcodedText" /> + +</RelativeLayout> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/layout/widget_timetable.xml b/refilc/android/app/src/main/res/layout/widget_timetable.xml new file mode 100644 index 0000000..5c34517 --- /dev/null +++ b/refilc/android/app/src/main/res/layout/widget_timetable.xml @@ -0,0 +1,232 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:tools="http://schemas.android.com/tools" + android:layout_margin="@dimen/widget_margin"> + + <RelativeLayout + android:id="@+id/tt_grid_cont" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:backgroundTint="#00000000" + android:background="@drawable/card_layout_bg" + android:orientation="vertical"> + + + <TextView + android:id="@+id/empty_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:text="Üres / Empty" + android:background="@drawable/widget_card_bottom_dark" + android:textColor="@color/text" + android:textSize="20sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + <ListView + android:id="@+id/widget_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_below="@id/bottom_nav" + android:layout_marginTop="-8dp" + android:background="@drawable/widget_card_bottom_dark" + android:divider="#00000000" + android:paddingTop="5dp" + android:paddingBottom="16dp" + android:scrollbarFadeDuration="150" + android:scrollbarSize="10dp" + android:scrollbarThumbVertical="@drawable/widget_scroll_style" /> + + <RelativeLayout + android:id="@+id/bottom_nav" + android:layout_width="match_parent" + android:layout_height="45dp" + android:background="@drawable/widget_card_top_dark"> + + <ImageView + android:id="@+id/nav_refresh" + android:layout_width="40dp" + android:layout_height="match_parent" + android:layout_toStartOf="@id/nav_to_left" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + android:padding="10dp" + android:src="@drawable/ic_refresh_cw" + android:tint="@color/text_desc" + tools:ignore="UseAppTint" + android:focusable="true" /> + + <ImageView + android:id="@+id/nav_to_left" + android:layout_width="45dp" + android:layout_height="match_parent" + android:layout_toStartOf="@id/nav_to_right" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + android:padding="10dp" + android:src="@drawable/ic_chevron_left" + android:tint="@color/text_desc" + tools:ignore="UseAppTint" + android:focusable="true" /> + + <ImageView + android:id="@+id/nav_to_right" + android:layout_width="45dp" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:layout_marginEnd="5dp" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + android:padding="10dp" + android:src="@drawable/ic_chevron_right" + android:tint="@color/text_desc" + tools:ignore="UseAppTint" + android:focusable="true" /> + + <TextView + android:id="@+id/nav_current" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_marginStart="15sp" + android:layout_marginTop="2sp" + android:layout_toStartOf="@id/nav_refresh" + android:fontFamily="@font/montserrat_medium" + android:gravity="center_vertical" + android:maxLines="1" + android:text="Órarend" + android:textColor="@color/text" + android:textSize="22sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + </RelativeLayout> + </RelativeLayout> + + <RelativeLayout + android:visibility="gone" + android:id="@+id/need_login" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:backgroundTint="#ffF4F4F4" + android:background="@drawable/card_layout_bg" + android:orientation="vertical" > + + <!--<ImageView + android:layout_width="45dp" + android:layout_height="45dp" + android:paddingHorizontal="10dp" + android:paddingTop="5dp" + android:src="@drawable/tinta_icon" />--> + + <ImageView + android:id="@+id/iv_1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:adjustViewBounds="true" + android:paddingHorizontal="10dp" + android:paddingTop="10dp" + android:src="@drawable/tinta_image" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/iv_1" + android:layout_marginHorizontal="15dp" + android:fontFamily="@font/montserrat_medium" + android:text="A widget használatához bejelentkezés szükséges." + android:textColor="@color/black" + android:paddingTop="10dp" + android:textSize="17sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + <Button + android:id="@+id/open_login" + android:layout_width="match_parent" + android:layout_height="40dp" + android:layout_alignParentBottom="true" + android:background="@drawable/btn_shape_login" + android:text="Alkalmazás megnyitása" + android:padding="0dp" + android:layout_margin="10dp" + android:textColor="@color/white" + android:fontFamily="@font/montserrat_medium" + android:textSize="16sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + </RelativeLayout> + + <RelativeLayout + android:visibility="gone" + android:id="@+id/need_premium" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:backgroundTint="#ffF4F4F4" + android:background="@drawable/card_layout_bg" + android:orientation="vertical" > + + <!--<ImageView + android:layout_width="45dp" + android:layout_height="45dp" + android:paddingHorizontal="10dp" + android:paddingTop="5dp" + android:src="@drawable/tinta_icon" />--> + + <ImageView + android:id="@+id/iv_2" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:adjustViewBounds="true" + android:paddingHorizontal="10dp" + android:paddingTop="10dp" + android:src="@drawable/tinta_image" /> + + <TextView + android:id="@+id/tw_1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/iv_2" + android:layout_marginHorizontal="15dp" + android:fontFamily="@font/montserrat_medium" + android:text="Órák a kezdőképernyőd kényelméből." + android:textColor="@color/black" + android:paddingTop="10dp" + android:textSize="16sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/tw_1" + android:fontFamily="@font/montserrat_medium" + android:text="Támogass Tinta szinten és helyezz egy widgetet a kezdőképernyődre." + android:textColor="@color/black" + android:layout_marginTop="0dp" + android:layout_marginHorizontal="15dp" + android:textSize="14sp" + tools:ignore="HardcodedText" /> + + <Button + android:id="@+id/buy_premium" + android:layout_width="match_parent" + android:layout_height="40dp" + android:background="@drawable/btn_shape" + android:gravity="center" + android:text="Vigyél oda!" + android:padding="0dp" + android:layout_alignParentBottom="true" + android:layout_margin="10dp" + android:textColor="#ff691A9B" + android:fontFamily="@font/montserrat_medium" + android:textSize="16sp" + android:textStyle="bold" + tools:ignore="HardcodedText" /> + + </RelativeLayout> + +</RelativeLayout> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..4b7da89 --- /dev/null +++ b/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@drawable/ic_launcher_foreground"/> + <monochrome android:drawable="@mipmap/ic_launcher_monochrome" /> +</adaptive-icon> diff --git a/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..456e2d5 --- /dev/null +++ b/refilc/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@mipmap/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> + <monochrome android:drawable="@mipmap/ic_launcher_monochrome" /> +</adaptive-icon> diff --git a/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..7144abf Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..75d1236 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..41776f7 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..135f9f0 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..0e55b88 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..e76b647 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..9f106fe Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..f5106b5 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..83ad190 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..ab6de10 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..d0ecde3 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..180d66c Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..26c3c81 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..9f7dba9 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..e65a7c7 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..27ebd1f Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..9ef3354 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..bcd2541 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..a6d9eab Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..9a3da37 Binary files /dev/null and b/refilc/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/refilc/android/app/src/main/res/playstore-icon.png b/refilc/android/app/src/main/res/playstore-icon.png new file mode 100644 index 0000000..25ed396 Binary files /dev/null and b/refilc/android/app/src/main/res/playstore-icon.png differ diff --git a/refilc/android/app/src/main/res/values-night-v31/styles.xml b/refilc/android/app/src/main/res/values-night-v31/styles.xml new file mode 100644 index 0000000..67c1d39 --- /dev/null +++ b/refilc/android/app/src/main/res/values-night-v31/styles.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> + <style name="LaunchTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> + <item name="android:forceDarkAllowed">false</item> + <item name="android:windowFullscreen">false</item> + <item name="android:windowDrawsSystemBarBackgrounds">false</item> + <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> + <item name="android:windowSplashScreenBackground">#3D7BF4</item> + <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item> + </style> + <!-- Theme applied to the Android Window as soon as the process has started. + This theme determines the color of the Android Window while your + Flutter UI initializes, as well as behind your Flutter UI while its + running. + + This Theme is only used starting with V2 of Flutter's Android embedding. --> + <style name="NormalTheme" parent="Theme.MaterialComponents"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> +</resources> diff --git a/refilc/android/app/src/main/res/values-night-v31/themes.xml b/refilc/android/app/src/main/res/values-night-v31/themes.xml new file mode 100644 index 0000000..f253c9d --- /dev/null +++ b/refilc/android/app/src/main/res/values-night-v31/themes.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- + Having themes.xml for night-v31 because of the priority order of the resource qualifiers. + --> + <style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight"> + <item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item> + <item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item> + </style> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values-night/styles.xml b/refilc/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..3af5c05 --- /dev/null +++ b/refilc/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> + <style name="LaunchTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> + <!-- Show a splash screen on the activity. Automatically removed when + Flutter draws its first frame --> + <item name="android:windowBackground">@drawable/launch_background</item> + <item name="android:windowFullscreen">false</item> + </style> + <!-- Theme applied to the Android Window as soon as the process has started. + This theme determines the color of the Android Window while your + Flutter UI initializes, as well as behind your Flutter UI while its + running. + + This Theme is only used starting with V2 of Flutter's Android embedding. --> + <style name="NormalTheme" parent="Theme.MaterialComponents"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values-v31/styles.xml b/refilc/android/app/src/main/res/values-v31/styles.xml new file mode 100644 index 0000000..0d96965 --- /dev/null +++ b/refilc/android/app/src/main/res/values-v31/styles.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> + <style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar"> + <item name="android:forceDarkAllowed">false</item> + <item name="android:windowFullscreen">false</item> + <item name="android:windowDrawsSystemBarBackgrounds">false</item> + <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> + <item name="android:windowSplashScreenBackground">#3D7BF4</item> + <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item> + </style> + <!-- Theme applied to the Android Window as soon as the process has started. + This theme determines the color of the Android Window while your + Flutter UI initializes, as well as behind your Flutter UI while its + running. + + This Theme is only used starting with V2 of Flutter's Android embedding. --> + <style name="NormalTheme" parent="Theme.MaterialComponents"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> +</resources> diff --git a/refilc/android/app/src/main/res/values-v31/themes.xml b/refilc/android/app/src/main/res/values-v31/themes.xml new file mode 100644 index 0000000..badd306 --- /dev/null +++ b/refilc/android/app/src/main/res/values-v31/themes.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- + Having themes.xml for v31 variant because @android:dimen/system_app_widget_background_radius + and @android:dimen/system_app_widget_internal_padding requires API level 31 + --> + <style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight"> + <item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item> + <item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item> + </style> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values/attrs.xml b/refilc/android/app/src/main/res/values/attrs.xml new file mode 100644 index 0000000..7781ac8 --- /dev/null +++ b/refilc/android/app/src/main/res/values/attrs.xml @@ -0,0 +1,7 @@ +<resources> + <declare-styleable name="AppWidgetAttrs"> + <attr name="appWidgetPadding" format="dimension" /> + <attr name="appWidgetInnerRadius" format="dimension" /> + <attr name="appWidgetRadius" format="dimension" /> + </declare-styleable> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values/colors.xml b/refilc/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..e0e5c17 --- /dev/null +++ b/refilc/android/app/src/main/res/values/colors.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="ic_launcher_background">#3D7BF4</color> + + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> + <color name="light_blue_50">#FFE1F5FE</color> + <color name="light_blue_200">#FF81D4FA</color> + <color name="light_blue_600">#FF039BE5</color> + <color name="light_blue_900">#FF01579B</color> + + <color name="shadow_light">#ffE8E8E8</color> + <color name="text_light">#000000</color> + <color name="text_desc_light">#B9B9B9</color> + <color name="text_desc_dark_light">#B9B9B9</color> + <color name="text_miss_light">#888C8F</color> + <color name="background_light">#ffF4F9FF</color> + <color name="highlight_light">#ffFFFFFF</color> + <color name="red_light">#ffFF3B30</color> + <color name="light_red_light">#40FF3B30</color> + <color name="orange_light">#ffFF9500</color> + <color name="yellow_light">#ffFFCC00</color> + <color name="light_yellow_light">#40FFD60A</color> + <color name="green_light">#ff34C759</color> + <color name="filc_light">#ff3D7BF4</color> + <color name="teal_light">#ff5AC8FA</color> + <color name="blue_light">#ff007AFF</color> + <color name="indigo_light">#ff5856D6</color> + <color name="purple_light">#ffAF52DE</color> + <color name="pink_light">#ffFF2D55</color> + + <!-- dark --> + + <color name="shadow">#000</color> + <color name="text">#FFFFFFFF</color> + <color name="text_desc">#B9B9B9</color> + <color name="text_miss">#93979A</color> + <color name="text_miss_num">#A1A5A8</color> + <color name="background">#ff000000</color> + <color name="highlight">#ff141516</color> + <color name="red">#ffFF453A</color> + <color name="light_red">#40FF453A</color> + <color name="orange">#ffFF9F0A</color> + <color name="yellow">#ffFFD60A</color> + <color name="light_yellow">#40FFD60A</color> + <color name="green">#ff32D74B</color> + <color name="filc">#ff3D7BF4</color> + <color name="teal">#ff64D2FF</color> + <color name="blue">#ff0A84FF</color> + <color name="indigo">#ff5E5CE6</color> + <color name="purple">#ffBF5AF2</color> + <color name="pink">#ffFF375F</color> + + <color name="blue_shade300">#FF64B5F6</color> + <color name="green_shade300">#FF81C784</color> + <color name="lime_shade300">#FFDCE775</color> + <color name="yellow_shade300">#FFFFF176</color> + <color name="orange_shade300">#FFFF8A65</color> + <color name="red_shade300">#FFE57373</color> + <color name="pink_shade300">#FFF06292</color> + <color name="purple_shade300">#FFBA68C8</color> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values/dimens.xml b/refilc/android/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..4db8c59 --- /dev/null +++ b/refilc/android/app/src/main/res/values/dimens.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <!-- +Refer to App Widget Documentation for margin information +http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout + --> + <dimen name="widget_margin">0dp</dimen> + +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values/strings.xml b/refilc/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..3a76198 --- /dev/null +++ b/refilc/android/app/src/main/res/values/strings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="appwidget_text">Órarend Widget</string> + <string name="add_widget">Add widget</string> + <string name="app_widget_description">Mindig lásd, milyen órád lesz, a kezdőképernyőd kényelméből.</string> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/values/styles.xml b/refilc/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..84f2e34 --- /dev/null +++ b/refilc/android/app/src/main/res/values/styles.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> + <style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar"> + <!-- Show a splash screen on the activity. Automatically removed when + Flutter draws its first frame --> + <item name="android:windowBackground">@drawable/launch_background</item> + <item name="android:forceDarkAllowed">false</item> + <item name="android:windowFullscreen">false</item> + <item name="android:windowDrawsSystemBarBackgrounds">false</item> + <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> + </style> + <!-- Theme applied to the Android Window as soon as the process has started. + This theme determines the color of the Android Window while your + Flutter UI initializes, as well as behind your Flutter UI while its + running. + + This Theme is only used starting with V2 of Flutter's Android embedding. --> + <style name="NormalTheme" parent="Theme.MaterialComponents"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> + <style name="Widget.Android.AppWidget.Container" parent="android:Widget"> + <item name="android:id">@android:id/background</item> + <item name="android:background">?android:attr/colorBackground</item> + </style> + <style name="Widget.Android.AppWidget.InnerView" parent="android:Widget"> + <item name="android:background">?android:attr/colorBackground</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> + </style> +</resources> diff --git a/refilc/android/app/src/main/res/values/themes.xml b/refilc/android/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..f6846b8 --- /dev/null +++ b/refilc/android/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources> + <style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault"> + <!-- Radius of the outer bound of widgets to make the rounded corners --> + <item name="appWidgetRadius">16dp</item> + <!-- + Radius of the inner view's bound of widgets to make the rounded corners. + It needs to be 8dp or less than the value of appWidgetRadius + --> + <item name="appWidgetInnerRadius">8dp</item> + </style> + + <style name="Theme.Android.AppWidgetContainer" parent="Theme.Android.AppWidgetContainerParent"> + <!-- Apply padding to avoid the content of the widget colliding with the rounded corners --> + <item name="appWidgetPadding">16dp</item> + </style> +</resources> \ No newline at end of file diff --git a/refilc/android/app/src/main/res/xml/home_widget_test_info.xml b/refilc/android/app/src/main/res/xml/home_widget_test_info.xml new file mode 100644 index 0000000..bd311e0 --- /dev/null +++ b/refilc/android/app/src/main/res/xml/home_widget_test_info.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" + android:description="@string/app_widget_description" + android:initialKeyguardLayout="@layout/widget_timetable" + android:initialLayout="@layout/widget_timetable" + android:minWidth="250dp" + android:minHeight="110dp" + android:previewImage="@drawable/timetable_widget_preview" + android:resizeMode="horizontal|vertical" + android:targetCellWidth="2" + android:targetCellHeight="2" + android:updatePeriodMillis="86400000" + android:widgetCategory="home_screen" /> \ No newline at end of file diff --git a/refilc/android/app/src/profile/AndroidManifest.xml b/refilc/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..fcc14fa --- /dev/null +++ b/refilc/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo"> + <!-- Permissions --> + <uses-permission android:name="android.permission.INTERNET"/> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> +</manifest> diff --git a/refilc/android/build.gradle b/refilc/android/build.gradle new file mode 100644 index 0000000..851cf08 --- /dev/null +++ b/refilc/android/build.gradle @@ -0,0 +1,53 @@ +buildscript { + ext.kotlin_version = '1.8.21' + + ext { + compileSdkVersion = 34 + targetSdkVersion = 34 + appCompatVersion = "1.1.0" + } + + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.1.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + maven { + // [required] background_fetch + url "${project(':background_fetch').projectDir}/libs" + } + } +} + +subprojects { + afterEvaluate {project -> + if (project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library')) { + android { + compileSdkVersion 34 + buildToolsVersion '31.0.0' + } + } + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/refilc/android/gradle.properties b/refilc/android/gradle.properties new file mode 100644 index 0000000..80db790 --- /dev/null +++ b/refilc/android/gradle.properties @@ -0,0 +1,8 @@ +org.gradle.jvmargs=-Xmx1536M \ +--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \ +--add-opens=java.base/java.lang=ALL-UNNAMED \ +--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \ +--add-opens=java.base/java.io=ALL-UNNAMED \ +--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED +android.useAndroidX=true +android.enableJetifier=true diff --git a/refilc/android/gradle/wrapper/gradle-wrapper.jar b/refilc/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..13372ae Binary files /dev/null and b/refilc/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/refilc/android/gradle/wrapper/gradle-wrapper.properties b/refilc/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..a965008 --- /dev/null +++ b/refilc/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/refilc/android/gradlew b/refilc/android/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/refilc/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/refilc/android/gradlew.bat b/refilc/android/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/refilc/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/refilc/android/key.properties b/refilc/android/key.properties new file mode 100644 index 0000000..66de21d --- /dev/null +++ b/refilc/android/key.properties @@ -0,0 +1,4 @@ +storePassword=Jelszo123 +keyPassword=Jelszo123 +keyAlias=upload +storeFile=C:/Users/kima/keystore.jks \ No newline at end of file diff --git a/refilc/android/local.properties b/refilc/android/local.properties new file mode 100644 index 0000000..32cd67f --- /dev/null +++ b/refilc/android/local.properties @@ -0,0 +1,5 @@ +sdk.dir=C:\\Users\\Kima\\AppData\\Local\\Android\\sdk +flutter.sdk=C:\\src\\flutter +flutter.buildMode=debug +flutter.versionName=5.0.0 +flutter.versionCode=241 \ No newline at end of file diff --git a/refilc/android/settings.gradle b/refilc/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/refilc/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/refilc/android/settings_aar.gradle b/refilc/android/settings_aar.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/refilc/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/refilc/ios/Flutter/AppFrameworkInfo.plist b/refilc/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/refilc/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>App</string> + <key>CFBundleIdentifier</key> + <string>io.flutter.flutter.app</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>App</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>MinimumOSVersion</key> + <string>11.0</string> +</dict> +</plist> diff --git a/refilc/ios/Flutter/Debug.xcconfig b/refilc/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/refilc/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/refilc/ios/Flutter/Release.xcconfig b/refilc/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/refilc/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/refilc/ios/Podfile b/refilc/ios/Podfile new file mode 100644 index 0000000..02d8d13 --- /dev/null +++ b/refilc/ios/Podfile @@ -0,0 +1,46 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + + pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/zhangao0086/DKImagePickerController.git' +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' + end + end +end diff --git a/refilc/ios/Runner.xcodeproj/project.pbxproj b/refilc/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3d7f9b1 --- /dev/null +++ b/refilc/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,821 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3127F78D28EAEDE200C2EFB3 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75528EAECC800C2EFB3 /* WidgetKit.framework */; }; + 3127F78E28EAEDE200C2EFB3 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75728EAECC800C2EFB3 /* SwiftUI.framework */; }; + 3127F79828EAEDE300C2EFB3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3127F79728EAEDE300C2EFB3 /* Assets.xcassets */; }; + 3127F79E28EAEDE300C2EFB3 /* livecard.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3127F78C28EAEDE200C2EFB3 /* livecard.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 3127F7A428EAEE3D00C2EFB3 /* livecard.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */; }; + 3127F7A628EAEE5900C2EFB3 /* livecard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A528EAEE5900C2EFB3 /* livecard.swift */; }; + 3127F7A828EAEE8500C2EFB3 /* lesson_model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */; }; + 373A6ECB5FC71FE9D8AF2EDB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F0ADD56276103500A3016C8 /* Pods_Runner.framework */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3127F79C28EAEDE300C2EFB3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3127F78B28EAEDE200C2EFB3; + remoteInfo = livecardExtension; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 3127F79E28EAEDE300C2EFB3 /* livecard.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; + 1F0ADD56276103500A3016C8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3127F73928EAEC3200C2EFB3 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; }; + 3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = System/Library/Frameworks/IntentsUI.framework; sourceTree = SDKROOT; }; + 3127F75528EAECC800C2EFB3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + 3127F75728EAECC800C2EFB3 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + 3127F78C28EAEDE200C2EFB3 /* livecard.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = livecard.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 3127F79728EAEDE300C2EFB3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 3127F79928EAEDE300C2EFB3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.intentdefinition; path = livecard.intentdefinition; sourceTree = "<group>"; }; + 3127F7A528EAEE5900C2EFB3 /* livecard.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = livecard.swift; sourceTree = "<group>"; tabWidth = 2; }; + 3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = lesson_model.swift; sourceTree = "<group>"; }; + 317DE77A294F6FFB002E323E /* livecard.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = livecard.entitlements; sourceTree = "<group>"; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; + 707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; + 80777CF254888CE770D5F909 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 98578F0EBCC6D3FF8391AAEB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3127F78928EAEDE200C2EFB3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3127F78E28EAEDE200C2EFB3 /* SwiftUI.framework in Frameworks */, + 3127F78D28EAEDE200C2EFB3 /* WidgetKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 373A6ECB5FC71FE9D8AF2EDB /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3127F78F28EAEDE200C2EFB3 /* livecard */ = { + isa = PBXGroup; + children = ( + 317DE77A294F6FFB002E323E /* livecard.entitlements */, + 3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */, + 3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */, + 3127F79728EAEDE300C2EFB3 /* Assets.xcassets */, + 3127F79928EAEDE300C2EFB3 /* Info.plist */, + 3127F7A528EAEE5900C2EFB3 /* livecard.swift */, + ); + path = livecard; + sourceTree = "<group>"; + }; + 6640A963014A9D4F31026053 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1F0ADD56276103500A3016C8 /* Pods_Runner.framework */, + 3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */, + 3127F75528EAECC800C2EFB3 /* WidgetKit.framework */, + 3127F75728EAECC800C2EFB3 /* SwiftUI.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; + 91FEB6212755D596FFFFEC73 /* Pods */ = { + isa = PBXGroup; + children = ( + 80777CF254888CE770D5F909 /* Pods-Runner.debug.xcconfig */, + 98578F0EBCC6D3FF8391AAEB /* Pods-Runner.release.xcconfig */, + 707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = "<group>"; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = "<group>"; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 3127F78F28EAEDE200C2EFB3 /* livecard */, + 97C146EF1CF9000F007C117D /* Products */, + 91FEB6212755D596FFFFEC73 /* Pods */, + 6640A963014A9D4F31026053 /* Frameworks */, + ); + sourceTree = "<group>"; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 3127F78C28EAEDE200C2EFB3 /* livecard.appex */, + ); + name = Products; + sourceTree = "<group>"; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 3127F73928EAEC3200C2EFB3 /* Runner.entitlements */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3127F78B28EAEDE200C2EFB3 /* livecard */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3127F79F28EAEDE300C2EFB3 /* Build configuration list for PBXNativeTarget "livecard" */; + buildPhases = ( + 3127F78A28EAEDE200C2EFB3 /* Resources */, + 3127F78828EAEDE200C2EFB3 /* Sources */, + 3127F78928EAEDE200C2EFB3 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = livecard; + productName = livecardExtension; + productReference = 3127F78C28EAEDE200C2EFB3 /* livecard.appex */; + productType = "com.apple.product-type.app-extension"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 779338C8D92BCBC36F75F791 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3127F79D28EAEDE300C2EFB3 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1410; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 3127F78B28EAEDE200C2EFB3 = { + CreatedOnToolsVersion = 14.1; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 3127F78B28EAEDE200C2EFB3 /* livecard */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3127F78A28EAEDE200C2EFB3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3127F79828EAEDE300C2EFB3 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; + }; + 71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 779338C8D92BCBC36F75F791 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3127F78828EAEDE200C2EFB3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3127F7A828EAEE8500C2EFB3 /* lesson_model.swift in Sources */, + 3127F7A428EAEE3D00C2EFB3 /* livecard.intentdefinition in Sources */, + 3127F7A628EAEE5900C2EFB3 /* livecard.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3127F79D28EAEDE300C2EFB3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3127F78B28EAEDE200C2EFB3 /* livecard */; + targetProxy = 3127F79C28EAEDE300C2EFB3 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = "<group>"; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = 195; + DEVELOPMENT_TEAM = 4DKAF249F3; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = reFilc; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 3.6.0; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 3127F7A028EAEDE300C2EFB3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 238; + DEVELOPMENT_TEAM = 4DKAF249F3; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = livecard/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = livecard; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSSupportsLiveActivities = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 4.5.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3127F7A128EAEDE300C2EFB3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 238; + DEVELOPMENT_TEAM = 4DKAF249F3; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = livecard/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = livecard; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSSupportsLiveActivities = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 4.5.1; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 3127F7A228EAEDE300C2EFB3 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 238; + DEVELOPMENT_TEAM = 4DKAF249F3; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = livecard/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = livecard; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSSupportsLiveActivities = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 4.5.1; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = 195; + DEVELOPMENT_TEAM = 4DKAF249F3; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = reFilc; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 3.6.0; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = 195; + DEVELOPMENT_TEAM = 4DKAF249F3; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = reFilc; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 3.6.0; + PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3127F79F28EAEDE300C2EFB3 /* Build configuration list for PBXNativeTarget "livecard" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3127F7A028EAEDE300C2EFB3 /* Debug */, + 3127F7A128EAEDE300C2EFB3 /* Release */, + 3127F7A228EAEDE300C2EFB3 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/refilc/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/refilc/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/refilc/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:"> + </FileRef> +</Workspace> diff --git a/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/refilc/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>PreviewsEnabled</key> + <false/> +</dict> +</plist> diff --git a/refilc/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/refilc/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/refilc/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "1300" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <Testables> + </Testables> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </LaunchAction> + <ProfileAction + buildConfiguration = "Profile" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/refilc/ios/Runner.xcworkspace/contents.xcworkspacedata b/refilc/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/refilc/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:Runner.xcodeproj"> + </FileRef> + <FileRef + location = "group:Pods/Pods.xcodeproj"> + </FileRef> +</Workspace> diff --git a/refilc/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/refilc/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/refilc/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/refilc/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/refilc/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/refilc/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>PreviewsEnabled</key> + <false/> +</dict> +</plist> diff --git a/refilc/ios/Runner/AppDelegate.swift b/refilc/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..2c4c46e --- /dev/null +++ b/refilc/ios/Runner/AppDelegate.swift @@ -0,0 +1,25 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + + // here, Without this code the task will not work. + //SwiftFlutterForegroundTaskPlugin.setPluginRegistrantCallback(registerPlugins) + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } + + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} + +// here +func registerPlugins(registry: FlutterPluginRegistry) { + GeneratedPluginRegistrant.register(with: registry) +} diff --git a/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1373340 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "reFilc_Logo.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png b/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png new file mode 100644 index 0000000..fad3d44 Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/Contents.json b/refilc/ios/Runner/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json new file mode 100644 index 0000000..9f447e1 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "background.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png new file mode 100644 index 0000000..d90316e Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..00cabce --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "LaunchImage.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "LaunchImage@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "LaunchImage@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/Contents.json new file mode 100644 index 0000000..2945b36 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/icon.png b/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/icon.png new file mode 100644 index 0000000..ca70ec6 Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/ic_absences.imageset/icon.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/Contents.json new file mode 100644 index 0000000..2945b36 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/icon.png b/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/icon.png new file mode 100644 index 0000000..4c1c148 Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/ic_grades.imageset/icon.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/Contents.json new file mode 100644 index 0000000..2945b36 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/icon.png b/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/icon.png new file mode 100644 index 0000000..6c9c7a5 Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/ic_messages.imageset/icon.png differ diff --git a/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/Contents.json b/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/Contents.json new file mode 100644 index 0000000..2945b36 --- /dev/null +++ b/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/icon.png b/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/icon.png new file mode 100644 index 0000000..da7c5fc Binary files /dev/null and b/refilc/ios/Runner/Assets.xcassets/ic_timetable.imageset/icon.png differ diff --git a/refilc/ios/Runner/Base.lproj/LaunchScreen.storyboard b/refilc/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..c9cac30 --- /dev/null +++ b/refilc/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> + <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/> + <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView> + </subviews> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/> + <constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/> + <constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/> + <constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/> + <constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/> + <constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/> + <constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/> + <constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/> + </constraints> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="53" y="375"/> + </scene> + </scenes> + <resources> + <image name="LaunchImage" width="1372" height="1372"/> + <image name="LaunchBackground" width="1" height="1"/> + </resources> +</document> diff --git a/refilc/ios/Runner/Base.lproj/Main.storyboard b/refilc/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/refilc/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> + </dependencies> + <scenes> + <!--Flutter View Controller--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + </scene> + </scenes> +</document> diff --git a/refilc/ios/Runner/GoogleService-Info.plist b/refilc/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..6900b48 --- /dev/null +++ b/refilc/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>ANDROID_CLIENT_ID</key> + <string>584481527599-2cpalmvit8kl489aoj3v6t28ujcbcd62.apps.googleusercontent.com</string> + <key>API_KEY</key> + <string>AIzaSyD0Wdo2D-lUki7i1X-32ELmsl6Jn7Cuctc</string> + <key>GCM_SENDER_ID</key> + <string>584481527599</string> + <key>PLIST_VERSION</key> + <string>1</string> + <key>BUNDLE_ID</key> + <string>com.refilc2.naplo</string> + <key>PROJECT_ID</key> + <string>refilc-mobile-login</string> + <key>STORAGE_BUCKET</key> + <string>refilc-mobile-login.appspot.com</string> + <key>IS_ADS_ENABLED</key> + <false></false> + <key>IS_ANALYTICS_ENABLED</key> + <false></false> + <key>IS_APPINVITE_ENABLED</key> + <true></true> + <key>IS_GCM_ENABLED</key> + <true></true> + <key>IS_SIGNIN_ENABLED</key> + <true></true> + <key>GOOGLE_APP_ID</key> + <string>1:584481527599:ios:58876c3349550a41e033da</string> +</dict> +</plist> \ No newline at end of file diff --git a/refilc/ios/Runner/Info.plist b/refilc/ios/Runner/Info.plist new file mode 100644 index 0000000..aa695d8 --- /dev/null +++ b/refilc/ios/Runner/Info.plist @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleAlternateIcons</key> + <dict> + <key>refilc_pride</key> + <dict> + <key>CFBundleIconFiles</key> + <array> + <string>refilc_pride</string> + </array> + <key>UIPrerenderedIcon</key> + <false/> + </dict> + <key>refilc_overcomplicated</key> + <dict> + <key>CFBundleIconFiles</key> + <array> + <string>refilc_overcomplicated</string> + </array> + <key>UIPrerenderedIcon</key> + <false/> + </dict> + <key>refilc_concept</key> + <dict> + <key>CFBundleIconFiles</key> + <array> + <string>refilc_concept</string> + </array> + <key>UIPrerenderedIcon</key> + <false/> + </dict> + <key>refilc_default</key> + <dict> + <key>CFBundleIconFiles</key> + <array> + <string>refilc_default</string> + </array> + <key>UIPrerenderedIcon</key> + <false/> + </dict> + </dict> + <key>CFBundleIcons</key> + <dict> + <key>CFBundlePrimaryIcon</key> + <dict> + <key>CFBundleIconName</key> + <string></string> + <key>CFBundleIconFiles</key> + <array> + <string></string> + </array> + <key>UIPrerenderedIcon</key> + <false/> + </dict> + </dict> + <key>BGTaskSchedulerPermittedIdentifiers</key> + <array> + <string>com.transistorsoft.fetch</string> + </array> + <key>CADisableMinimumFrameDurationOnPhone</key> + <true/> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>reFilc</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>$(FLUTTER_BUILD_NAME)</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>$(FLUTTER_BUILD_NUMBER)</string> + <key>ITSAppUsesNonExemptEncryption</key> + <false/> + <key>LSApplicationQueriesSchemes</key> + <array> + <string>https</string> + <string>http</string> + </array> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>NSPhotoLibraryUsageDescription</key> + <string>The app requires the photo library to set a custom profile picture.</string> + <key>NSSupportsLiveActivities</key> + <true/> + <key>UIApplicationSupportsIndirectInputEvents</key> + <true/> + <key>UIBackgroundModes</key> + <array> + <string>fetch</string> + <string>processing</string> + </array> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> + <key>UIMainStoryboardFile</key> + <string>Main</string> + <key>UIStatusBarHidden</key> + <false/> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UIViewControllerBasedStatusBarAppearance</key> + <false/> +</dict> +</plist> diff --git a/refilc/ios/Runner/Runner-Bridging-Header.h b/refilc/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/refilc/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/refilc/ios/Runner/Runner.entitlements b/refilc/ios/Runner/Runner.entitlements new file mode 100644 index 0000000..8e1d462 --- /dev/null +++ b/refilc/ios/Runner/Runner.entitlements @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>aps-environment</key> + <string>development</string> + <key>com.apple.security.application-groups</key> + <array> + <string>group.refilc2.livecard</string> + </array> +</dict> +</plist> diff --git a/refilc/ios/firebase_app_id_file.json b/refilc/ios/firebase_app_id_file.json new file mode 100644 index 0000000..0c96296 --- /dev/null +++ b/refilc/ios/firebase_app_id_file.json @@ -0,0 +1,7 @@ +{ + "file_generated_by": "FlutterFire CLI", + "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", + "GOOGLE_APP_ID": "1:584481527599:ios:58876c3349550a41e033da", + "FIREBASE_PROJECT_ID": "refilc-mobile-login", + "GCM_SENDER_ID": "584481527599" +} \ No newline at end of file diff --git a/refilc/ios/livecard/Assets.xcassets/AccentColor.colorset/Contents.json b/refilc/ios/livecard/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/refilc/ios/livecard/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/Contents.json b/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1373340 --- /dev/null +++ b/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "reFilc_Logo.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png b/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png new file mode 100644 index 0000000..fad3d44 Binary files /dev/null and b/refilc/ios/livecard/Assets.xcassets/AppIcon.appiconset/reFilc_Logo.png differ diff --git a/refilc/ios/livecard/Assets.xcassets/Contents.json b/refilc/ios/livecard/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/refilc/ios/livecard/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/livecard/Assets.xcassets/WidgetBackground.colorset/Contents.json b/refilc/ios/livecard/Assets.xcassets/WidgetBackground.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/refilc/ios/livecard/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/refilc/ios/livecard/Info.plist b/refilc/ios/livecard/Info.plist new file mode 100644 index 0000000..0f118fb --- /dev/null +++ b/refilc/ios/livecard/Info.plist @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSExtension</key> + <dict> + <key>NSExtensionPointIdentifier</key> + <string>com.apple.widgetkit-extension</string> + </dict> +</dict> +</plist> diff --git a/refilc/ios/livecard/lesson_model.swift b/refilc/ios/livecard/lesson_model.swift new file mode 100644 index 0000000..f098b63 --- /dev/null +++ b/refilc/ios/livecard/lesson_model.swift @@ -0,0 +1,31 @@ +import Foundation + +class LessonData { + var color: String + var icon: String + var index: String + var title: String + var subtitle: String + var description: String + var startDate: Date + var endDate: Date + var date: ClosedRange<Date> + var nextSubject: String + var nextRoom: String + + init?() { + let sharedDefault = UserDefaults(suiteName: "group.refilc2.livecard")! + + self.color = sharedDefault.string(forKey: "color")! + self.icon = sharedDefault.string(forKey: "icon")! + self.index = sharedDefault.string(forKey: "index")! + self.title = sharedDefault.string(forKey: "title")! + self.subtitle = sharedDefault.string(forKey: "subtitle")! + self.description = sharedDefault.string(forKey: "description")! + self.startDate = Date(timeIntervalSince1970: Double(sharedDefault.string(forKey: "startDate")!)! / 1000) + self.endDate = Date(timeIntervalSince1970: Double(sharedDefault.string(forKey: "endDate")!)! / 1000) + date = self.startDate...self.endDate + self.nextSubject = sharedDefault.string(forKey: "nextSubject")! + self.nextRoom = sharedDefault.string(forKey: "nextRoom")! + } +} diff --git a/refilc/ios/livecard/livecard.entitlements b/refilc/ios/livecard/livecard.entitlements new file mode 100644 index 0000000..8e1d462 --- /dev/null +++ b/refilc/ios/livecard/livecard.entitlements @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>aps-environment</key> + <string>development</string> + <key>com.apple.security.application-groups</key> + <array> + <string>group.refilc2.livecard</string> + </array> +</dict> +</plist> diff --git a/refilc/ios/livecard/livecard.intentdefinition b/refilc/ios/livecard/livecard.intentdefinition new file mode 100644 index 0000000..bdb4045 --- /dev/null +++ b/refilc/ios/livecard/livecard.intentdefinition @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>INEnums</key> + <array/> + <key>INIntentDefinitionModelVersion</key> + <string>1.2</string> + <key>INIntentDefinitionNamespace</key> + <string>88xZPY</string> + <key>INIntentDefinitionSystemVersion</key> + <string>20A294</string> + <key>INIntentDefinitionToolsBuildVersion</key> + <string>12A6144</string> + <key>INIntentDefinitionToolsVersion</key> + <string>12.0</string> + <key>INIntents</key> + <array> + <dict> + <key>INIntentCategory</key> + <string>information</string> + <key>INIntentDescriptionID</key> + <string>tVvJ9c</string> + <key>INIntentEligibleForWidgets</key> + <true/> + <key>INIntentIneligibleForSuggestions</key> + <true/> + <key>INIntentName</key> + <string>Configuration</string> + <key>INIntentResponse</key> + <dict> + <key>INIntentResponseCodes</key> + <array> + <dict> + <key>INIntentResponseCodeName</key> + <string>success</string> + <key>INIntentResponseCodeSuccess</key> + <true/> + </dict> + <dict> + <key>INIntentResponseCodeName</key> + <string>failure</string> + </dict> + </array> + </dict> + <key>INIntentTitle</key> + <string>Configuration</string> + <key>INIntentTitleID</key> + <string>gpCwrM</string> + <key>INIntentType</key> + <string>Custom</string> + <key>INIntentVerb</key> + <string>View</string> + </dict> + </array> + <key>INTypes</key> + <array/> +</dict> +</plist> diff --git a/refilc/ios/livecard/livecard.swift b/refilc/ios/livecard/livecard.swift new file mode 100644 index 0000000..3781b3e --- /dev/null +++ b/refilc/ios/livecard/livecard.swift @@ -0,0 +1,205 @@ +import ActivityKit +import WidgetKit +import SwiftUI + +@main +struct Widgets: WidgetBundle { + var body: some Widget { + if #available(iOS 16.1, *) { + LiveCardWidget() + } + } +} + +// Color Converter +extension Color { + init(hex: String, alpha: Double = 1.0) { + var hexValue = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased() + + if hexValue.hasPrefix("#") { + hexValue.remove(at: hexValue.startIndex) + } + + var rgbValue: UInt64 = 0 + Scanner(string: hexValue).scanHexInt64(&rgbValue) + + let red = Double((rgbValue & 0xFF0000) >> 16) / 255.0 + let green = Double((rgbValue & 0x00FF00) >> 8) / 255.0 + let blue = Double(rgbValue & 0x0000FF) / 255.0 + + self.init( + .sRGB, + red: red, + green: green, + blue: blue, + opacity: alpha + ) + } +} + + +// We need to redefined live activities pipe +struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable { + public struct ContentState: Codable, Hashable { } + + var id = UUID() +} + +struct LockScreenLiveActivityView: View { + let context: ActivityViewContext<LiveActivitiesAppAttributes> + + let lesson = LessonData() + + var body: some View { + HStack(alignment: .center) { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(30), height: CGFloat(30)) + .padding(.leading, CGFloat(24)) + + VStack(alignment: .leading) { + HStack(alignment: .center) { + Text(lesson!.index + lesson!.title) + .font(.title3) + .bold() + + Text(lesson!.subtitle) + .font(.subheadline) + .padding(.trailing, 12) + } + + if (lesson!.description != "") { + Text(lesson!.description) + .font(.subheadline) + } + + HStack { + Image(systemName: "arrow.right") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(8), height: CGFloat(8)) + Text(lesson!.nextSubject) + .font(.caption) + Text(lesson!.nextRoom) + .font(.caption2) + } + }.padding(15) + + Spacer() + + Text(timerInterval: lesson!.date, countsDown: true) + .multilineTextAlignment(.center) + .frame(width: 85) + .font(.title2) + .monospacedDigit() + .padding(.trailing, CGFloat(24)) + } + .activityBackgroundTint( + lesson!.color != "#676767" + ? Color(hex: lesson!.color) + // Ha nem megy hat nem megy + : Color.clear + ) + } +} + +@available(iOSApplicationExtension 16.1, *) +struct LiveCardWidget: Widget { + var body: some WidgetConfiguration { + /// Live Activity Notification + ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in + LockScreenLiveActivityView(context: context) + /// Dynamic Island + } dynamicIsland: { context in + let lesson = LessonData() + + /// Expanded + return DynamicIsland { + DynamicIslandExpandedRegion(.leading) { + VStack { + Spacer() + ProgressView( + timerInterval: lesson!.date, + countsDown: true, + label: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(32), height: CGFloat(32)) + }, + currentValueLabel: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(32), height: CGFloat(32)) + } + ).progressViewStyle(.circular) + } + } + DynamicIslandExpandedRegion(.center) { + VStack(alignment: .leading) { + Text(lesson!.index + lesson!.title) + .lineLimit(1) + .font(.title3) + .bold() + + Text(lesson!.description) + .lineLimit(2) + .font(.caption) + }.padding(EdgeInsets(top: 0.0, leading: 5.0, bottom: 0.0, trailing: 0.0)) + } + DynamicIslandExpandedRegion(.trailing) { + VStack { + Spacer() + Text(lesson!.subtitle) + .lineLimit(1) + .font(.subheadline) + Spacer() + } + } + + /// Compact + } compactLeading: { + Label { + Text(lesson!.title) + } icon: { + Image(systemName: lesson!.icon) + } + .font(.caption2) + } + compactTrailing: { + Text(timerInterval: lesson!.date, countsDown: true) + .multilineTextAlignment(.center) + .frame(width: 40) + .font(.caption2) + + /// Collapsed + } minimal: { + VStack(alignment: .center, content: { + ProgressView( + timerInterval: lesson!.date, + countsDown: true, + label: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(12), height: CGFloat(12)) + }, + currentValueLabel: { + Image(systemName: lesson!.icon) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: CGFloat(12), height: CGFloat(12)) + } + ).progressViewStyle(.circular) + }) + } + .keylineTint( + lesson!.color != "#676767" + ? Color(hex: lesson!.color) + : Color.clear + ) + } + } +} diff --git a/refilc/linux/filcnaplo.desktop b/refilc/linux/filcnaplo.desktop new file mode 100644 index 0000000..7c98deb --- /dev/null +++ b/refilc/linux/filcnaplo.desktop @@ -0,0 +1,8 @@ + [Desktop Entry] + Name=reFilc + Comment=Nem hivatalos e-napló alkalmazás az eKRÉTA rendszerhez + Exec=filcnaplo + Icon=icon.png + Terminal=false + Type=Application + Categories=Education; \ No newline at end of file diff --git a/refilc/linux/icon.png b/refilc/linux/icon.png new file mode 100644 index 0000000..90d1850 Binary files /dev/null and b/refilc/linux/icon.png differ diff --git a/refilc/linux/main.cc b/refilc/linux/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/refilc/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/refilc/linux/my_application.cc b/refilc/linux/my_application.cc new file mode 100644 index 0000000..8194a2a --- /dev/null +++ b/refilc/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include <flutter_linux/flutter_linux.h> +#ifdef GDK_WINDOWING_X11 +#include <gdk/gdkx.h> +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "reFilc"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "reFilc"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/refilc/linux/my_application.h b/refilc/linux/my_application.h new file mode 100644 index 0000000..72271d5 --- /dev/null +++ b/refilc/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include <gtk/gtk.h> + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/refilc/macos/Podfile b/refilc/macos/Podfile new file mode 100644 index 0000000..049abe2 --- /dev/null +++ b/refilc/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/refilc/macos/Runner.xcodeproj/project.pbxproj b/refilc/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..61c33df --- /dev/null +++ b/refilc/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,670 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 43DE217EE63035454211B258 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BB026B00EBE728C695C538A /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; + 33CC10ED2044A3C60003C045 /* Felt Diary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Felt Diary.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; + 72E0977D2D8959666A33F54C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; + 8BB026B00EBE728C695C538A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; + 9C848561CA407DAFCC1F5699 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; + C200D9112D0A790C324733AA /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 43DE217EE63035454211B258 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = "<group>"; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + 51085A7CB06D107E9E0B55D2 /* Pods */, + D1EA9707C367C55447080BD3 /* Frameworks */, + ); + sourceTree = "<group>"; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* Felt Diary.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = "<group>"; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = "<group>"; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = "<group>"; + }; + 51085A7CB06D107E9E0B55D2 /* Pods */ = { + isa = PBXGroup; + children = ( + 72E0977D2D8959666A33F54C /* Pods-Runner.debug.xcconfig */, + C200D9112D0A790C324733AA /* Pods-Runner.release.xcconfig */, + 9C848561CA407DAFCC1F5699 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = "<group>"; + }; + D1EA9707C367C55447080BD3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8BB026B00EBE728C695C538A /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + FD4539A7C90013601C734851 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + 558B4163B66FBD35BF611538 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* Felt Diary.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 558B4163B66FBD35BF611538 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + FD4539A7C90013601C734851 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = MYUTW2GF6J; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "reFilc"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + NEW_SETTING = ""; + PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo; + PRODUCT_NAME = "Felt Diary"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = MYUTW2GF6J; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "reFilc"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + NEW_SETTING = ""; + PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo; + PRODUCT_NAME = "Felt Diary"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = MYUTW2GF6J; + INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "reFilc"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + NEW_SETTING = ""; + PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo; + PRODUCT_NAME = "Felt Diary"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/refilc/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/refilc/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/refilc/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/refilc/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/refilc/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..f2f63a8 --- /dev/null +++ b/refilc/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "1300" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "33CC10EC2044A3C60003C045" + BuildableName = "Felt Diary.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "33CC10EC2044A3C60003C045" + BuildableName = "Felt Diary.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <Testables> + </Testables> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "33CC10EC2044A3C60003C045" + BuildableName = "Felt Diary.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </LaunchAction> + <ProfileAction + buildConfiguration = "Profile" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "33CC10EC2044A3C60003C045" + BuildableName = "Felt Diary.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/refilc/macos/Runner.xcworkspace/contents.xcworkspacedata b/refilc/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/refilc/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:Runner.xcodeproj"> + </FileRef> + <FileRef + location = "group:Pods/Pods.xcodeproj"> + </FileRef> +</Workspace> diff --git a/refilc/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/refilc/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/refilc/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/refilc/macos/Runner/AppDelegate.swift b/refilc/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..d53ef64 --- /dev/null +++ b/refilc/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/refilc/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/refilc/macos/Runner/Base.lproj/MainMenu.xib b/refilc/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..bbf5e2d --- /dev/null +++ b/refilc/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,348 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21179.7" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> + <dependencies> + <deployment identifier="macosx"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21179.7"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> + <connections> + <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/> + </connections> + </customObject> + <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> + <customObject id="-3" userLabel="Application" customClass="NSObject"/> + <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Felt_Diary" customModuleProvider="target"> + <connections> + <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/> + <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/> + </connections> + </customObject> + <customObject id="YLy-65-1bz" customClass="NSFontManager"/> + <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> + <items> + <menuItem title="APP_NAME" id="1Xt-HY-uBw"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr"> + <items> + <menuItem title="About APP_NAME" id="5kV-Vb-QxS"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/> + <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/> + <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> + <menuItem title="Services" id="NMo-om-nkz"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> + </menuItem> + <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> + <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN"> + <connections> + <action selector="hide:" target="-1" id="PnN-Uc-m68"/> + </connections> + </menuItem> + <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO"> + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> + <connections> + <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/> + </connections> + </menuItem> + <menuItem title="Show All" id="Kd2-mp-pUS"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> + <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi"> + <connections> + <action selector="terminate:" target="-1" id="Te7-pn-YzF"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Edit" id="5QF-Oa-p0T"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Edit" id="W48-6f-4Dl"> + <items> + <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg"> + <connections> + <action selector="undo:" target="-1" id="M6e-cu-g7V"/> + </connections> + </menuItem> + <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam"> + <connections> + <action selector="redo:" target="-1" id="oIA-Rs-6OD"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/> + <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG"> + <connections> + <action selector="cut:" target="-1" id="YJe-68-I9s"/> + </connections> + </menuItem> + <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU"> + <connections> + <action selector="copy:" target="-1" id="G1f-GL-Joy"/> + </connections> + </menuItem> + <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL"> + <connections> + <action selector="paste:" target="-1" id="UvS-8e-Qdg"/> + </connections> + </menuItem> + <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk"> + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> + <connections> + <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/> + </connections> + </menuItem> + <menuItem title="Delete" id="pa3-QI-u2k"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/> + </connections> + </menuItem> + <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m"> + <connections> + <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/> + <menuItem title="Find" id="4EN-yA-p0u"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Find" id="1b7-l0-nxx"> + <items> + <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W"> + <connections> + <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/> + </connections> + </menuItem> + <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz"> + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> + <connections> + <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/> + </connections> + </menuItem> + <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye"> + <connections> + <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/> + </connections> + </menuItem> + <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV"> + <connections> + <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/> + </connections> + </menuItem> + <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt"> + <connections> + <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/> + </connections> + </menuItem> + <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd"> + <connections> + <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Spelling" id="3IN-sU-3Bg"> + <items> + <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI"> + <connections> + <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/> + </connections> + </menuItem> + <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7"> + <connections> + <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/> + <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/> + </connections> + </menuItem> + <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/> + </connections> + </menuItem> + <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Substitutions" id="9ic-FL-obx"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Substitutions" id="FeM-D8-WVr"> + <items> + <menuItem title="Show Substitutions" id="z6F-FW-3nz"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/> + <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/> + </connections> + </menuItem> + <menuItem title="Smart Quotes" id="hQb-2v-fYv"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/> + </connections> + </menuItem> + <menuItem title="Smart Dashes" id="rgM-f4-ycn"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/> + </connections> + </menuItem> + <menuItem title="Smart Links" id="cwL-P1-jid"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/> + </connections> + </menuItem> + <menuItem title="Data Detectors" id="tRr-pd-1PS"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/> + </connections> + </menuItem> + <menuItem title="Text Replacement" id="HFQ-gK-NFA"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Transformations" id="2oI-Rn-ZJC"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Transformations" id="c8a-y6-VQd"> + <items> + <menuItem title="Make Upper Case" id="vmV-6d-7jI"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/> + </connections> + </menuItem> + <menuItem title="Make Lower Case" id="d9M-CD-aMd"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/> + </connections> + </menuItem> + <menuItem title="Capitalize" id="UEZ-Bs-lqG"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Speech" id="xrE-MZ-jX0"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Speech" id="3rS-ZA-NoH"> + <items> + <menuItem title="Start Speaking" id="Ynk-f8-cLZ"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/> + </connections> + </menuItem> + <menuItem title="Stop Speaking" id="Oyz-dy-DGm"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="View" id="H8h-7b-M4v"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="View" id="HyV-fh-RgO"> + <items> + <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa"> + <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> + <connections> + <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Window" id="aUF-d1-5bR"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo"> + <items> + <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV"> + <connections> + <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/> + </connections> + </menuItem> + <menuItem title="Zoom" id="R4o-n2-Eq4"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/> + <menuItem title="Bring All to Front" id="LE2-aR-0XJ"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Help" id="EPT-qC-fAb"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/> + </menuItem> + </items> + <point key="canvasLocation" x="142" y="-258"/> + </menu> + <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" titlebarAppearsTransparent="YES" toolbarStyle="unified" titleVisibility="hidden" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Felt_Diary" customModuleProvider="target"> + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/> + <rect key="contentRect" x="335" y="390" width="800" height="600"/> + <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/> + <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ"> + <rect key="frame" x="0.0" y="0.0" width="800" height="600"/> + <autoresizingMask key="autoresizingMask"/> + </view> + <toolbar key="toolbar" implicitIdentifier="76215EDB-EEE8-458B-9EB5-96D223607AF7" autosavesConfiguration="NO" displayMode="iconAndLabel" sizeMode="regular" id="HrH-7k-XRf"> + <allowedToolbarItems/> + <defaultToolbarItems/> + </toolbar> + <point key="canvasLocation" x="139" y="143"/> + </window> + </objects> +</document> diff --git a/refilc/macos/Runner/Configs/AppInfo.xcconfig b/refilc/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..b86f95b --- /dev/null +++ b/refilc/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = reFilc + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = reFilc diff --git a/refilc/macos/Runner/Configs/Debug.xcconfig b/refilc/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/refilc/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/refilc/macos/Runner/Configs/Release.xcconfig b/refilc/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/refilc/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/refilc/macos/Runner/Configs/Warnings.xcconfig b/refilc/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/refilc/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/refilc/macos/Runner/DebugProfile.entitlements b/refilc/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..9f5b50b --- /dev/null +++ b/refilc/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.security.app-sandbox</key> + <true/> + <key>com.apple.security.cs.allow-jit</key> + <true/> + <key>com.apple.security.files.downloads.read-write</key> + <true/> + <key>com.apple.security.network.client</key> + <true/> + <key>com.apple.security.network.server</key> + <true/> +</dict> +</plist> diff --git a/refilc/macos/Runner/Info.plist b/refilc/macos/Runner/Info.plist new file mode 100644 index 0000000..91dd316 --- /dev/null +++ b/refilc/macos/Runner/Info.plist @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>$(FLUTTER_BUILD_NAME)</string> + <key>CFBundleVersion</key> + <string>$(FLUTTER_BUILD_NUMBER)</string> + <key>LSMinimumSystemVersion</key> + <string>$(MACOSX_DEPLOYMENT_TARGET)</string> + <key>NSHumanReadableCopyright</key> + <string>$(PRODUCT_COPYRIGHT)</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/refilc/macos/Runner/MainFlutterWindow.swift b/refilc/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..4b4fe9b --- /dev/null +++ b/refilc/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,19 @@ +import Cocoa +import FlutterMacOS +import flutter_acrylic + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let blurryContainerViewController = BlurryContainerViewController() + let windowFrame = self.frame + self.contentViewController = blurryContainerViewController + self.setFrame(windowFrame, display: true) + + /* Initialize the flutter_acrylic plugin */ + MainFlutterWindowManipulator.start(mainFlutterWindow: self) + + RegisterGeneratedPlugins(registry: blurryContainerViewController.flutterViewController) + + super.awakeFromNib() + } +} diff --git a/refilc/macos/Runner/Release.entitlements b/refilc/macos/Runner/Release.entitlements new file mode 100644 index 0000000..8dc5725 --- /dev/null +++ b/refilc/macos/Runner/Release.entitlements @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.security.app-sandbox</key> + <true/> + <key>com.apple.security.files.downloads.read-write</key> + <true/> + <key>com.apple.security.network.client</key> + <true/> +</dict> +</plist> diff --git a/refilc/windows/runner/Runner.rc b/refilc/windows/runner/Runner.rc new file mode 100644 index 0000000..51b3032 --- /dev/null +++ b/refilc/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "hu.refilc" "\0" + VALUE "FileDescription", "filcnaplo" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "filcnaplo" "\0" + VALUE "LegalCopyright", "Copyright (C) 2023 hu.refilc. All rights reserved." "\0" + VALUE "OriginalFilename", "filcnaplo.exe" "\0" + VALUE "ProductName", "filcnaplo" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/refilc/windows/runner/flutter_window.cpp b/refilc/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..955ee30 --- /dev/null +++ b/refilc/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include <optional> + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique<flutter::FlutterViewController>( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional<LRESULT> result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/refilc/windows/runner/flutter_window.h b/refilc/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/refilc/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include <flutter/dart_project.h> +#include <flutter/flutter_view_controller.h> + +#include <memory> + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr<flutter::FlutterViewController> flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/refilc/windows/runner/main.cpp b/refilc/windows/runner/main.cpp new file mode 100644 index 0000000..2847838 --- /dev/null +++ b/refilc/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include <flutter/dart_project.h> +#include <flutter/flutter_view_controller.h> +#include <windows.h> + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector<std::string> command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(800, 720); + if (!window.Create(L"reFilc", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/refilc/windows/runner/resource.h b/refilc/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/refilc/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/refilc/windows/runner/resources/app_icon.ico b/refilc/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..49c0c16 Binary files /dev/null and b/refilc/windows/runner/resources/app_icon.ico differ diff --git a/refilc/windows/runner/runner.exe.manifest b/refilc/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..a42ea76 --- /dev/null +++ b/refilc/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <application xmlns="urn:schemas-microsoft-com:asm.v3"> + <windowsSettings> + <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> + </windowsSettings> + </application> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 and Windows 11 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + <!-- Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!-- Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + <!-- Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + </application> + </compatibility> +</assembly> diff --git a/refilc/windows/runner/utils.cpp b/refilc/windows/runner/utils.cpp new file mode 100644 index 0000000..b2b0873 --- /dev/null +++ b/refilc/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include <flutter_windows.h> +#include <io.h> +#include <stdio.h> +#include <windows.h> + +#include <iostream> + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector<std::string> GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector<std::string>(); + } + + std::vector<std::string> command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length <= 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/refilc/windows/runner/utils.h b/refilc/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/refilc/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include <string> +#include <vector> + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector<std::string>, +// encoded in UTF-8. Returns an empty std::vector<std::string> on failure. +std::vector<std::string> GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/refilc/windows/runner/win32_window.cpp b/refilc/windows/runner/win32_window.cpp new file mode 100644 index 0000000..60608d0 --- /dev/null +++ b/refilc/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include <dwmapi.h> +#include <flutter_windows.h> + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast<int>(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast<EnableNonClientDpiScaling*>( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast<LONG>(origin.x), + static_cast<LONG>(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams)); + + auto that = static_cast<Win32Window*>(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast<RECT*>(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast<Win32Window*>( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/refilc/windows/runner/win32_window.h b/refilc/windows/runner/win32_window.h new file mode 100644 index 0000000..e901dde --- /dev/null +++ b/refilc/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include <windows.h> + +#include <functional> +#include <memory> +#include <string> + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_