├── debian ├── compat ├── changelog ├── rules ├── xournalpp-mobile.install └── control ├── linux ├── .gitignore ├── xournalpp-mobile ├── xournalpp-mobile.desktop ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt ├── main.cc ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── windows ├── flutter │ ├── .template_version │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── utils.h │ ├── window_configuration.cpp │ ├── resource.h │ ├── utils.cpp │ ├── CMakeLists.txt │ ├── window_configuration.h │ ├── runner.exe.manifest │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── run_loop.h │ ├── main.cpp │ ├── Runner.rc │ ├── run_loop.cpp │ └── win32_window.h ├── .gitignore └── CMakeLists.txt ├── android ├── settings_aar.gradle ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ └── ic_launcher.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ └── kotlin │ │ │ │ └── online │ │ │ │ └── xournal │ │ │ │ └── mobile │ │ │ │ └── MainActivity.kt │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── build.gradle └── gradlew ├── fastlane └── metadata │ └── android │ └── en_US │ ├── title.txt │ ├── images │ ├── icon.png │ ├── featureGraphic.png │ ├── phoneScreenshots │ │ ├── 01.png │ │ └── 02.png │ ├── tenInchScreenshots │ │ ├── 01.png │ │ ├── 02.png │ │ ├── 03.png │ │ ├── 04.png │ │ ├── 05.png │ │ ├── 06.png │ │ ├── 07.png │ │ └── 08.png │ └── sevenInchScreenshots │ │ ├── 01.png │ │ ├── 02.png │ │ ├── 03.png │ │ ├── 04.png │ │ └── 05.png │ ├── short_description.txt │ └── full_description.txt ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── go ├── .gitignore ├── assets │ └── icon.png ├── go.mod ├── cmd │ ├── options.go │ └── main.go ├── hover.yaml └── go.sum ├── web ├── favicon.png ├── icons │ ├── Icon-1024.png │ └── Icon-192.png ├── manifest.json └── index.html ├── assets ├── snapraft.png ├── xournalpp.png ├── feature-banner.png ├── xournalpp-android.png ├── xournalpp-mobile.png ├── xournalpp-solid.png ├── xournalpp-adaptive.png └── xournalpp.svg ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_512.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── MainFlutterWindow.swift │ ├── DebugProfile.entitlements │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Podfile.lock └── Podfile ├── fonts ├── Open Sans │ ├── OpenSans-Light.ttf │ ├── OpenSans-ExtraBold.ttf │ └── OpenSans-Regular.ttf └── Glacial Indifference │ └── GlacialIndifference-Regular.otf ├── analysis_options.yaml ├── lib ├── src │ ├── globals.dart │ ├── conditional │ │ └── open_file │ │ │ ├── open_file_web.dart │ │ │ ├── open_file_generic.dart │ │ │ └── open_file_io.dart │ ├── HexColor.dart │ ├── PdfImage.dart │ ├── XppPageContentWidget.dart │ ├── XppLayer.dart │ └── XppPage.dart ├── main_desktop.dart ├── widgets │ ├── ContextualBottomSheet.dart │ ├── ZoomableWidget.dart │ ├── QuotaTile.dart │ ├── XppPageStack.dart │ ├── MainDrawer.dart │ └── XppPagesListView.dart ├── generated │ └── intl │ │ └── messages_all.dart ├── layer_contents │ ├── XppImage.dart │ ├── XppTexImage.dart │ └── XppText.dart ├── l10n │ ├── intl_en.arb │ ├── intl_pt.arb │ └── intl_de.arb └── main.dart ├── .metadata ├── snap └── snapcraft.yaml ├── test └── widget_test.dart ├── .gitignore ├── pubspec.yaml ├── .gitlab-ci.yml └── README.md /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /windows/flutter/.template_version: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/title.txt: -------------------------------------------------------------------------------- 1 | Xournal++ Mobile 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /go/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .last_goflutter_check 3 | .last_go-flutter_check 4 | -------------------------------------------------------------------------------- /linux/xournalpp-mobile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec /opt/xournalpp-mobile/xournalpp-mobile 4 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/web/favicon.png -------------------------------------------------------------------------------- /go/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/go/assets/icon.png -------------------------------------------------------------------------------- /assets/snapraft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/snapraft.png -------------------------------------------------------------------------------- /assets/xournalpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/xournalpp.png -------------------------------------------------------------------------------- /web/icons/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/web/icons/Icon-1024.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /assets/feature-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/feature-banner.png -------------------------------------------------------------------------------- /assets/xournalpp-android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/xournalpp-android.png -------------------------------------------------------------------------------- /assets/xournalpp-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/xournalpp-mobile.png -------------------------------------------------------------------------------- /assets/xournalpp-solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/xournalpp-solid.png -------------------------------------------------------------------------------- /assets/xournalpp-adaptive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/assets/xournalpp-adaptive.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /fonts/Open Sans/OpenSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fonts/Open Sans/OpenSans-Light.ttf -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fonts/Open Sans/OpenSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fonts/Open Sans/OpenSans-ExtraBold.ttf -------------------------------------------------------------------------------- /fonts/Open Sans/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fonts/Open Sans/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter/analysis_options_user.yaml 2 | analyzer: 3 | optional-checks: 4 | chrome-os-manifest-checks 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/src/globals.dart: -------------------------------------------------------------------------------- 1 | dynamic lastIntentData; 2 | 3 | class PreferencesKeys { 4 | static const String kRecentFiles = 'recentFiles'; 5 | } 6 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/icon.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/short_description.txt: -------------------------------------------------------------------------------- 1 | A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web. 2 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | xournalpp-mobile (VERSION) stable; urgency=medium 2 | 3 | * Automated release. 4 | 5 | -- The One With The Braid DATE 6 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #673ab7 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/featureGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/featureGraphic.png -------------------------------------------------------------------------------- /fonts/Glacial Indifference/GlacialIndifference-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fonts/Glacial Indifference/GlacialIndifference-Regular.otf -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/phoneScreenshots/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/phoneScreenshots/01.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/phoneScreenshots/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/phoneScreenshots/02.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/01.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/02.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/03.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/04.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/05.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/06.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/07.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/tenInchScreenshots/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/tenInchScreenshots/08.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/sevenInchScreenshots/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/sevenInchScreenshots/01.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/sevenInchScreenshots/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/sevenInchScreenshots/02.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/sevenInchScreenshots/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/sevenInchScreenshots/03.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/sevenInchScreenshots/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/sevenInchScreenshots/04.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/images/sevenInchScreenshots/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/fastlane/metadata/android/en_US/images/sevenInchScreenshots/05.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /lib/main_desktop.dart: -------------------------------------------------------------------------------- 1 | import 'main.dart' as original_main; 2 | 3 | // This file is the default main entry-point for go-flutter application. 4 | void main() { 5 | original_main.main(); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xournalpp/xournalpp_mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/online/xournal/mobile/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package online.xournal.mobile 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #DH_VERBOSE = 1 5 | 6 | %: 7 | dh $@ 8 | 9 | build: 10 | flutter build linux 11 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /go/go.mod: -------------------------------------------------------------------------------- 1 | module xournalpp/go 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/go-flutter-desktop/go-flutter v0.41.2 7 | github.com/miguelpruivo/flutter_file_picker/go v0.0.0-20200604215027-87ee48b7f3f6 8 | github.com/pkg/errors v0.9.1 9 | ) 10 | -------------------------------------------------------------------------------- /lib/src/conditional/open_file/open_file_web.dart: -------------------------------------------------------------------------------- 1 | import 'package:file_picker_cross/file_picker_cross.dart'; 2 | 3 | FilePickerCross openFileByUri(String url, String extension) { 4 | throw (UnsupportedError('Opening local files is not supported on the web.')); 5 | } 6 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef CONSOLE_UTILS_H_ 2 | #define CONSOLE_UTILS_H_ 3 | 4 | // Creates a console for the process, and redirects stdout and stderr to 5 | // it for both the runner and the Flutter library. 6 | void CreateAndAttachConsole(); 7 | 8 | #endif // CONSOLE_UTILS_H_ 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 7 | -------------------------------------------------------------------------------- /lib/src/conditional/open_file/open_file_generic.dart: -------------------------------------------------------------------------------- 1 | import 'package:file_picker_cross/file_picker_cross.dart'; 2 | 3 | FilePickerCross openFileByUri(String url, String extension) { 4 | throw (UnimplementedError( 5 | 'Could not find any file open implementation for your platform.')); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /linux/xournalpp-mobile.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Xournal++ Mobile 3 | Comment=Infinitely take notes, sketch and learn 4 | Keywords=Tablet;Wacom;Pen Input;PDF Annotation;Markup 5 | Exec=xournalpp-mobile 6 | Terminal=false 7 | Icon=xournalpp-mobile 8 | Type=Application 9 | Categories=Office;GNOME;GTK; 10 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew.bat 5 | /local.properties 6 | GeneratedPluginRegistrant.java 7 | 8 | # Remember to never publicly share your keystore. 9 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 10 | key.properties 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /go/cmd/options.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/go-flutter-desktop/go-flutter" 5 | file_picker "github.com/miguelpruivo/flutter_file_picker/go" 6 | ) 7 | 8 | var options = []flutter.Option{ 9 | flutter.WindowInitialDimensions(800, 1280), 10 | flutter.AddPlugin(&file_picker.FilePickerPlugin{}), 11 | } 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /windows/runner/window_configuration.cpp: -------------------------------------------------------------------------------- 1 | #include "window_configuration.h" 2 | 3 | const wchar_t* kFlutterWindowTitle = L"Xournal++ Mobile"; 4 | const unsigned int kFlutterWindowOriginX = 10; 5 | const unsigned int kFlutterWindowOriginY = 10; 6 | const unsigned int kFlutterWindowWidth = 1280; 7 | const unsigned int kFlutterWindowHeight = 720; 8 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 54c9441723ec61baaeb0fbf71fdcf4e415116e6e 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 6 | #define GENERATED_PLUGIN_REGISTRANT_ 7 | 8 | #include 9 | 10 | // Registers Flutter plugins. 11 | void fl_register_plugins(FlPluginRegistry* registry); 12 | 13 | #endif // GENERATED_PLUGIN_REGISTRANT_ 14 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 6 | #define GENERATED_PLUGIN_REGISTRANT_ 7 | 8 | #include 9 | 10 | // Registers Flutter plugins. 11 | void RegisterPlugins(flutter::PluginRegistry* registry); 12 | 13 | #endif // GENERATED_PLUGIN_REGISTRANT_ 14 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | // Only X11 is currently supported. 5 | // Wayland support is being developed: https://github.com/flutter/flutter/issues/57932. 6 | gdk_set_allowed_backends("x11"); 7 | 8 | g_autoptr(MyApplication) app = my_application_new(); 9 | return g_application_run(G_APPLICATION(app), argc, argv); 10 | } 11 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | 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. -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /lib/src/conditional/open_file/open_file_io.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:typed_data'; 3 | 4 | import 'package:file_picker_cross/file_picker_cross.dart'; 5 | 6 | FilePickerCross openFileByUri(String url, String extension) { 7 | Uint8List bytes = File(url).readAsBytesSync(); 8 | return (FilePickerCross(bytes, 9 | path: url, type: FileTypeCross.custom, fileExtension: extension)); 10 | } 11 | -------------------------------------------------------------------------------- /debian/xournalpp-mobile.install: -------------------------------------------------------------------------------- 1 | build/linux/x64/release/bundle/xournalpp-mobile opt/xournalpp-mobile/ 2 | build/linux/x64/release/bundle/lib/ opt/xournalpp-mobile/ 3 | build/linux/x64/release/bundle/data/ opt/xournalpp-mobile/ 4 | linux/xournalpp-mobile usr/bin/ 5 | linux/xournalpp-mobile.desktop usr/share/applications/ 6 | assets/xournalpp-mobile.png usr/share/pixmaps/ 7 | assets/xournalpp-mobile.png usr/share/icons/hicolor/192x192/apps/ 8 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.downloads.read-write 8 | 9 | com.apple.security.files.user-selected.read-write 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: xournalpp-mobile 2 | Section: utils 3 | Priority: optional 4 | Maintainer: The One With The Braid 5 | Build-Depends: debhelper (>=10), clang, cmake, meson, libgtk-3-dev, pkg-config 6 | Standards-Version: 4.3.0 7 | Homepage: https://xournal.online/ 8 | 9 | Package: xournalpp-mobile 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends}, xdg-user-dirs 12 | Description: Infinitely take notes, sketch and learn -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.files.downloads.read-write 10 | 11 | com.apple.security.files.user-selected.read-write 12 | 13 | com.apple.security.network.server 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_linux 7 | printing 8 | url_launcher_linux 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_windows 7 | printing 8 | url_launcher_windows 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /go/hover.yaml: -------------------------------------------------------------------------------- 1 | #application-name: "xournalpp" # Uncomment to modify this value. 2 | #executable-name: "xournalpp" # Uncomment to modify this value. Only lowercase a-z, numbers, underscores and no spaces 3 | #package-name: "xournalpp" # Uncomment to modify this value. Only lowercase a-z, numbers and no underscores or spaces 4 | license: "" # MANDATORY: Fill in your SPDX license name: https://spdx.org/licenses 5 | target: lib/main_desktop.dart 6 | # opengl: "none" # Uncomment this line if you have trouble with your OpenGL driver (https://github.com/go-flutter-desktop/go-flutter/issues/272) 7 | docker: false 8 | engine-version: "" # change to a engine version commit 9 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "run_loop.cpp" 8 | "utils.cpp" 9 | "win32_window.cpp" 10 | "window_configuration.cpp" 11 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 12 | "Runner.rc" 13 | "runner.exe.manifest" 14 | ) 15 | apply_standard_settings(${BINARY_NAME}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 17 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 18 | add_dependencies(${BINARY_NAME} flutter_assemble) 19 | -------------------------------------------------------------------------------- /snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: xournalpp-mobile 2 | version: 1.0.1 3 | summary: Infinitely take notes, sketch and learn 4 | description: A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web. 5 | 6 | confinement: strict 7 | base: core18 8 | grade: stable 9 | 10 | apps: 11 | xournalpp-mobile: 12 | command: xournalpp-mobile 13 | extensions: [flutter-master] # Where "master" defines which Flutter channel to use for the build 14 | plugs: 15 | - network 16 | 17 | parts: 18 | xournalpp-mobile: 19 | source: . 20 | plugin: flutter 21 | flutter-target: lib/main.dart # The main entry-point file of the application 22 | 23 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #include "generated_plugin_registrant.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | FileSelectorPluginRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FileSelectorPlugin")); 14 | PrintingPluginRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("PrintingPlugin")); 16 | UrlLauncherPluginRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("UrlLauncherPlugin")); 18 | } 19 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = xournalpp 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = online.xournal.mobile 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 The one with the braid. All rights reserved. 15 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.6.3' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Xournal++ Mobile", 3 | "short_name": "Xournal++", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#FFFFFF", 7 | "theme_color": "#673ab7", 8 | "description": "A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web.", 9 | "orientation": "any", 10 | "prefer_related_applications": true, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-1024.png", 19 | "sizes": "1024x1024", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /lib/widgets/ContextualBottomSheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ContextualBottomSheet extends StatelessWidget { 4 | final List? children; 5 | 6 | const ContextualBottomSheet({Key? key, this.children}) : super(key: key); 7 | @override 8 | Widget build(BuildContext context) { 9 | return BottomSheet( 10 | onClosing: () { 11 | Navigator.of(context).pop(); 12 | }, 13 | elevation: 16, 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.only( 16 | topLeft: Radius.circular(16), topRight: Radius.circular(16)), 17 | ), 18 | builder: (context) => Padding( 19 | padding: const EdgeInsets.all(8.0), 20 | child: ListView(shrinkWrap: true, children: children!), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/HexColor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | /// creates a [Color] from an ARGB or RGB hex [String] known from HTML etc. 4 | /// source: https://stackoverflow.com/a/53905427 5 | class HexColor extends Color { 6 | static int _getColorFromHex(String hexColor) { 7 | hexColor = hexColor.toUpperCase().replaceAll("#", ""); 8 | if (hexColor.length == 6) { 9 | hexColor = "FF" + hexColor; 10 | } 11 | if (hexColor.length == 8) { 12 | hexColor = hexColor.substring(6, 8) + hexColor.substring(0, 6); 13 | } 14 | return int.parse(hexColor, radix: 16); 15 | } 16 | 17 | HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); 18 | } 19 | 20 | extension ColorX on Color { 21 | String toHexTriplet() => 22 | '#${(value & 0xFFFFFF).toRadixString(16).padLeft(6, '0').toUpperCase()}FF'; 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/PdfImage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:file_picker_cross/file_picker_cross.dart'; 4 | import 'package:printing/printing.dart'; 5 | import 'package:xournalpp/src/XppPage.dart'; 6 | 7 | const double DPI = 96; 8 | 9 | Future pdfPageCount(FilePickerCross pdf) => 10 | Printing.raster(pdf.toUint8List()).length; 11 | 12 | Future pdfImage(FilePickerCross pdf, int? page) async => 13 | Printing.raster(pdf.toUint8List(), dpi: 96) 14 | .toList() 15 | .then((value) => value[page!].toPng()); 16 | 17 | Future pdfPageSize(FilePickerCross pdf, int page) async { 18 | final raster = await Printing.raster(pdf.toUint8List(), dpi: DPI) 19 | .toList() 20 | .then((value) => value[page]); 21 | return XppPageSize( 22 | width: raster.width.toDouble(), height: raster.height.toDouble()); 23 | } 24 | -------------------------------------------------------------------------------- /windows/runner/window_configuration.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOW_CONFIGURATION_ 2 | #define WINDOW_CONFIGURATION_ 3 | 4 | // This is a temporary approach to isolate changes that people are likely to 5 | // make to main.cpp, where the APIs are still in flux. This will reduce the 6 | // need to resolve conflicts or re-create changes slightly differently every 7 | // time the Windows Flutter API surface changes. 8 | // 9 | // Longer term there should be simpler configuration options for common 10 | // customizations like this, without requiring native code changes. 11 | 12 | extern const wchar_t* kFlutterWindowTitle; 13 | extern const unsigned int kFlutterWindowOriginX; 14 | extern const unsigned int kFlutterWindowOriginY; 15 | extern const unsigned int kFlutterWindowWidth; 16 | extern const unsigned int kFlutterWindowHeight; 17 | 18 | #endif // WINDOW_CONFIGURATION_ 19 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en_US/full_description.txt: -------------------------------------------------------------------------------- 1 | A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web. 2 | 3 | # Try it out 4 | 5 | ***Mission completed:** We can now render strokes, images and text!. We thereby support the full `.xopp` file format.* :tada: 6 | 7 | *Please note: stroke support is incredibly bad. There are lots of errors thrown.* 8 | 9 | https://xournal.online/ 10 | 11 | Alternatively, you can download pre-build binaries for **Linux** and **Android** from the GitLab pipeline. 12 | 13 | ### Visible parts already working: 14 | 15 | - [x] Read the document title 16 | - [x] Read and display the number of pages 17 | - [x] Create thumbnails of the pages for the navigation bar 18 | - [x] Smooth fade in after thumbnail rendering 19 | - [x] Render images on the canvas 20 | - [x] Render text on the canvas 21 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #include "generated_plugin_registrant.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); 14 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar); 15 | g_autoptr(FlPluginRegistrar) printing_registrar = 16 | fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); 17 | printing_plugin_register_with_registrar(printing_registrar); 18 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 19 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 20 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 21 | } 22 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include "flutter/generated_plugin_registrant.h" 4 | 5 | FlutterWindow::FlutterWindow(RunLoop* run_loop, 6 | const flutter::DartProject& project) 7 | : run_loop_(run_loop), project_(project) {} 8 | 9 | FlutterWindow::~FlutterWindow() {} 10 | 11 | void FlutterWindow::OnCreate() { 12 | Win32Window::OnCreate(); 13 | 14 | // The size here is arbitrary since SetChildContent will resize it. 15 | flutter_controller_ = 16 | std::make_unique(100, 100, project_); 17 | RegisterPlugins(flutter_controller_.get()); 18 | run_loop_->RegisterFlutterInstance(flutter_controller_.get()); 19 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 20 | } 21 | 22 | void FlutterWindow::OnDestroy() { 23 | if (flutter_controller_) { 24 | run_loop_->UnregisterFlutterInstance(flutter_controller_.get()); 25 | flutter_controller_ = nullptr; 26 | } 27 | 28 | Win32Window::OnDestroy(); 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/XppPageContentWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:xournalpp/widgets/ToolBoxBottomSheet.dart'; 3 | 4 | typedef bool IsSelectableCallback(Offset offset); 5 | typedef bool ShouldCatchCallback(Offset offset, EditingTool tool); 6 | 7 | class XppPageContentWidget extends StatefulWidget { 8 | @required 9 | final Widget? child; 10 | @required 11 | final EditingTool? tool; 12 | @required 13 | final bool? catchTool; 14 | @required 15 | final Builder? contextMenuBuilder; 16 | @required 17 | final Function? onSelected; 18 | 19 | const XppPageContentWidget({ 20 | Key? key, 21 | this.child, 22 | this.tool, 23 | this.catchTool, 24 | this.contextMenuBuilder, 25 | this.onSelected, 26 | }) : super(key: key); 27 | 28 | @override 29 | _XppPageContentWidgetState createState() => _XppPageContentWidgetState(); 30 | } 31 | 32 | class _XppPageContentWidgetState extends State { 33 | @override 34 | Widget build(BuildContext context) { 35 | return GestureDetector( 36 | child: widget.child, 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_WINDOW_H_ 2 | #define FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "run_loop.h" 8 | #include "win32_window.h" 9 | 10 | #include 11 | 12 | // A window that does nothing but host a Flutter view. 13 | class FlutterWindow : public Win32Window { 14 | public: 15 | // Creates a new FlutterWindow driven by the |run_loop|, hosting a 16 | // Flutter view running |project|. 17 | explicit FlutterWindow(RunLoop* run_loop, 18 | const flutter::DartProject& project); 19 | virtual ~FlutterWindow(); 20 | 21 | protected: 22 | // Win32Window: 23 | void OnCreate() override; 24 | void OnDestroy() override; 25 | 26 | private: 27 | // The run loop driving events for this window. 28 | RunLoop* run_loop_; 29 | 30 | // The project to run. 31 | flutter::DartProject project_; 32 | 33 | // The Flutter instance hosted by this window. 34 | std::unique_ptr flutter_controller_; 35 | }; 36 | 37 | #endif // FLUTTER_WINDOW_H_ 38 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | import 'package:xournalpp/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(XournalppMobile()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import file_selector_macos 9 | import package_info 10 | import package_info_plus_macos 11 | import path_provider_macos 12 | import printing 13 | import share_plus_macos 14 | import shared_preferences_macos 15 | import url_launcher_macos 16 | 17 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 18 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) 19 | FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) 20 | FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) 21 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 22 | PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) 23 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 24 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 25 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/XppLayer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:xml/xml.dart'; 3 | import 'package:xournalpp/widgets/ToolBoxBottomSheet.dart'; 4 | 5 | import 'XppPageContentWidget.dart'; 6 | 7 | class XppLayer { 8 | XppLayer({this.content}); 9 | 10 | List? content; 11 | 12 | static XppLayer empty() => XppLayer(content: []); 13 | 14 | XmlElement toXmlElement() => XmlElement( 15 | XmlName('layer'), const [], content!.map((e) => e!.toXmlElement())); 16 | } 17 | 18 | abstract class XppContent { 19 | Offset? getOffset(); 20 | 21 | XppPageContentWidget render(); 22 | 23 | XmlElement toXmlElement(); 24 | 25 | bool shouldSelectAt({Offset? coordinates, EditingTool? tool}); 26 | 27 | bool inRegion({Offset? topLeft, Offset? bottomRight}); 28 | 29 | /// return [true] in case it should be fully deleted 30 | XppContentEraseData eraseWhere({Offset? coordinates, double? radius}) => 31 | XppContentEraseData(); 32 | } 33 | 34 | class XppContentEraseData { 35 | final bool affected; 36 | final bool delete; 37 | final List newContent; 38 | 39 | XppContentEraseData( 40 | {this.affected = false, this.delete = false, this.newContent = const []}); 41 | } 42 | -------------------------------------------------------------------------------- /lib/widgets/ZoomableWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ZoomableWidget extends StatefulWidget { 4 | @required 5 | final Widget? child; 6 | @required 7 | final TransformationController? controller; 8 | @required 9 | final GestureScaleUpdateCallback? onInteractionUpdate; 10 | final GestureScaleStartCallback? onInteractionStart; 11 | 12 | const ZoomableWidget( 13 | {Key? key, 14 | this.child, 15 | this.controller, 16 | this.onInteractionUpdate, 17 | this.onInteractionStart}) 18 | : super(key: key); 19 | 20 | @override 21 | ZoomableWidgetState createState() => ZoomableWidgetState(); 22 | } 23 | 24 | class ZoomableWidgetState extends State { 25 | bool enabled = false; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return InteractiveViewer( 30 | boundaryMargin: const EdgeInsets.all(16), 31 | onInteractionStart: widget.onInteractionStart, 32 | onInteractionUpdate: widget.onInteractionUpdate, 33 | panEnabled: enabled, 34 | scaleEnabled: true, 35 | transformationController: widget.controller, 36 | minScale: 0.1, 37 | maxScale: 5, 38 | child: widget.child!, 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /windows/runner/run_loop.h: -------------------------------------------------------------------------------- 1 | #ifndef RUN_LOOP_H_ 2 | #define RUN_LOOP_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | // A runloop that will service events for Flutter instances as well 10 | // as native messages. 11 | class RunLoop { 12 | public: 13 | RunLoop(); 14 | ~RunLoop(); 15 | 16 | // Prevent copying 17 | RunLoop(RunLoop const&) = delete; 18 | RunLoop& operator=(RunLoop const&) = delete; 19 | 20 | // Runs the run loop until the application quits. 21 | void Run(); 22 | 23 | // Registers the given Flutter instance for event servicing. 24 | void RegisterFlutterInstance( 25 | flutter::FlutterViewController* flutter_instance); 26 | 27 | // Unregisters the given Flutter instance from event servicing. 28 | void UnregisterFlutterInstance( 29 | flutter::FlutterViewController* flutter_instance); 30 | 31 | private: 32 | using TimePoint = std::chrono::steady_clock::time_point; 33 | 34 | // Processes all currently pending messages for registered Flutter instances. 35 | TimePoint ProcessFlutterMessages(); 36 | 37 | std::set flutter_instances_; 38 | }; 39 | 40 | #endif // RUN_LOOP_H_ 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Debian 44 | debhelper-build-stamp 45 | .debhelper 46 | *.deb 47 | *.dsc 48 | *.build 49 | *.buildinfo 50 | *.changes 51 | *.tar.gz 52 | *.substvars 53 | /.vagrant 54 | debian/hello 55 | debian/files 56 | debian/xournalpp-mobile 57 | /*/hello 58 | /tutorial-1/packageroot/usr 59 | 60 | # Exceptions to above rules. 61 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 62 | *.snap 63 | .gradle 64 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSApplicationCategoryType 24 | public.app-category.productivity 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | $(PRODUCT_COPYRIGHT) 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "run_loop.h" 7 | #include "utils.h" 8 | #include "window_configuration.h" 9 | 10 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 11 | _In_ wchar_t *command_line, _In_ int show_command) { 12 | // Attach to console when present (e.g., 'flutter run') or create a 13 | // new console when running with a debugger. 14 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 15 | CreateAndAttachConsole(); 16 | } 17 | 18 | // Initialize COM, so that it is available for use in the library and/or 19 | // plugins. 20 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 21 | 22 | RunLoop run_loop; 23 | 24 | flutter::DartProject project(L"data"); 25 | FlutterWindow window(&run_loop, project); 26 | Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY); 27 | Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight); 28 | if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) { 29 | return EXIT_FAILURE; 30 | } 31 | window.SetQuitOnClose(true); 32 | 33 | run_loop.Run(); 34 | 35 | ::CoUninitialize(); 36 | return EXIT_SUCCESS; 37 | } 38 | -------------------------------------------------------------------------------- /lib/widgets/QuotaTile.dart: -------------------------------------------------------------------------------- 1 | import 'package:file_picker_cross/file_picker_cross.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:xournalpp/generated/l10n.dart'; 5 | 6 | class QuotaTile extends StatefulWidget { 7 | @override 8 | _QuotaTileState createState() => _QuotaTileState(); 9 | } 10 | 11 | class _QuotaTileState extends State { 12 | FileQuotaCross? quota; 13 | @override 14 | void initState() { 15 | FilePickerCross.quota().then((value) => setState(() => quota = value)); 16 | super.initState(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | if (kIsWeb || 22 | [TargetPlatform.android, TargetPlatform.iOS] 23 | .contains(Theme.of(context).platform)) 24 | return (quota != null 25 | ? Text( 26 | S.of(context).quota + 27 | ': ${(quota!.quota / 1e6).round()} ' + 28 | S.of(context).mb + 29 | ' - ' + 30 | (quota!.relative * 100).round().toString() + 31 | '% ' + 32 | S.of(context).used, 33 | style: Theme.of(context).textTheme.subtitle2, 34 | ) 35 | : Center( 36 | child: CircularProgressIndicator(), 37 | )); 38 | else 39 | return Container(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Xournal++ Mobile 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /go/cmd/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "image" 6 | _ "image/png" 7 | "os" 8 | "path/filepath" 9 | "strings" 10 | 11 | "github.com/go-flutter-desktop/go-flutter" 12 | "github.com/pkg/errors" 13 | ) 14 | 15 | // vmArguments may be set by hover at compile-time 16 | var vmArguments string 17 | 18 | func main() { 19 | // DO NOT EDIT, add options in options.go 20 | mainOptions := []flutter.Option{ 21 | flutter.OptionVMArguments(strings.Split(vmArguments, ";")), 22 | flutter.WindowIcon(iconProvider), 23 | } 24 | err := flutter.Run(append(options, mainOptions...)...) 25 | if err != nil { 26 | fmt.Println(err) 27 | os.Exit(1) 28 | } 29 | } 30 | 31 | func iconProvider() ([]image.Image, error) { 32 | execPath, err := os.Executable() 33 | if err != nil { 34 | return nil, errors.Wrap(err, "failed to resolve executable path") 35 | } 36 | execPath, err = filepath.EvalSymlinks(execPath) 37 | if err != nil { 38 | return nil, errors.Wrap(err, "failed to eval symlinks for executable path") 39 | } 40 | imgFile, err := os.Open(filepath.Join(filepath.Dir(execPath), "assets", "icon.png")) 41 | if err != nil { 42 | return nil, errors.Wrap(err, "failed to open assets/icon.png") 43 | } 44 | img, _, err := image.Decode(imgFile) 45 | if err != nil { 46 | return nil, errors.Wrap(err, "failed to decode image") 47 | } 48 | return []image.Image{img}, nil 49 | } 50 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | struct _MyApplication { 8 | GtkApplication parent_instance; 9 | }; 10 | 11 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 12 | 13 | // Implements GApplication::activate. 14 | static void my_application_activate(GApplication* application) { 15 | GtkWindow* window = 16 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 17 | GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 18 | gtk_widget_show(GTK_WIDGET(header_bar)); 19 | gtk_header_bar_set_title(header_bar, "Xournal++ Mobile"); 20 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 21 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 22 | gtk_window_set_default_size(window, 1280, 720); 23 | gtk_widget_show(GTK_WIDGET(window)); 24 | 25 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 26 | 27 | FlView* view = fl_view_new(project); 28 | gtk_widget_show(GTK_WIDGET(view)); 29 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 30 | 31 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 32 | 33 | gtk_widget_grab_focus(GTK_WIDGET(view)); 34 | } 35 | 36 | static void my_application_class_init(MyApplicationClass* klass) { 37 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 38 | } 39 | 40 | static void my_application_init(MyApplication* self) {} 41 | 42 | MyApplication* my_application_new() { 43 | return MY_APPLICATION(g_object_new(my_application_get_type(), 44 | "application-id", APPLICATION_ID, 45 | nullptr)); 46 | } 47 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | xournalpp_mobile 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Xournal++ Mobile 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | UIInterfaceOrientationPortraitUpsideDown 35 | 36 | UISupportedInterfaceOrientations~ipad 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationPortraitUpsideDown 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UIViewControllerBasedStatusBarAppearance 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lib/src/XppPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/rendering.dart'; 3 | import 'package:xml/xml.dart'; 4 | import 'package:xournalpp/src/XppBackground.dart'; 5 | import 'package:xournalpp/src/XppLayer.dart'; 6 | 7 | class XppPage { 8 | XppPage({this.pageSize, this.background, this.layers}); 9 | 10 | /// create an empty page 11 | static XppPage empty({Color? background}) => XppPage( 12 | pageSize: XppPageSize.a4, 13 | background: 14 | XppBackgroundSolidLined(size: XppPageSize.a4, color: background), 15 | layers: [XppLayer.empty()]); 16 | 17 | XppPageSize? pageSize; 18 | XppBackground? background; 19 | @required 20 | List? layers; 21 | 22 | XmlElement toXmlElement() => XmlElement( 23 | XmlName('page'), 24 | [ 25 | XmlAttribute(XmlName('width'), pageSize!.width.toString()), 26 | XmlAttribute(XmlName('height'), pageSize!.height.toString()) 27 | ], 28 | [background!.toXmlElement()]..addAll(layers!.map((e) => e.toXmlElement()))); 29 | } 30 | 31 | class XppPageSize { 32 | /// The page width in pt 33 | final double? width; 34 | 35 | /// The page height in pt 36 | final double? height; 37 | 38 | XppPageSize({this.width, this.height}); 39 | 40 | /// create a [XppPageSize] from pt (Points) 41 | static XppPageSize fromMillimeter({required double width, required double height}) { 42 | return XppPageSize(width: pt2mm(width), height: pt2mm(height)); 43 | } 44 | 45 | /// helper function to convert mm to pt where 1 pt equals 1/72 inch 46 | static double pt2mm(double pt) => pt / 0.35277777777777775; 47 | 48 | static XppPageSize get a4 => 49 | XppPageSize.fromMillimeter(width: 210, height: 297); 50 | 51 | /// Ratio of width / height 52 | double get ratio => width! / height!; 53 | 54 | Size toSize() => Size(width!, height!); 55 | } 56 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | #endif // English (United States) resources 58 | ///////////////////////////////////////////////////////////////////////////// 59 | 60 | 61 | 62 | #ifndef APSTUDIO_INVOKED 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // 65 | // Generated from the TEXTINCLUDE 3 resource. 66 | // 67 | 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | #endif // not APSTUDIO_INVOKED 71 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: xournalpp 2 | description: A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web. 3 | 4 | publish_to: none 5 | 6 | version: 1.1.11+27 7 | 8 | environment: 9 | sdk: '>=2.12.0 <3.0.0' 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | file_picker_cross: ^4.4.2 15 | katex_flutter: ^4.0.2+26 16 | intl: ^0.17.0 17 | archive: ^3.1.2 18 | xml: ^5.1.1 19 | url_launcher: ^6.0.4 20 | transparent_image: ^2.0.0 21 | # catcher: ^0.4.0 22 | receive_sharing_intent: ^1.4.5 23 | after_layout: ^1.1.0 24 | flutter_dropzone: ^2.0.1 25 | shared_preferences: ^2.0.6 26 | flutter_absolute_path: 1.0.6 27 | matrix_gesture_detector: ^0.2.0-nullsafety.1 28 | vector_math: ^2.1.0 29 | dwds: ^11.0.2 30 | flutter_colorpicker: ^0.4.0 31 | package_info: ^2.0.2 32 | printing: ^5.2.1 33 | pdf: ^3.3.0 34 | # zefyr: ^0.12.0 35 | # notus: ^0.1.5 36 | 37 | dev_dependencies: 38 | flutter_test: 39 | sdk: 40 | flutter 41 | flutter_launcher_icons: ^0.9.0 42 | 43 | flutter_icons: 44 | android: true 45 | ios: true 46 | image_path: "assets/xournalpp.png" 47 | image_path_ios: "assets/xournalpp-solid.png" 48 | image_path_android: "assets/xournalpp-adaptive.png" 49 | adaptive_icon_background: "#673ab7" 50 | adaptive_icon_foreground: "assets/xournalpp-android.png" 51 | 52 | flutter: 53 | uses-material-design: true 54 | assets: 55 | - assets/ 56 | fonts: 57 | - family: Open Sans 58 | fonts: 59 | - asset: fonts/Open Sans/OpenSans-Regular.ttf 60 | - asset: fonts/Open Sans/OpenSans-Light.ttf 61 | weight: 300 62 | - asset: fonts/Open Sans/OpenSans-ExtraBold.ttf 63 | weight: 800 64 | - family: Glacial Indifference 65 | fonts: 66 | - asset: fonts/Glacial Indifference/GlacialIndifference-Regular.otf 67 | 68 | flutter_intl: 69 | enabled: true 70 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | def keystoreProperties = new Properties() 29 | def keystorePropertiesFile = rootProject.file('key.properties') 30 | if (keystorePropertiesFile.exists()) { 31 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 32 | } 33 | android { 34 | compileSdkVersion 30 35 | 36 | sourceSets { 37 | main.java.srcDirs += 'src/main/kotlin' 38 | } 39 | 40 | lintOptions { 41 | disable 'InvalidPackage' 42 | } 43 | 44 | defaultConfig { 45 | applicationId "online.xournal.mobile" 46 | minSdkVersion 19 47 | targetSdkVersion 30 48 | versionCode flutterVersionCode.toInteger() 49 | versionName flutterVersionName 50 | } 51 | 52 | signingConfigs { 53 | release { 54 | keyAlias keystoreProperties['keyAlias'] 55 | keyPassword keystoreProperties['keyPassword'] 56 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 57 | storePassword keystoreProperties['storePassword'] 58 | } 59 | } 60 | buildTypes { 61 | release { 62 | signingConfig signingConfigs.release 63 | } 64 | } 65 | } 66 | 67 | flutter { 68 | source '../..' 69 | } 70 | 71 | dependencies { 72 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 73 | } 74 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /windows/runner/run_loop.cpp: -------------------------------------------------------------------------------- 1 | #include "run_loop.h" 2 | 3 | #include 4 | // Don't stomp std::min/std::max 5 | #undef max 6 | #undef min 7 | 8 | #include 9 | 10 | RunLoop::RunLoop() {} 11 | 12 | RunLoop::~RunLoop() {} 13 | 14 | void RunLoop::Run() { 15 | bool keep_running = true; 16 | TimePoint next_flutter_event_time = TimePoint::clock::now(); 17 | while (keep_running) { 18 | std::chrono::nanoseconds wait_duration = 19 | std::max(std::chrono::nanoseconds(0), 20 | next_flutter_event_time - TimePoint::clock::now()); 21 | ::MsgWaitForMultipleObjects( 22 | 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), 23 | QS_ALLINPUT); 24 | bool processed_events = false; 25 | MSG message; 26 | // All pending Windows messages must be processed; MsgWaitForMultipleObjects 27 | // won't return again for items left in the queue after PeekMessage. 28 | while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { 29 | processed_events = true; 30 | if (message.message == WM_QUIT) { 31 | keep_running = false; 32 | break; 33 | } 34 | ::TranslateMessage(&message); 35 | ::DispatchMessage(&message); 36 | // Allow Flutter to process messages each time a Windows message is 37 | // processed, to prevent starvation. 38 | next_flutter_event_time = 39 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 40 | } 41 | // If the PeekMessage loop didn't run, process Flutter messages. 42 | if (!processed_events) { 43 | next_flutter_event_time = 44 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 45 | } 46 | } 47 | } 48 | 49 | void RunLoop::RegisterFlutterInstance( 50 | flutter::FlutterViewController* flutter_instance) { 51 | flutter_instances_.insert(flutter_instance); 52 | } 53 | 54 | void RunLoop::UnregisterFlutterInstance( 55 | flutter::FlutterViewController* flutter_instance) { 56 | flutter_instances_.erase(flutter_instance); 57 | } 58 | 59 | RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { 60 | TimePoint next_event_time = TimePoint::max(); 61 | for (auto flutter_controller : flutter_instances_) { 62 | std::chrono::nanoseconds wait_duration = 63 | flutter_controller->ProcessMessages(); 64 | if (wait_duration != std::chrono::nanoseconds::max()) { 65 | next_event_time = 66 | std::min(next_event_time, TimePoint::clock::now() + wait_duration); 67 | } 68 | } 69 | return next_event_time; 70 | } 71 | -------------------------------------------------------------------------------- /lib/generated/intl/messages_all.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart 2 | // This is a library that looks up messages for specific locales by 3 | // delegating to the appropriate library. 4 | 5 | // Ignore issues from commonly used lints in this file. 6 | // ignore_for_file:implementation_imports, file_names, unnecessary_new 7 | // ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering 8 | // ignore_for_file:argument_type_not_assignable, invalid_assignment 9 | // ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases 10 | // ignore_for_file:comment_references 11 | 12 | import 'dart:async'; 13 | 14 | import 'package:intl/intl.dart'; 15 | import 'package:intl/message_lookup_by_library.dart'; 16 | import 'package:intl/src/intl_helpers.dart'; 17 | 18 | import 'messages_de.dart' as messages_de; 19 | import 'messages_en.dart' as messages_en; 20 | import 'messages_pt.dart' as messages_pt; 21 | 22 | typedef Future LibraryLoader(); 23 | Map _deferredLibraries = { 24 | 'de': () => new Future.value(null), 25 | 'en': () => new Future.value(null), 26 | 'pt': () => new Future.value(null), 27 | }; 28 | 29 | MessageLookupByLibrary? _findExact(String localeName) { 30 | switch (localeName) { 31 | case 'de': 32 | return messages_de.messages; 33 | case 'en': 34 | return messages_en.messages; 35 | case 'pt': 36 | return messages_pt.messages; 37 | default: 38 | return null; 39 | } 40 | } 41 | 42 | /// User programs should call this before using [localeName] for messages. 43 | Future initializeMessages(String localeName) async { 44 | var availableLocale = Intl.verifiedLocale( 45 | localeName, (locale) => _deferredLibraries[locale] != null, 46 | onFailure: (_) => null); 47 | if (availableLocale == null) { 48 | return new Future.value(false); 49 | } 50 | var lib = _deferredLibraries[availableLocale]; 51 | await (lib == null ? new Future.value(false) : lib()); 52 | initializeInternalMessageLookup(() => new CompositeMessageLookup()); 53 | messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); 54 | return new Future.value(true); 55 | } 56 | 57 | bool _messagesExistFor(String locale) { 58 | try { 59 | return _findExact(locale) != null; 60 | } catch (e) { 61 | return false; 62 | } 63 | } 64 | 65 | MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { 66 | var actualLocale = 67 | Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); 68 | if (actualLocale == null) return null; 69 | return _findExact(actualLocale); 70 | } 71 | -------------------------------------------------------------------------------- /macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - file_chooser (0.0.2): 3 | - FlutterMacOS 4 | - FlutterMacOS (1.0.0) 5 | - package_info (0.0.1): 6 | - FlutterMacOS 7 | - path_provider (0.0.1) 8 | - path_provider_macos (0.0.1): 9 | - FlutterMacOS 10 | - shared_preferences (0.0.1) 11 | - shared_preferences_macos (0.0.1): 12 | - FlutterMacOS 13 | - url_launcher (0.0.1) 14 | - url_launcher_macos (0.0.1): 15 | - FlutterMacOS 16 | 17 | DEPENDENCIES: 18 | - file_chooser (from `Flutter/ephemeral/.symlinks/plugins/file_chooser/macos`) 19 | - FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64-release`) 20 | - package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`) 21 | - path_provider (from `Flutter/ephemeral/.symlinks/plugins/path_provider/macos`) 22 | - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) 23 | - shared_preferences (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences/macos`) 24 | - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) 25 | - url_launcher (from `Flutter/ephemeral/.symlinks/plugins/url_launcher/macos`) 26 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) 27 | 28 | EXTERNAL SOURCES: 29 | file_chooser: 30 | :path: Flutter/ephemeral/.symlinks/plugins/file_chooser/macos 31 | FlutterMacOS: 32 | :path: Flutter/ephemeral/.symlinks/flutter/darwin-x64-release 33 | package_info: 34 | :path: Flutter/ephemeral/.symlinks/plugins/package_info/macos 35 | path_provider: 36 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider/macos 37 | path_provider_macos: 38 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos 39 | shared_preferences: 40 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences/macos 41 | shared_preferences_macos: 42 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos 43 | url_launcher: 44 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher/macos 45 | url_launcher_macos: 46 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos 47 | 48 | SPEC CHECKSUMS: 49 | file_chooser: 24432cf5dc836722b05c11c2a0a30d19c3c9b996 50 | FlutterMacOS: 15bea8a44d2fa024068daa0140371c020b4b6ff9 51 | package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 52 | path_provider: e0848572d1d38b9a7dd099e79cf83f5b7e2cde9f 53 | path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b 54 | shared_preferences: 9fec34d1bd906196a4da48fcf6c3ad521cc00b8d 55 | shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e 56 | url_launcher: af78307ef9bafff91273b34f1c6c0c86a0004fd7 57 | url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4 58 | 59 | PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7 60 | 61 | COCOAPODS: 1.9.3 62 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def parse_KV_file(file, separator='=') 13 | file_abs_path = File.expand_path(file) 14 | if !File.exists? file_abs_path 15 | return []; 16 | end 17 | pods_ary = [] 18 | skip_line_start_symbols = ["#", "/"] 19 | File.foreach(file_abs_path) { |line| 20 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 21 | plugin = line.split(pattern=separator) 22 | if plugin.length == 2 23 | podname = plugin[0].strip() 24 | path = plugin[1].strip() 25 | podpath = File.expand_path("#{path}", file_abs_path) 26 | pods_ary.push({:name => podname, :path => podpath}); 27 | else 28 | puts "Invalid plugin specification: #{line}" 29 | end 30 | } 31 | return pods_ary 32 | end 33 | 34 | def pubspec_supports_macos(file) 35 | file_abs_path = File.expand_path(file) 36 | if !File.exists? file_abs_path 37 | return false; 38 | end 39 | File.foreach(file_abs_path) { |line| 40 | return true if line =~ /^\s*macos:/ 41 | } 42 | return false 43 | end 44 | 45 | target 'Runner' do 46 | use_frameworks! 47 | use_modular_headers! 48 | 49 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 50 | # referring to absolute paths on developers' machines. 51 | ephemeral_dir = File.join('Flutter', 'ephemeral') 52 | symlink_dir = File.join(ephemeral_dir, '.symlinks') 53 | symlink_plugins_dir = File.join(symlink_dir, 'plugins') 54 | system("rm -rf #{symlink_dir}") 55 | system("mkdir -p #{symlink_plugins_dir}") 56 | 57 | # Flutter Pods 58 | generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig')) 59 | if generated_xcconfig.empty? 60 | puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 61 | end 62 | generated_xcconfig.map { |p| 63 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 64 | symlink = File.join(symlink_dir, 'flutter') 65 | File.symlink(File.dirname(p[:path]), symlink) 66 | pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path])) 67 | end 68 | } 69 | 70 | # Plugin Pods 71 | plugin_pods = parse_KV_file('../.flutter-plugins') 72 | plugin_pods.map { |p| 73 | symlink = File.join(symlink_plugins_dir, p[:name]) 74 | File.symlink(p[:path], symlink) 75 | if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml')) 76 | pod p[:name], :path => File.join(symlink, 'macos') 77 | end 78 | } 79 | end 80 | 81 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 82 | install! 'cocoapods', :disable_input_output_paths => true 83 | -------------------------------------------------------------------------------- /lib/layer_contents/XppImage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:typed_data'; 4 | 5 | import 'package:file_picker_cross/file_picker_cross.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:transparent_image/transparent_image.dart'; 8 | import 'package:xml/xml.dart'; 9 | import 'package:xournalpp/src/XppLayer.dart'; 10 | import 'package:xournalpp/src/XppPageContentWidget.dart'; 11 | import 'package:xournalpp/widgets/ToolBoxBottomSheet.dart'; 12 | 13 | class XppImage extends XppContent { 14 | Offset? topLeft = Offset(0, 0); 15 | Offset? bottomRight = Offset(0, 0); 16 | 17 | @required 18 | final Uint8List? data; 19 | 20 | XppImage({this.data, this.topLeft, this.bottomRight}); 21 | 22 | static Future open({required Offset topLeft}) async { 23 | FilePickerCross image = 24 | await FilePickerCross.importFromStorage(type: FileTypeCross.image); 25 | 26 | /// rendering the [Uint8List] into an image to determinate the height and width 27 | MemoryImage memoryImage = MemoryImage(image.toUint8List()); 28 | Completer completer = new Completer(); 29 | memoryImage.resolve(ImageConfiguration()).addListener(ImageStreamListener( 30 | (ImageInfo info, bool _) => completer.complete(info.image))); 31 | Image renderedImage = await (completer.future as FutureOr); 32 | Offset bottomRight = Offset( 33 | topLeft.dx + renderedImage.width!, topLeft.dy + renderedImage.height!); 34 | return XppImage( 35 | data: image.toUint8List(), topLeft: topLeft, bottomRight: bottomRight); 36 | } 37 | 38 | @override 39 | XppPageContentWidget render() { 40 | return XppPageContentWidget( 41 | child: Stack( 42 | alignment: Alignment.center, 43 | children: [ 44 | CircularProgressIndicator(), 45 | FadeInImage( 46 | image: MemoryImage(data!), 47 | placeholder: MemoryImage(kTransparentImage), 48 | width: bottomRight!.dx - topLeft!.dx, 49 | height: bottomRight!.dy - topLeft!.dy, 50 | ) 51 | ], 52 | ), 53 | tool: EditingTool.IMAGE, 54 | ); 55 | } 56 | 57 | @override 58 | Offset? getOffset() => topLeft; 59 | 60 | @override 61 | XmlElement toXmlElement() => XmlElement(XmlName('image'), [ 62 | XmlAttribute(XmlName('left'), topLeft!.dx.toString()), 63 | XmlAttribute(XmlName('right'), bottomRight!.dx.toString()), 64 | XmlAttribute(XmlName('top'), topLeft!.dy.toString()), 65 | XmlAttribute(XmlName('bottom'), bottomRight!.dy.toString()), 66 | ], [ 67 | XmlText(base64Encode(data!)) 68 | ]); 69 | 70 | @override 71 | bool inRegion({Offset? topLeft, Offset? bottomRight}) { 72 | // TODO: implement inRegion 73 | throw UnimplementedError(); 74 | } 75 | 76 | @override 77 | bool shouldSelectAt({Offset? coordinates, EditingTool? tool}) { 78 | // TODO: implement shouldSelectAt 79 | throw UnimplementedError(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | 11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 12 | # which isn't available in 3.10. 13 | function(list_prepend LIST_NAME PREFIX) 14 | set(NEW_LIST "") 15 | foreach(element ${${LIST_NAME}}) 16 | list(APPEND NEW_LIST "${PREFIX}${element}") 17 | endforeach(element) 18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 19 | endfunction() 20 | 21 | # === Flutter Library === 22 | # System-level dependencies. 23 | find_package(PkgConfig REQUIRED) 24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 27 | pkg_check_modules(BLKID REQUIRED IMPORTED_TARGET blkid) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | PkgConfig::BLKID 70 | ) 71 | add_dependencies(flutter flutter_assemble) 72 | 73 | # === Flutter tool backend === 74 | # _phony_ is a non-existent file to force this command to run every time, 75 | # since currently there's no way to get a full input/output list from the 76 | # flutter tool. 77 | add_custom_command( 78 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 79 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 80 | COMMAND ${CMAKE_COMMAND} -E env 81 | ${FLUTTER_TOOL_ENVIRONMENT} 82 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 83 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 84 | VERBATIM 85 | ) 86 | add_custom_target(flutter_assemble DEPENDS 87 | "${FLUTTER_LIBRARY}" 88 | ${FLUTTER_LIBRARY_HEADERS} 89 | ) 90 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/layer_contents/XppTexImage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:katex_flutter/katex_flutter.dart'; 3 | import 'package:xml/xml.dart'; 4 | import 'package:xournalpp/layer_contents/XppText.dart'; 5 | import 'package:xournalpp/src/HexColor.dart'; 6 | import 'package:xournalpp/src/XppLayer.dart'; 7 | import 'package:xournalpp/src/XppPageContentWidget.dart'; 8 | import 'package:xournalpp/widgets/ToolBoxBottomSheet.dart'; 9 | 10 | class XppTexImage extends XppContent { 11 | Offset? topLeft = Offset(0, 0); 12 | 13 | /// TODO: proper implementation of bottom and right 14 | Offset? bottomRight = Offset(0, 0); 15 | 16 | @required 17 | final String? text; 18 | 19 | Color? color; 20 | 21 | XppTexImage({this.text, this.topLeft, this.bottomRight, this.color}); 22 | 23 | static Future edit( 24 | {required BuildContext context, 25 | String text = 'x^2', 26 | Offset? topLeft, 27 | Color? color}) async { 28 | var laTeXController = TextEditingController(text: text); 29 | bool? result = await showDialog( 30 | context: context, 31 | builder: (context) => AlertDialog( 32 | title: Text('Enter LaTeX code'), 33 | content: TextField( 34 | controller: laTeXController = laTeXController, 35 | decoration: InputDecoration( 36 | border: OutlineInputBorder(), 37 | labelText: 'LaTeX code', 38 | helperText: 'No delimiter required')), 39 | actions: [ 40 | TextButton( 41 | onPressed: () => Navigator.of(context).pop(false), 42 | child: Text('Cancel')), 43 | TextButton( 44 | onPressed: () => Navigator.of(context).pop(true), 45 | child: Text('Okay')) 46 | ], 47 | ), 48 | ); 49 | if (result == false) throw (UnsupportedError('Aborted.')); 50 | return (XppTexImage( 51 | text: laTeXController.text, topLeft: topLeft, color: color)); 52 | } 53 | 54 | @override 55 | XppPageContentWidget render() { 56 | print(color); 57 | return XppPageContentWidget( 58 | child: DefaultTextStyle( 59 | style: 60 | TextStyle(color: color, fontSize: 18), // TODO: implement text size 61 | child: new KaTeX(laTeXCode: Text('\$\\displaystyle{$text}\$')), 62 | ), 63 | onSelected: () => print('Edit LaTeX!'), 64 | tool: EditingTool.LATEX, 65 | ); 66 | } 67 | 68 | @override 69 | Offset? getOffset() => topLeft; 70 | 71 | @override 72 | XmlElement toXmlElement() => XmlElement(XmlName('teximage'), [ 73 | XmlAttribute(XmlName('text'), text!), 74 | XmlAttribute(XmlName('color'), color!.toHexTriplet()), 75 | XmlAttribute(XmlName('left'), topLeft!.dx.toString()), 76 | XmlAttribute(XmlName('right'), bottomRight?.dx.toString() ?? '0'), 77 | XmlAttribute(XmlName('top'), topLeft!.dy.toString()), 78 | XmlAttribute(XmlName('bottom'), bottomRight?.dy.toString() ?? '0'), 79 | ], [ 80 | XmlText(XppText.encodeText(text!)) 81 | ]); 82 | 83 | @override 84 | bool inRegion({Offset? topLeft, Offset? bottomRight}) { 85 | // TODO: implement inRegion 86 | throw UnimplementedError(); 87 | } 88 | 89 | @override 90 | bool shouldSelectAt({Offset? coordinates, EditingTool? tool}) { 91 | // TODO: implement shouldSelectAt 92 | throw UnimplementedError(); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/widgets/XppPageStack.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:typed_data'; 3 | import 'dart:ui' as ui; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/rendering.dart'; 7 | import 'package:xournalpp/src/XppBackground.dart'; 8 | import 'package:xournalpp/src/XppLayer.dart'; 9 | import 'package:xournalpp/src/XppPage.dart'; 10 | 11 | class XppPageStack extends StatefulWidget { 12 | final XppPage? page; 13 | 14 | const XppPageStack({Key? key, this.page}) : super(key: key); 15 | 16 | @override 17 | XppPageStackState createState() => XppPageStackState(); 18 | } 19 | 20 | class XppPageStackState extends State 21 | with AutomaticKeepAliveClientMixin { 22 | GlobalKey pngKey = GlobalKey(); 23 | XppPage? page; 24 | 25 | XppBackground? _lastKnownBackground; 26 | Widget background = Container(); 27 | 28 | @override 29 | void initState() { 30 | page = widget.page; 31 | super.initState(); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | super.build(context); 37 | List children = []; 38 | 39 | if (page!.background != null && _lastKnownBackground != page!.background) { 40 | _lastKnownBackground = page!.background; 41 | background = page!.background!.render(); 42 | } 43 | children.add(background); 44 | 45 | children.addAll(page!.layers!.map((e) => XppLayerStack( 46 | layer: e, 47 | ))); 48 | return RepaintBoundary( 49 | key: pngKey, 50 | child: SizedBox( 51 | width: page!.pageSize!.width, 52 | height: page!.pageSize!.height, 53 | child: (Stack(children: children)))); 54 | } 55 | 56 | void setPageData(XppPage pageData) { 57 | setState(() => page = pageData); 58 | } 59 | 60 | Future toPng() async { 61 | RenderRepaintBoundary boundary = 62 | pngKey.currentContext!.findRenderObject() as RenderRepaintBoundary; 63 | ui.Image image = await boundary.toImage(); 64 | ByteData byteData = await (image.toByteData(format: ui.ImageByteFormat.png) 65 | as FutureOr); 66 | Uint8List pngBytes = byteData.buffer.asUint8List(); 67 | return pngBytes; 68 | } 69 | 70 | @override 71 | bool get wantKeepAlive => true; 72 | 73 | @override 74 | void didUpdateWidget(covariant XppPageStack oldWidget) { 75 | setState(() {}); 76 | super.didUpdateWidget(oldWidget); 77 | } 78 | } 79 | 80 | class XppLayerStack extends StatefulWidget { 81 | final XppLayer? layer; 82 | 83 | const XppLayerStack({Key? key, this.layer}) : super(key: key); 84 | @override 85 | _XppLayerStackState createState() => _XppLayerStackState(); 86 | } 87 | 88 | class _XppLayerStackState extends State { 89 | Map renderedContent = {}; 90 | @override 91 | Widget build(BuildContext context) { 92 | List children = []; 93 | widget.layer!.content!.forEach((element) { 94 | if (element == null) return; 95 | if (!renderedContent.keys.contains(element)) { 96 | renderedContent[element] = Positioned( 97 | child: element.render(), 98 | top: element.getOffset()?.dy ?? 0, 99 | left: element.getOffset()?.dx ?? 0, 100 | ); 101 | } 102 | children.add(renderedContent[element]); 103 | }); 104 | return Stack( 105 | children: children as List, 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/l10n/intl_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "newDocument": "New Document", 3 | "tools": "Tools", 4 | "toolboxNotImplementedYet": "Toolbox not implemented yet.", 5 | "setDocumentTitle": "Set document title", 6 | "newTitle": "New title", 7 | "cancel": "Cancel", 8 | "apply": "Apply", 9 | "mobileEditionUnofficial": "official mobile app", 10 | "open": "Open", 11 | "newFile": "New", 12 | "save": "Save", 13 | "notImplemented": " (not implemented)", 14 | "about": "About", 15 | "aboutXournalMobileEdition": "About Xournal++ Mobile", 16 | "xournalMobileEditionIsAnUnofficialProjectTryingToMake": "Xournal++ Mobile is a project trying to make Xournal++ files and features available on different devices.", 17 | "aboutXournal": "About Xournal++", 18 | "sourceCode": "Source Code", 19 | "okay": "Okay", 20 | "doubleTapToChange": "Double tap to change.", 21 | "notWorkingYet": "Not working yet.", 22 | "loadingFile": "Loading file...", 23 | "noFileSelected": "No file selected", 24 | "youDidNotSelectAnyFile": "You did not select any file.", 25 | "close": "Close", 26 | "recentFiles": "Recent files", 27 | "newNotebook": "New Notebook", 28 | "noRecentFiles": "No recent files.", 29 | "openingFile": "Opening file", 30 | "errorOpeningFile": "Error opening file", 31 | "dropFilesToOpen": "Drop files to open", 32 | "errorLoadingFile": "Error loading file", 33 | "theFollowingErrorWasDetected": "The following error was detected:", 34 | "copyErrorMessage": "Copy error message", 35 | "imVerySorryButICouldntReadTheFile": "I'm very sorry, but I couldn't read the file ", 36 | "areYouSureIHaveThePermissionAndAreYou": ". Are you sure I have the permission? And are you sure it is a Xournal++ file?", 37 | "error": "Error", 38 | "youveBeenRedirectedToTheLocalApp": "You've been redirected to the local app.", 39 | "opening": "Opening", 40 | "background": "Background", 41 | "abort": "Abort", 42 | "home": "Home", 43 | "tool": "Tool", 44 | "pen": "Pen", 45 | "highlighter": "Highlighter", 46 | "move": "Move", 47 | "textNotImplemented": "Text (not implemented)", 48 | "latexNotImplemented": "LaTeX (not implemented)", 49 | "eraser": "Eraser", 50 | "selectNotImplemented": "Select (not implemented)", 51 | "strokeWidth": "Stroke width:", 52 | "selectColor": "Select color", 53 | "color": "Color", 54 | "whiteoutEraserNotImplemented": "Whiteout eraser (not implemented)", 55 | "addPage": "Add page", 56 | "thereWereNoMorePagesWeAddedOne": "There were no more pages. We added one.", 57 | "pdf": "PDF", 58 | "image": "Image", 59 | "dotted": "Dotted", 60 | "ruled": "Ruled", 61 | "graph": "Graph", 62 | "pageBackground": "Page background", 63 | "lined": "Lined", 64 | "deletePage": "Delete page", 65 | "movePage": "Move page", 66 | "newPageIndex": "New page index", 67 | "between1And": "Between 1 and", 68 | "savingFile": "Saving file...", 69 | "unfortunatelyThereWasAnErrorSavingThisFile": "Unfortunately, there was an error saving this file.", 70 | "successfullySaved": "Successfully saved.", 71 | "saveAs": "Save as...", 72 | "confirmDelete": "Confirm delete", 73 | "areYouSureToDeleteTheSelectedFileThisCannot": "Are you sure to delete the selected file? This cannot be undone.", 74 | "delete": "Delete", 75 | "quota": "Storage", 76 | "used": "used", 77 | "mb": "MB", 78 | "sharePage": "Share page...", 79 | "successfullyShared": "Successfully shared", 80 | "openNavigation": "Open navigation", 81 | "importPdf": "Import PDF" 82 | } -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/l10n/intl_pt.arb: -------------------------------------------------------------------------------- 1 | { 2 | "newDocument": "Novo Documento", 3 | "tools": "Ferramentas", 4 | "toolboxNotImplementedYet": "Caixa de ferramentas ainda não implementada.", 5 | "setDocumentTitle": "Definir título do documento.", 6 | "newTitle": "Novo título", 7 | "cancel": "Cancelar", 8 | "apply": "Aplicar", 9 | "mobileEditionUnofficial": "Aplicativo móvel oficial", 10 | "open": "Abrir", 11 | "newFile": "Novo", 12 | "save": "Salvar", 13 | "notImplemented": " (Não implementado)", 14 | "about": "Sobre", 15 | "aboutXournalMobileEdition": "Sobre o Xournal++ Mobile", 16 | "xournalMobileEditionIsAnUnofficialProjectTryingToMake": "Xournal++ Mobile é um projeto que visa tornar as funcionalidades de Xournal++ e seus arquivos disponíveis em diferentes aparelhos.", 17 | "aboutXournal": "Sobre o Xournal++", 18 | "sourceCode": "Código Fonte", 19 | "okay": "Okay", 20 | "doubleTapToChange": "Clique duplo para mudar.", 21 | "notWorkingYet": "Não está funcionando ainda.", 22 | "loadingFile": "Carregando arquivo...", 23 | "noFileSelected": "Nenhum arquivo selecionado", 24 | "youDidNotSelectAnyFile": "Você não selecionou nenhum arquivo.", 25 | "close": "Fechar", 26 | "recentFiles": "Arquivos recentes", 27 | "newNotebook": "Novo caderno", 28 | "noRecentFiles": "Nenhum arquivo recente.", 29 | "openingFile": "Abrindo arquivo", 30 | "errorOpeningFile": "Erro abrindo arquivo", 31 | "dropFilesToOpen": "Arraste arquivos para abrir", 32 | "errorLoadingFile": "Erro carregando arquivo", 33 | "theFollowingErrorWasDetected": "O seguinte erro foi detectado:", 34 | "copyErrorMessage": "Copiar mensagem de erro", 35 | "imVerySorryButICouldntReadTheFile": "Sinto muito, mas não pude ler o arquivo.", 36 | "areYouSureIHaveThePermissionAndAreYou": ". Tem certeza de que tenho a permissão necessária? E tem certeza de que é um arquivo Xournal++?", 37 | "error": "Erro", 38 | "youveBeenRedirectedToTheLocalApp": "Você foi redirecionado ao aplicativo local.", 39 | "opening": "Abrindo", 40 | "background": "Background", 41 | "abort": "Abortar", 42 | "home": "Início", 43 | "tool": "Ferramenta", 44 | "pen": "Caneta", 45 | "highlighter": "Marcador", 46 | "move": "Mover", 47 | "textNotImplemented": "Texto (não implementado)", 48 | "latexNotImplemented": "LaTeX (não implementado)", 49 | "eraser": "Apagador", 50 | "selectNotImplemented": "Selecionar (não implementado)", 51 | "strokeWidth": "Grossura da linha:", 52 | "selectColor": "Selecionar cor", 53 | "color": "Cor", 54 | "whiteoutEraserNotImplemented": "Corretivo (não implementado)", 55 | "addPage": "Adicionar página", 56 | "thereWereNoMorePagesWeAddedOne": "Não haviam mais páginas. Adicionamos uma.", 57 | "pdf": "PDF", 58 | "image": "Imagem", 59 | "dotted": "Pontilhado", 60 | "ruled": "Com linhas e margem", 61 | "graph": "Gráfico", 62 | "pageBackground": "Background da página", 63 | "lined": "Com linhas", 64 | "deletePage": "Deletar página", 65 | "movePage": "Mover página", 66 | "newPageIndex": "Nova página índice", 67 | "between1And": "Entre 1 e", 68 | "savingFile": "Salvando arquivo...", 69 | "unfortunatelyThereWasAnErrorSavingThisFile": "Infelizmente houve um erro ao salvar este arquivo.", 70 | "successfullySaved": "Salvo com sucesso", 71 | "saveAs": "Salvar como...", 72 | "confirmDelete": "Confirmar deleção", 73 | "areYouSureToDeleteTheSelectedFileThisCannot": "Tem certeza de que deseja deletar o arquivo selecionado? É irreversvel.", 74 | "delete": "Deletar", 75 | "quota": "Cota", 76 | "used": "utilizado", 77 | "mb": "MB", 78 | "sharePage": "Compartilhar página...", 79 | "successfullyShared": "Compartilhado com sucesso", 80 | "importPdf": "Importar PDF" 81 | } -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(runner LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "xournalpp-mobile") 5 | set(APPLICATION_ID "online.xournal.mobile") 6 | 7 | cmake_policy(SET CMP0063 NEW) 8 | 9 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 10 | 11 | # Configure build options. 12 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 13 | set(CMAKE_BUILD_TYPE "Debug" CACHE 14 | STRING "Flutter build mode" FORCE) 15 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 16 | "Debug" "Profile" "Release") 17 | endif() 18 | 19 | # Compilation settings that should be applied to most targets. 20 | function(APPLY_STANDARD_SETTINGS TARGET) 21 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 22 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 23 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 24 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 25 | endfunction() 26 | 27 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 28 | 29 | # Flutter library and tool build rules. 30 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 31 | 32 | # System-level dependencies. 33 | find_package(PkgConfig REQUIRED) 34 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 35 | 36 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 37 | 38 | # Application build 39 | add_executable(${BINARY_NAME} 40 | "main.cc" 41 | "my_application.cc" 42 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 43 | ) 44 | apply_standard_settings(${BINARY_NAME}) 45 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 46 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 47 | add_dependencies(${BINARY_NAME} flutter_assemble) 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # By default, "installing" just makes a relocatable bundle in the build 56 | # directory. 57 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 58 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 59 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 60 | endif() 61 | 62 | # Start with a clean build bundle directory every time. 63 | install(CODE " 64 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 65 | " COMPONENT Runtime) 66 | 67 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 68 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 69 | 70 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 71 | COMPONENT Runtime) 72 | 73 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 74 | COMPONENT Runtime) 75 | 76 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 77 | COMPONENT Runtime) 78 | 79 | if(PLUGIN_BUNDLED_LIBRARIES) 80 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 81 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | endif() 84 | 85 | # Fully re-copy the assets directory on each build to avoid having stale files 86 | # from a previous install. 87 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 88 | install(CODE " 89 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 90 | " COMPONENT Runtime) 91 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 92 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 93 | 94 | # Install the AOT library on non-Debug builds only. 95 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 96 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 97 | COMPONENT Runtime) 98 | endif() 99 | -------------------------------------------------------------------------------- /lib/layer_contents/XppText.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:xml/xml.dart'; 4 | import 'package:xournalpp/src/HexColor.dart'; 5 | import 'package:xournalpp/src/XppLayer.dart'; 6 | import 'package:xournalpp/src/XppPageContentWidget.dart'; 7 | import 'package:xournalpp/widgets/ToolBoxBottomSheet.dart'; 8 | 9 | class XppText extends XppContent { 10 | @required 11 | final Color? color; 12 | @required 13 | final double? size; 14 | @required 15 | final String? text; 16 | @required 17 | final Offset? offset; 18 | @required 19 | final String? fontFamily; 20 | 21 | XppText({this.size, this.offset, this.fontFamily, this.color, this.text}); 22 | 23 | @override 24 | Offset? getOffset() => offset; 25 | 26 | @override 27 | XppPageContentWidget render() { 28 | return XppPageContentWidget( 29 | child: RichTextField(), 30 | tool: EditingTool.TEXT, 31 | ); 32 | } 33 | 34 | @override 35 | XmlElement toXmlElement() => XmlElement(XmlName('text'), [ 36 | XmlAttribute(XmlName('font'), fontFamily!), 37 | XmlAttribute(XmlName('size'), size.toString()), 38 | XmlAttribute(XmlName('x'), offset!.dx.toString()), 39 | XmlAttribute(XmlName('y'), offset!.dy.toString()), 40 | XmlAttribute(XmlName('color'), color!.toHexTriplet()), 41 | ], [ 42 | XmlText(encodeText(text!)) 43 | ]); 44 | 45 | static String encodeText(String text) { 46 | text.replaceAll(r'&', r'&'); 47 | text.replaceAll(r'<', r'<'); 48 | text.replaceAll(r'>', r'>'); 49 | return text; 50 | } 51 | 52 | @override 53 | bool inRegion({Offset? topLeft, Offset? bottomRight}) { 54 | // TODO: implement inRegion 55 | throw UnimplementedError(); 56 | } 57 | 58 | @override 59 | bool shouldSelectAt({Offset? coordinates, EditingTool? tool}) { 60 | // TODO: implement shouldSelectAt 61 | throw UnimplementedError(); 62 | } 63 | } 64 | 65 | class RichTextField extends StatefulWidget { 66 | final Function(String text)? onChange; 67 | 68 | final String? text; 69 | 70 | final double? size; 71 | 72 | final Color? color; 73 | 74 | const RichTextField( 75 | {Key? key, this.onChange, this.text, this.size, this.color}) 76 | : super(key: key); 77 | 78 | @override 79 | _RichTextFieldState createState() => _RichTextFieldState(); 80 | } 81 | 82 | class _RichTextFieldState extends State { 83 | //ZefyrController _controller; 84 | TextEditingController? _controller; 85 | FocusNode? _focusNode; 86 | 87 | bool active = false; 88 | 89 | @override 90 | void initState() { 91 | _controller = TextEditingController(text: widget.text); 92 | //_controller = ZefyrController( 93 | // NotusDocument.fromDelta(NotusMarkdownCodec().decode(widget.text))); 94 | _focusNode = FocusNode(); 95 | super.initState(); 96 | } 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | return XppPageContentWidget( 101 | child: TextField( 102 | controller: _controller, 103 | focusNode: _focusNode, 104 | ), 105 | ); 106 | /*return ZefyrEditor( 107 | controller: _controller, 108 | focusNode: _focusNode, 109 | autofocus: true, 110 | mode: active ? ZefyrMode.edit : ZefyrMode.select, 111 | );*/ 112 | } 113 | 114 | /*@override 115 | void dispose() { 116 | _controller.dispose(); 117 | super.dispose(); 118 | }*/ 119 | } 120 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef WIN32_WINDOW_H_ 2 | #define WIN32_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 12 | // inherited from by classes that wish to specialize with custom 13 | // rendering and input handling 14 | class Win32Window { 15 | public: 16 | struct Point { 17 | unsigned int x; 18 | unsigned int y; 19 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 20 | }; 21 | 22 | struct Size { 23 | unsigned int width; 24 | unsigned int height; 25 | Size(unsigned int width, unsigned int height) 26 | : width(width), height(height) {} 27 | }; 28 | 29 | Win32Window(); 30 | virtual ~Win32Window(); 31 | 32 | // Creates and shows a win32 window with |title| and position and size using 33 | // |origin| and |size|. New windows are created on the default monitor. Window 34 | // sizes are specified to the OS in physical pixels, hence to ensure a 35 | // consistent size to will treat the width height passed in to this function 36 | // as logical pixels and scale to appropriate for the default monitor. Returns 37 | // true if the window was created successfully. 38 | bool CreateAndShow(const std::wstring& title, 39 | const Point& origin, 40 | const Size& size); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | protected: 56 | // Processes and route salient window messages for mouse handling, 57 | // size change and DPI. Delegates handling of these to member overloads that 58 | // inheriting classes can handle. 59 | virtual LRESULT MessageHandler(HWND window, 60 | UINT const message, 61 | WPARAM const wparam, 62 | LPARAM const lparam) noexcept; 63 | 64 | // Called when CreateAndShow is called, allowing subclass window-related 65 | // setup. 66 | virtual void OnCreate(); 67 | 68 | // Called when Destroy is called. 69 | virtual void OnDestroy(); 70 | 71 | private: 72 | friend class WindowClassRegistrar; 73 | 74 | // OS callback called by message pump. Handles the WM_NCCREATE message which 75 | // is passed when the non-client area is being created and enables automatic 76 | // non-client DPI scaling so that the non-client area automatically 77 | // responsponds to changes in DPI. All other messages are handled by 78 | // MessageHandler. 79 | static LRESULT CALLBACK WndProc(HWND const window, 80 | UINT const message, 81 | WPARAM const wparam, 82 | LPARAM const lparam) noexcept; 83 | 84 | // Retrieves a class instance pointer for |window| 85 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 86 | 87 | bool quit_on_close_ = false; 88 | 89 | // window handle for top level window. 90 | HWND window_handle_ = nullptr; 91 | 92 | // window handle for hosted content. 93 | HWND child_content_ = nullptr; 94 | }; 95 | 96 | #endif // WIN32_WINDOW_H_ 97 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | ) 27 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 28 | add_library(flutter INTERFACE) 29 | target_include_directories(flutter INTERFACE 30 | "${EPHEMERAL_DIR}" 31 | ) 32 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 33 | add_dependencies(flutter flutter_assemble) 34 | 35 | # === Wrapper === 36 | list(APPEND CPP_WRAPPER_SOURCES_CORE 37 | "engine_method_result.cc" 38 | "standard_codec.cc" 39 | ) 40 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 41 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 42 | "plugin_registrar.cc" 43 | ) 44 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 45 | list(APPEND CPP_WRAPPER_SOURCES_APP 46 | "flutter_view_controller.cc" 47 | ) 48 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 49 | 50 | # Wrapper sources needed for a plugin. 51 | add_library(flutter_wrapper_plugin STATIC 52 | ${CPP_WRAPPER_SOURCES_CORE} 53 | ${CPP_WRAPPER_SOURCES_PLUGIN} 54 | ) 55 | apply_standard_settings(flutter_wrapper_plugin) 56 | set_target_properties(flutter_wrapper_plugin PROPERTIES 57 | POSITION_INDEPENDENT_CODE ON) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | CXX_VISIBILITY_PRESET hidden) 60 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 61 | target_include_directories(flutter_wrapper_plugin PUBLIC 62 | "${WRAPPER_ROOT}/include" 63 | ) 64 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 65 | 66 | # Wrapper sources needed for the runner. 67 | add_library(flutter_wrapper_app STATIC 68 | ${CPP_WRAPPER_SOURCES_CORE} 69 | ${CPP_WRAPPER_SOURCES_APP} 70 | ) 71 | apply_standard_settings(flutter_wrapper_app) 72 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 73 | target_include_directories(flutter_wrapper_app PUBLIC 74 | "${WRAPPER_ROOT}/include" 75 | ) 76 | add_dependencies(flutter_wrapper_app flutter_assemble) 77 | 78 | # === Flutter tool backend === 79 | # _phony_ is a non-existent file to force this command to run every time, 80 | # since currently there's no way to get a full input/output list from the 81 | # flutter tool. 82 | add_custom_command( 83 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 84 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 85 | ${CPP_WRAPPER_SOURCES_APP} 86 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 87 | COMMAND ${CMAKE_COMMAND} -E env 88 | ${FLUTTER_TOOL_ENVIRONMENT} 89 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 90 | windows-x64 $ 91 | ) 92 | add_custom_target(flutter_assemble DEPENDS 93 | "${FLUTTER_LIBRARY}" 94 | ${FLUTTER_LIBRARY_HEADERS} 95 | ${CPP_WRAPPER_SOURCES_CORE} 96 | ${CPP_WRAPPER_SOURCES_PLUGIN} 97 | ${CPP_WRAPPER_SOURCES_APP} 98 | ) 99 | -------------------------------------------------------------------------------- /lib/l10n/intl_de.arb: -------------------------------------------------------------------------------- 1 | { 2 | "newDocument": "Neues Dokument", 3 | "tools": "Werkzeuge", 4 | "toolboxNotImplementedYet": "Werkzeugkasten noch nicht implementiert.", 5 | "setDocumentTitle": "Titel des Dokuments ändern", 6 | "newTitle": "Neuer Titel", 7 | "cancel": "Abbrechen", 8 | "apply": "Anwenden", 9 | "mobileEditionUnofficial": "offizielle Mobil-App", 10 | "open": "Öffnen", 11 | "newFile": "Neu", 12 | "save": "Speichern", 13 | "notImplemented": " (nicht implementiert)", 14 | "about": "About", 15 | "aboutXournalMobileEdition": "Über Xournal++ Mobile", 16 | "xournalMobileEditionIsAnUnofficialProjectTryingToMake": "Xournal++ Mobile ist ein Projekt, das es versucht, Xournal++ Dateien und -Funktionen auf anderen Geräten bereitzustellen.", 17 | "aboutXournal": "Über Xournal++", 18 | "sourceCode": "Quellcode", 19 | "okay": "Okay", 20 | "doubleTapToChange": "Doppelt tippen zum Ändern.", 21 | "notWorkingYet": "Funktioniert noch nicht.", 22 | "loadingFile": "Lade Datei...", 23 | "noFileSelected": "Keine Datei gewählt", 24 | "youDidNotSelectAnyFile": "Du hast keine Datei ausgewählt..", 25 | "close": "Schließen", 26 | "recentFiles": "Zuletzt verwendete Dokumente", 27 | "newNotebook": "Neues Notizbuch", 28 | "noRecentFiles": "Keine zuletzt verwendeten Dateien.", 29 | "openingFile": "Öffne Datei", 30 | "errorOpeningFile": "Fehler beim Öffnen der Datei", 31 | "dropFilesToOpen": "Dateien zum Öffnen hier hinschieben", 32 | "errorLoadingFile": "Fehler beim Öffnen der Datei", 33 | "theFollowingErrorWasDetected": "Folgender Fehler ist aufgetreten:", 34 | "copyErrorMessage": "Fehlermeldung kopieren", 35 | "imVerySorryButICouldntReadTheFile": "Es tut mir Leid, aber ich konnte die Datei ", 36 | "areYouSureIHaveThePermissionAndAreYou": " leider nicht lesen. Bist du dir sicher, dass ich dazu die Berechtigung habe, und, dass es eine richtige Xournal++ Datei ist?", 37 | "error": "Fehler", 38 | "youveBeenRedirectedToTheLocalApp": "Du wurdest in die lokale App weitergeleitet.", 39 | "opening": "Öffne", 40 | "background": "Hintergrund", 41 | "abort": "Abbrechen", 42 | "home": "Startseite", 43 | "tool": "Werkzeug", 44 | "pen": "Stift", 45 | "highlighter": "Textmarker", 46 | "move": "Bewegen", 47 | "textNotImplemented": "Text (nicht implementiert)", 48 | "latexNotImplemented": "LaTeX (nicht implementiert)", 49 | "eraser": "Radierer", 50 | "selectNotImplemented": "Auswählen (nicht implementiert)", 51 | "strokeWidth": "Stiftstärke:", 52 | "selectColor": "Farbe wählen", 53 | "color": "Farbe", 54 | "whiteoutEraserNotImplemented": "Killer (nicht implementiert)", 55 | "addPage": "Seite einfügen", 56 | "thereWereNoMorePagesWeAddedOne": "Es waren keine Seiten mehr übrig. Wir haben eine hinzugefügt.", 57 | "pdf": "PDF", 58 | "image": "Bild", 59 | "dotted": "Gepunktet", 60 | "ruled": "Liniert mit Rand", 61 | "graph": "Zeichnen", 62 | "pageBackground": "Hintergrund", 63 | "lined": "Liniert", 64 | "deletePage": "Seite löschen", 65 | "movePage": "Seite verschieben", 66 | "newPageIndex": "Neue Position der Seite", 67 | "between1And": "Zwischen 1 und", 68 | "savingFile": "Speichere Datei...", 69 | "unfortunatelyThereWasAnErrorSavingThisFile": "Leider gab es ein Problem beim Speichern dieser Datei.", 70 | "successfullySaved": "Erfolgreich gespeichert.", 71 | "saveAs": "Speichern unter...", 72 | "confirmDelete": "Lösche bestätigen", 73 | "areYouSureToDeleteTheSelectedFileThisCannot": "Bist du dir sicher, dass du die Datei löschen möchtest? Das kann nicht rückgängig gemacht werden..", 74 | "delete": "Löschen", 75 | "quota": "Speicher", 76 | "used": "verwendet", 77 | "mb": "MB", 78 | "sharePage": "Seite teilen...", 79 | "successfullyShared": "Erfolgreich geteilt:", 80 | "openNavigation": "Navigation öffnen", 81 | "importPdf": "PDF importieren" 82 | } -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(xournalpp LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "xournalpp-mobile") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 64 | 70 | 71 | 72 | 73 | 79 | 81 | 87 | 88 | 89 | 90 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: cirrusci/flutter:dev 2 | 3 | before_script: 4 | - echo "$keybase64" > ./keybase64 5 | - mkdir -p /builds/testapp-system/testapp-flutter/android/app/android/app/ 6 | - base64 -d ./keybase64 > /builds/testapp-system/testapp-flutter/android/app/android/app/key.jks 7 | - echo "$KEYPROPERTIES" > ./android/key.properties 8 | - export VERSION=$(cat pubspec.yaml | grep version | awk '{ print $2 }' | cut -f1 -d "+") 9 | 10 | stages: 11 | - build 12 | - deploy 13 | 14 | 15 | cache: 16 | key: ${CI_COMMIT_REF_SLUG} 17 | paths: 18 | - xournalpp-web-* 19 | 20 | build:apk: 21 | stage: build 22 | script: 23 | - set +o pipefail 24 | - flutter build apk 25 | - set -o pipefail 26 | - mv build/app/outputs/apk/release/app-release.apk xournalpp-mobile-$VERSION.apk 27 | artifacts: 28 | paths: 29 | - xournalpp-mobile-*.apk 30 | 31 | build:bundle: 32 | stage: build 33 | script: 34 | - flutter build appbundle 35 | - mv build/app/outputs/bundle/release/app-release.aab xournalpp-mobile-$VERSION.aab 36 | artifacts: 37 | paths: 38 | - xournalpp-mobile-*.aab 39 | 40 | build:web: 41 | stage: build 42 | script: 43 | - flutter config --enable-web 44 | - flutter pub get 45 | - set +o pipefail 46 | - flutter build web #--dart-define=FLUTTER_WEB_USE_SKIA=true 47 | - cp -r build/web xournalpp-web-$VERSION 48 | artifacts: 49 | paths: 50 | - xournalpp-web-* 51 | 52 | build:debian: 53 | stage: build 54 | image: ubuntu 55 | script: | 56 | export DEBIAN_FRONTEND=noninteractive 57 | # required to upgrade ubuntu base due to incompatible libraries 58 | apt update -qq 59 | apt install -y -qq wget tar unzip zip lib32stdc++6 lib32z1 git clang cmake ninja-build pkg-config libgtk-3-dev curl dh-make meson 60 | # flutter sdk setup 61 | git clone -b master https://github.com/flutter/flutter.git /flutter 62 | export PATH=$PATH:/flutter/bin 63 | flutter config --enable-linux-desktop 64 | sed -i "s/DATE/$(date -R)/g" debian/changelog 65 | sed -i "s/VERSION/$VERSION/g" debian/changelog 66 | dpkg-buildpackage 67 | mv ../xournalpp-mobile_*.deb xournalpp-mobile-$VERSION.deb 68 | artifacts: 69 | paths: 70 | - xournalpp-mobile-*.deb 71 | 72 | build:linux: 73 | stage: build 74 | image: snapcore/snapcraft:edge 75 | script: | 76 | # required to upgrade ubuntu base due to incompatible libraries 77 | sed -i "s/xenial/focal/g" /etc/apt/sources.list 78 | apt update -qq 79 | apt install -y -qq wget tar unzip zip lib32stdc++6 lib32z1 git clang cmake ninja-build pkg-config libgtk-3-dev curl 80 | # flutter sdk setup 81 | git clone -b master https://github.com/flutter/flutter.git /flutter 82 | export PATH=$PATH:/flutter/bin 83 | flutter config --enable-linux-desktop 84 | flutter build linux 85 | mv build/linux/x64/release/bundle xournalpp-mobile-$VERSION 86 | artifacts: 87 | paths: 88 | - xournalpp-mobile-* 89 | 90 | build:snap: 91 | stage: build 92 | image: snapcore/snapcraft:edge 93 | script: | 94 | # required to upgrade ubuntu base due to incompatible libraries 95 | sed -i "s/xenial/focal/g" /etc/apt/sources.list 96 | apt update -qq 97 | apt install -y -qq wget tar unzip zip lib32stdc++6 lib32z1 git clang cmake ninja-build pkg-config libgtk-3-dev curl 98 | # flutter sdk setup 99 | git clone -b master https://github.com/flutter/flutter.git /flutter 100 | export PATH=$PATH:/flutter/bin 101 | flutter config --enable-linux-desktop 102 | # ignore current snap version and set to pubspec version 103 | # "s/version\:\W\+[0-9]\+\.[0-9]\+\.[0-9]\+/version: $VERSION/g" or "s/[0-9]\+\.[0-9]\+\.[0-9]\+/$VERSION/g" 104 | sed -i "s/version\:\W\+[0-9]\+\.[0-9]\+\.[0-9]\+/version: $VERSION/g" snap/snapcraft.yaml 105 | echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login 106 | snapcraft login --with snapcraft.login 107 | set +o pipefail 108 | snapcraft 109 | mv *.snap xournalpp-mobile-$VERSION.snap 110 | snapcraft upload xournalpp-mobile-$VERSION.snap --release=stable 111 | artifacts: 112 | paths: 113 | - xournalpp-mobile-*.snap 114 | only: 115 | - tags 116 | except: 117 | - branches 118 | 119 | pages: 120 | stage: deploy 121 | image: alpine:latest 122 | script: 123 | - mkdir public 124 | - cp -r xournalpp-web-$VERSION/* public/ 125 | artifacts: 126 | paths: 127 | - public 128 | only: 129 | - master 130 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:xournalpp/pages/OpenPage.dart'; 6 | 7 | import 'generated/l10n.dart'; 8 | 9 | void main() { 10 | /* 11 | /// STEP 1. Create catcher configuration. 12 | /// Debug configuration with dialog report mode and console handler. It will show dialog and once user accepts it, error will be shown /// in console. 13 | CatcherOptions debugOptions = CatcherOptions(DialogReportMode(), [ 14 | ConsoleHandler(), 15 | ]); 16 | 17 | /// Release configuration. Same as above, but once user accepts dialog, user will be prompted to send email with crash to support. 18 | CatcherOptions releaseOptions = CatcherOptions(DialogReportMode(), [ 19 | EmailManualHandler(["the-one@with-the-braid.cf"]) 20 | ]); 21 | 22 | /// STEP 2. Pass your root widget (MyApp) along with Catcher configuration: 23 | Catcher(XournalppMobile(), 24 | debugConfig: debugOptions, releaseConfig: releaseOptions);*/ 25 | runApp(XournalppMobile()); 26 | } 27 | 28 | const Color kPrimaryColor = Colors.deepPurple; 29 | const Color kPrimaryColorAccent = Colors.deepPurpleAccent; 30 | const Color kSecondaryColor = Colors.pink; 31 | const Color kSecondaryColorAccent = Colors.pinkAccent; 32 | final Color? kDarkColor = Colors.blueGrey[900]; 33 | const Color kLightColor = Colors.white; 34 | 35 | const double kFontSizeDivision = 1.6; 36 | 37 | const double kHugeFontSize = 72 / kFontSizeDivision; 38 | const double kLargeFontSize = 28 / kFontSizeDivision; 39 | const double kBodyFontSize = 24 / kFontSizeDivision; 40 | const double kEmphasisFontSize = 25.2 / kFontSizeDivision; 41 | 42 | const TextStyle kHugeFont = TextStyle( 43 | fontFamily: 'Open Sans', 44 | fontWeight: FontWeight.w800, 45 | color: kSecondaryColor, 46 | height: 1.4, 47 | fontSize: kHugeFontSize); 48 | final TextStyle kLargeFont = TextStyle( 49 | fontFamily: 'Open Sans', 50 | fontSize: kLargeFontSize, 51 | color: kLightColor, 52 | height: 1.4, 53 | ); 54 | const TextStyle kBodyFont = TextStyle( 55 | fontFamily: 'Open Sans', 56 | fontWeight: FontWeight.w300, 57 | height: 1.4, 58 | fontSize: kBodyFontSize); 59 | const TextStyle kEmphasisFont = TextStyle( 60 | fontFamily: 'Glacial Indifference', 61 | fontSize: kEmphasisFontSize, 62 | height: 1.22, 63 | letterSpacing: 1.8); 64 | 65 | final kTextTheme = TextTheme( 66 | headline1: kHugeFont, 67 | headline2: kHugeFont, 68 | headline3: kLargeFont 69 | .copyWith(color: kDarkColor) 70 | .copyWith(fontSize: kLargeFontSize * kFontSizeDivision), 71 | headline4: kLargeFont.copyWith(color: kDarkColor), 72 | headline5: kLargeFont.copyWith(color: kDarkColor), 73 | headline6: kLargeFont.copyWith(color: kDarkColor), 74 | bodyText1: kBodyFont, 75 | bodyText2: kEmphasisFont, 76 | caption: kEmphasisFont, 77 | button: kEmphasisFont, 78 | ); 79 | 80 | final kColorScheme = ColorScheme( 81 | primary: kPrimaryColor, 82 | primaryVariant: kPrimaryColorAccent, 83 | secondary: kSecondaryColor, 84 | secondaryVariant: kSecondaryColorAccent, 85 | surface: kDarkColor!, 86 | background: kDarkColor!, 87 | error: Colors.deepOrange, 88 | onPrimary: kLightColor, 89 | onSecondary: kDarkColor!, 90 | onSurface: kDarkColor!, 91 | onBackground: kLightColor, 92 | onError: kLightColor, 93 | brightness: Brightness.dark, 94 | ); 95 | 96 | final kDialogTheme = 97 | DialogTheme(titleTextStyle: kLargeFont.copyWith(color: kLightColor)); 98 | 99 | final kSnackBarTheme = SnackBarThemeData( 100 | backgroundColor: kDarkColor, 101 | actionTextColor: kSecondaryColorAccent, 102 | contentTextStyle: kBodyFont); 103 | 104 | class XournalppMobile extends StatelessWidget { 105 | // This widget is the root of your application. 106 | @override 107 | Widget build(BuildContext context) { 108 | return MaterialApp( 109 | debugShowCheckedModeBanner: false, 110 | title: kIsWeb ? 'Xournal++ Web' : 'Xournal++ Mobile', 111 | localizationsDelegates: [ 112 | S.delegate, 113 | DefaultMaterialLocalizations.delegate, 114 | ], 115 | supportedLocales: S.delegate.supportedLocales, 116 | theme: ThemeData( 117 | primarySwatch: kPrimaryColor as MaterialColor?, 118 | accentColor: kSecondaryColor, 119 | fontFamily: 'Open Sans', 120 | textTheme: kTextTheme, 121 | colorScheme: kColorScheme.copyWith(brightness: Brightness.light), 122 | visualDensity: VisualDensity.adaptivePlatformDensity, 123 | dialogTheme: kDialogTheme, 124 | snackBarTheme: kSnackBarTheme), 125 | darkTheme: ThemeData( 126 | primarySwatch: kPrimaryColor as MaterialColor?, 127 | accentColor: kSecondaryColor, 128 | fontFamily: 'Open Sans', 129 | textTheme: kTextTheme, 130 | colorScheme: kColorScheme, 131 | visualDensity: VisualDensity.adaptivePlatformDensity, 132 | dialogTheme: kDialogTheme, 133 | snackBarTheme: kSnackBarTheme), 134 | home: OpenPage(), 135 | ); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /go/go.sum: -------------------------------------------------------------------------------- 1 | github.com/Xuanwo/go-locale v0.3.0 h1:clHbJN2GT4xGZ8BqcIJr42Yfoe06iYzI36LIxBnQ6DY= 2 | github.com/Xuanwo/go-locale v0.3.0/go.mod h1:6qbT9M726OJgyiGZro2YwPmx63wQzlH+VvtjJWQoftw= 3 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 5 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 6 | github.com/gen2brain/dlgs v0.0.0-20190708095831-3854608588f7 h1:qA8Mdjwrlv/r/aMqArqO0IMHUiy6ApdW4+8DtKr7PvA= 7 | github.com/gen2brain/dlgs v0.0.0-20190708095831-3854608588f7/go.mod h1:/eFcjDXaU2THSOOqLxOPETIbHETnamk8FA/hMjhg/gU= 8 | github.com/go-flutter-desktop/go-flutter v0.30.0/go.mod h1:NCryd/AqiRbYSd8pMzQldYkgH1tZIFGt2ToUghZcWGA= 9 | github.com/go-flutter-desktop/go-flutter v0.41.2 h1:DYy2ghZ+VxxbltCG9BXSApLKUQH3Ia89zSUdeIqYEgo= 10 | github.com/go-flutter-desktop/go-flutter v0.41.2/go.mod h1:qDG/ylPWgvZOL0IjId3ndUKm9T4czrlFAQYUm2dqzis= 11 | github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw= 12 | github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk= 13 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= 14 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 15 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200707082815-5321531c36a2 h1:Ac1OEHHkbAZ6EUnJahF0GKcU0FjPc/V8F1DvjhKngFE= 16 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200707082815-5321531c36a2/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 17 | github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= 18 | github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= 19 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= 20 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 21 | github.com/gopherjs/gopherjs v0.0.0-20190915194858-d3ddacdb130f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 22 | github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 23 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 24 | github.com/miguelpruivo/flutter_file_picker v1.4.3 h1:4no+PtzEL9ooQXXVI7lVKgva4/nZYKEPWlcVesmZdbk= 25 | github.com/miguelpruivo/flutter_file_picker/go v0.0.0-20200604215027-87ee48b7f3f6 h1:3KjDn35LWBOQ3nX6ba3ws+bzSNxWolozaqVXts/+n2g= 26 | github.com/miguelpruivo/flutter_file_picker/go v0.0.0-20200604215027-87ee48b7f3f6/go.mod h1:csuW+TFyYKtiUwNvcvhcpyX4quPI7Pvv0SUogdqCW4I= 27 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 28 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 29 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 30 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 31 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 32 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= 33 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 34 | github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= 35 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 36 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 37 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 38 | github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= 39 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 40 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 41 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 42 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 43 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 44 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 45 | golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= 46 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 47 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 48 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 49 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 50 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 51 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 52 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 53 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 54 | -------------------------------------------------------------------------------- /lib/widgets/MainDrawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:package_info/package_info.dart'; 3 | import 'package:url_launcher/url_launcher.dart'; 4 | import 'package:xournalpp/generated/l10n.dart'; 5 | import 'package:xournalpp/pages/CanvasPage.dart'; 6 | import 'package:xournalpp/pages/OpenPage.dart'; 7 | import 'package:xournalpp/src/XppFile.dart'; 8 | import 'package:xournalpp/widgets/QuotaTile.dart'; 9 | 10 | class MainDrawer extends StatefulWidget { 11 | @override 12 | _MainDrawerState createState() => _MainDrawerState(); 13 | } 14 | 15 | class _MainDrawerState extends State { 16 | PackageInfo? info; 17 | 18 | @override 19 | void initState() { 20 | PackageInfo.fromPlatform().then((value) => info = value); 21 | super.initState(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Hero( 27 | tag: MainDrawer, 28 | child: Drawer( 29 | child: Column( 30 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 31 | mainAxisSize: MainAxisSize.min, 32 | children: [ 33 | Column( 34 | mainAxisAlignment: MainAxisAlignment.start, 35 | mainAxisSize: MainAxisSize.min, 36 | children: [ 37 | Semantics( 38 | // unnecessary information for screen readers etc. 39 | hidden: true, 40 | child: UserAccountsDrawerHeader( 41 | accountName: Text( 42 | 'Xournal++', 43 | style: Theme.of(context).textTheme.headline1, 44 | ), 45 | accountEmail: Text(S.of(context).mobileEditionUnofficial, 46 | style: Theme.of(context).textTheme.headline6), 47 | currentAccountPicture: Image.asset('assets/xournalpp.png'), 48 | ), 49 | ), 50 | ListTile( 51 | leading: Icon(Icons.home), 52 | title: Text(S.of(context).home), 53 | onTap: () => Navigator.of(context).pushReplacement( 54 | MaterialPageRoute(builder: (context) => OpenPage())), 55 | ), 56 | ListTile( 57 | leading: Icon(Icons.folder), 58 | title: Text(S.of(context).open), 59 | onTap: () => XppFile.openAndEdit(context: context)), 60 | ListTile( 61 | leading: Icon(Icons.insert_drive_file), 62 | title: Text(S.of(context).newFile), 63 | onTap: () => 64 | Navigator.of(context).pushReplacement(MaterialPageRoute( 65 | builder: (context) => CanvasPage( 66 | file: XppFile.empty( 67 | background: Theme.of(context).cardColor), 68 | ))), 69 | ), 70 | Divider(), 71 | ], 72 | ), 73 | Column( 74 | mainAxisSize: MainAxisSize.min, 75 | children: [ 76 | QuotaTile(), 77 | Divider(), 78 | ListTile( 79 | leading: Icon(Icons.info), 80 | title: Text(S.of(context).about), 81 | onTap: () => showAboutDialog( 82 | context: context, 83 | applicationName: 84 | S.of(context).aboutXournalMobileEdition, 85 | applicationVersion: 86 | 'Version ${info?.version} build ${info?.buildNumber}', 87 | applicationIcon: 88 | Image.asset('assets/xournalpp.png', scale: 8), 89 | applicationLegalese: 'Powered by TestApp.schule', 90 | children: [ 91 | Image.asset('assets/feature-banner.png', scale: 2), 92 | if (!(Theme.of(context).platform == 93 | TargetPlatform.iOS) && 94 | !(Theme.of(context).platform == 95 | TargetPlatform.macOS)) 96 | ElevatedButton.icon( 97 | onPressed: () => 98 | launch('https://buymeacoff.ee/braid'), 99 | icon: Icon(Icons.emoji_food_beverage), 100 | label: Text('Buy me a cup of tea')), 101 | OutlinedButton( 102 | onPressed: () => launch(Uri.encodeFull( 103 | 'https://github.com/xournalpp/xournalpp')), 104 | child: Text(S.of(context).aboutXournal)), 105 | OutlinedButton( 106 | onPressed: () => launch(Uri.encodeFull( 107 | 'https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile')), 108 | child: Text(S.of(context).sourceCode)) 109 | ], 110 | )), 111 | ], 112 | ) 113 | ], 114 | ), 115 | ), 116 | ); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - catcher (0.0.1): 3 | - Flutter 4 | - device_info (0.0.1): 5 | - Flutter 6 | - disk_space (0.0.1): 7 | - Flutter 8 | - DKImagePickerController/Core (4.2.2): 9 | - DKImagePickerController/ImageDataManager 10 | - DKImagePickerController/Resource 11 | - DKImagePickerController/ImageDataManager (4.2.2) 12 | - DKImagePickerController/PhotoGallery (4.2.2): 13 | - DKImagePickerController/Core 14 | - DKPhotoGallery 15 | - DKImagePickerController/Resource (4.2.2) 16 | - DKPhotoGallery (0.0.14): 17 | - DKPhotoGallery/Core (= 0.0.14) 18 | - DKPhotoGallery/Model (= 0.0.14) 19 | - DKPhotoGallery/Preview (= 0.0.14) 20 | - DKPhotoGallery/Resource (= 0.0.14) 21 | - SDWebImage 22 | - SDWebImageFLPlugin 23 | - DKPhotoGallery/Core (0.0.14): 24 | - DKPhotoGallery/Model 25 | - DKPhotoGallery/Preview 26 | - SDWebImage 27 | - SDWebImageFLPlugin 28 | - DKPhotoGallery/Model (0.0.14): 29 | - SDWebImage 30 | - SDWebImageFLPlugin 31 | - DKPhotoGallery/Preview (0.0.14): 32 | - DKPhotoGallery/Model 33 | - DKPhotoGallery/Resource 34 | - SDWebImage 35 | - SDWebImageFLPlugin 36 | - DKPhotoGallery/Resource (0.0.14): 37 | - SDWebImage 38 | - SDWebImageFLPlugin 39 | - file_picker (0.0.1): 40 | - DKImagePickerController/PhotoGallery 41 | - Flutter 42 | - FLAnimatedImage (1.0.12) 43 | - Flutter (1.0.0) 44 | - flutter_absolute_path (0.0.1): 45 | - Flutter 46 | - flutter_mailer (0.0.1): 47 | - Flutter 48 | - fluttertoast (0.0.2): 49 | - Flutter 50 | - package_info (0.0.1): 51 | - Flutter 52 | - path_provider (0.0.1): 53 | - Flutter 54 | - receive_sharing_intent (0.0.1): 55 | - Flutter 56 | - SDWebImage (5.9.1): 57 | - SDWebImage/Core (= 5.9.1) 58 | - SDWebImage/Core (5.9.1) 59 | - SDWebImageFLPlugin (0.4.0): 60 | - FLAnimatedImage (>= 1.0.11) 61 | - SDWebImage/Core (~> 5.6) 62 | - share (0.0.1): 63 | - Flutter 64 | - shared_preferences (0.0.1): 65 | - Flutter 66 | - url_launcher (0.0.1): 67 | - Flutter 68 | 69 | DEPENDENCIES: 70 | - catcher (from `.symlinks/plugins/catcher/ios`) 71 | - device_info (from `.symlinks/plugins/device_info/ios`) 72 | - disk_space (from `.symlinks/plugins/disk_space/ios`) 73 | - file_picker (from `.symlinks/plugins/file_picker/ios`) 74 | - Flutter (from `Flutter`) 75 | - flutter_absolute_path (from `.symlinks/plugins/flutter_absolute_path/ios`) 76 | - flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`) 77 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) 78 | - package_info (from `.symlinks/plugins/package_info/ios`) 79 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 80 | - receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`) 81 | - share (from `.symlinks/plugins/share/ios`) 82 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 83 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 84 | 85 | SPEC REPOS: 86 | trunk: 87 | - DKImagePickerController 88 | - DKPhotoGallery 89 | - FLAnimatedImage 90 | - SDWebImage 91 | - SDWebImageFLPlugin 92 | 93 | EXTERNAL SOURCES: 94 | catcher: 95 | :path: ".symlinks/plugins/catcher/ios" 96 | device_info: 97 | :path: ".symlinks/plugins/device_info/ios" 98 | disk_space: 99 | :path: ".symlinks/plugins/disk_space/ios" 100 | file_picker: 101 | :path: ".symlinks/plugins/file_picker/ios" 102 | Flutter: 103 | :path: Flutter 104 | flutter_absolute_path: 105 | :path: ".symlinks/plugins/flutter_absolute_path/ios" 106 | flutter_mailer: 107 | :path: ".symlinks/plugins/flutter_mailer/ios" 108 | fluttertoast: 109 | :path: ".symlinks/plugins/fluttertoast/ios" 110 | package_info: 111 | :path: ".symlinks/plugins/package_info/ios" 112 | path_provider: 113 | :path: ".symlinks/plugins/path_provider/ios" 114 | receive_sharing_intent: 115 | :path: ".symlinks/plugins/receive_sharing_intent/ios" 116 | share: 117 | :path: ".symlinks/plugins/share/ios" 118 | shared_preferences: 119 | :path: ".symlinks/plugins/shared_preferences/ios" 120 | url_launcher: 121 | :path: ".symlinks/plugins/url_launcher/ios" 122 | 123 | SPEC CHECKSUMS: 124 | catcher: e5585ed31458c849f4fd9c3719b2fcb0188b8918 125 | device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 126 | disk_space: e94d34bbdf77954adfb39e60bde9cc5c7233eda6 127 | DKImagePickerController: 4a3e7948a848c4348e600b3fe5ce41478835fa10 128 | DKPhotoGallery: 0290d32343574f06eaa4c26f8f2f8a1035e916be 129 | file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 130 | FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31 131 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 132 | flutter_absolute_path: 5adb13678c88f0bdfba527f3851f9543d01dde66 133 | flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83 134 | fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b 135 | package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 136 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 137 | receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1 138 | SDWebImage: a990c053fff71e388a10f3357edb0be17929c9c5 139 | SDWebImageFLPlugin: 6c2295fb1242d44467c6c87dc5db6b0a13228fd8 140 | share: 0b2c3e82132f5888bccca3351c504d0003b3b410 141 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d 142 | url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef 143 | 144 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 145 | 146 | COCOAPODS: 1.9.3 147 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /lib/widgets/XppPagesListView.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:typed_data'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:xournalpp/generated/l10n.dart'; 6 | import 'package:xournalpp/src/XppPage.dart'; 7 | import 'package:xournalpp/widgets/ContextualBottomSheet.dart'; 8 | 9 | import 'XppPageStack.dart'; 10 | 11 | class XppPagesListView extends StatefulWidget { 12 | @required 13 | final List? pages; 14 | @required 15 | final Function(int pageNumber)? onPageChange; 16 | final Function(int pageNumber)? onPageDelete; 17 | final Function(int pageNumber, int newIndex)? onPageMove; 18 | final int currentPage; 19 | 20 | const XppPagesListView( 21 | {Key? key, 22 | this.pages, 23 | this.onPageChange, 24 | this.currentPage = 0, 25 | this.onPageDelete, 26 | this.onPageMove}) 27 | : super(key: key); 28 | 29 | @override 30 | XppPagesListViewState createState() => XppPagesListViewState(); 31 | } 32 | 33 | class XppPagesListViewState extends State { 34 | Map> pageKeys = {}; 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return ListView.builder( 39 | itemBuilder: (c, i) { 40 | if (!pageKeys.keys.contains(i)) pageKeys[i] = GlobalKey(); 41 | final page = widget.pages![i]; 42 | return Padding( 43 | padding: const EdgeInsets.all(8.0), 44 | child: Center( 45 | child: GestureDetector( 46 | onTap: () { 47 | //setState(() => widget.currentPage = i); 48 | widget.onPageChange!(i); 49 | }, 50 | onSecondaryTap: () => showContext(i), 51 | onLongPress: () => showContext(i), 52 | child: Card( 53 | child: Container( 54 | decoration: BoxDecoration( 55 | color: Colors.white, 56 | border: (widget.currentPage == i) 57 | ? Border.all(color: Colors.red) 58 | : Border.all(color: Color.fromARGB(1, 0, 0, 0)), 59 | borderRadius: BorderRadius.circular(4)), 60 | child: ClipRRect( 61 | borderRadius: BorderRadius.circular(4), 62 | child: AspectRatio( 63 | aspectRatio: page.pageSize!.ratio, 64 | child: FittedBox( 65 | child: XppPageStack( 66 | key: pageKeys[i], 67 | page: page, 68 | ), 69 | ), 70 | ), 71 | ), 72 | ), 73 | ), 74 | ), 75 | ), 76 | ); 77 | }, 78 | itemCount: widget.pages!.length, 79 | scrollDirection: Axis.horizontal, 80 | shrinkWrap: true, 81 | physics: NeverScrollableScrollPhysics(), 82 | primary: false, 83 | ); 84 | } 85 | 86 | Future getPng(int i) { 87 | return pageKeys[i]!.currentState!.toPng(); 88 | } 89 | 90 | showContext(int i) => showModalBottomSheet( 91 | backgroundColor: Colors.transparent, 92 | context: context, 93 | builder: (context) => ContextualBottomSheet( 94 | children: [ 95 | ListTile( 96 | title: Text(S.of(context).deletePage), 97 | leading: Icon(Icons.delete_forever), 98 | onTap: () { 99 | widget.onPageDelete!(i); 100 | Navigator.of(context).pop(); 101 | }, 102 | ), 103 | ListTile( 104 | title: Text(S.of(context).movePage + '...'), 105 | leading: Icon(Icons.open_with), 106 | onTap: () async { 107 | int newIndex = i; 108 | if (await (showDialog( 109 | context: context, 110 | builder: (context) => AlertDialog( 111 | title: Text(S.of(context).movePage + ' $i'), 112 | content: TextField( 113 | onChanged: (string) => 114 | newIndex = int.parse(string), 115 | keyboardType: TextInputType.number, 116 | decoration: InputDecoration( 117 | labelText: S.of(context).newPageIndex, 118 | helperText: S.of(context).between1And + 119 | ' ${widget.pages!.length}.'), 120 | ), 121 | actions: [ 122 | TextButton( 123 | child: Text(S.of(context).cancel), 124 | onPressed: () => 125 | Navigator.of(context).pop(false), 126 | ), 127 | TextButton( 128 | child: Text(S.of(context).okay), 129 | onPressed: () { 130 | if (newIndex <= widget.pages!.length) 131 | Navigator.of(context).pop(true); 132 | }, 133 | ), 134 | ], 135 | )) as FutureOr)) { 136 | widget.onPageMove!(i, newIndex); 137 | } 138 | Navigator.of(context).pop(); 139 | }, 140 | ), 141 | ], 142 | )); 143 | } 144 | -------------------------------------------------------------------------------- /assets/xournalpp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xournal++ Mobile 2 | 3 | ***Warning:*** *Xournal++ Mobile is currently in early development and **not** yet stable. Use with caution!* 4 | 5 | [![Current version](https://img.shields.io/badge/dynamic/yaml?label=Current%20version&query=version&url=https%3A%2F%2Fgitlab.com%2FTheOneWithTheBraid%2Fxournalpp_mobile%2Fraw%2Fmaster%2Fpubspec.yaml%3Finline%3Dfalse&style=for-the-badge&logo=flutter&logoColor=white)](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/tags) [![Bitrise build](https://img.shields.io/bitrise/dd58f8fe5b4bf6c0?style=for-the-badge&token=Ihrbr8U0mqFlVBOocwtnQA&logo=bitrise&logoColor=white)](https://app.bitrise.io/app/dd58f8fe5b4bf6c0) [![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/TheOneWithTheBraid/xournalpp_mobile/master?style=for-the-badge&logo=gitlab&logoColor=white)](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/pipelines) [![Google Play](https://img.shields.io/endpoint?color=689f38&url=https%3A%2F%2Fplayshields.herokuapp.com%2Fplay%3Fi%3Donline.xournal.mobile%26l%3DGoogle-Play%26m%3D%24version&style=for-the-badge&logo=google-play&logoColor=white)](https://play.google.com/store/apps/details?id=online.xournal.mobile) [![Snap Store](https://img.shields.io/badge/Get%20it%20from%20the-Snap%20Store-%230e8620?style=for-the-badge&logo=snapcraft&logoColor=white)](https://snapcraft.io/xournalpp-mobile) 6 | 7 | A port of the main features of Xournal++ to various Flutter platforms like Android, iOS and the Web. 8 | 9 | ![Feature banner](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/raw/master/assets/feature-banner.svg) 10 | 11 | ## Try it out 12 | 13 | ***Mission completed:** We can now render strokes, images and text and LaTeX!. We thereby support the full `.xopp` file format.* :tada: 14 | 15 | - Web 16 | - [Open web app](https://xournal.online/) 17 | - [Access via TOR](http://xournaltdtf7ygqxg3qik4tdg476smkukogil74t6oxqiwdnumy53hqd.onion/) 18 | - Android 19 | - [Download in Google Play](https://play.google.com/store/apps/details?id=online.xournal.mobile) 20 | - [Download APK](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/jobs/artifacts/master/browse?job=build%3Aapk) 21 | - Windows 22 | - [Build for Windows](#desktop-support) 23 | - Linux 24 | - [Download for Debian](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/jobs/artifacts/master/browse?job=build%3Adebian) 25 | - [Download for generic Linux](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/jobs/artifacts/master/download?job=build%3Alinux) 26 | - [Download from the Snap Store](https://snapcraft.io/xournalpp-mobile) 27 | 28 | ```shell 29 | sudo snap install xournalpp-mobile 30 | ``` 31 | 32 | ### Visible parts already working 33 | 34 | - [x] Read the document title 35 | - [x] Read and display the number of pages 36 | - [x] Create thumbnails of the pages for the navigation bar 37 | - [x] Smooth fade in after thumbnail rendering 38 | - [x] Render images on the canvas 39 | - [x] Render text on the canvas 40 | - [x] Strokes 41 | - [x] Highlighter 42 | - [x] LaTeX 43 | - [x] Recent files list 44 | - [ ] Whiteout eraser 45 | - [x] Saving 46 | - [x] Basic editing 47 | - [x] Basic PDF rendering 48 | 49 | ## Known issues 50 | 51 | - **Immense memory consumption**: *If you open immense files, you get immense memory consumption. That's logic. Usually, Xournal++ Mobile takes twice the file size plus around 50MB for itself.* 52 | - But **why** does it take twice the memory?: *No idea. ¯\\\_(ツ)_/¯* 53 | - **The snap does not start on Linux when using wayland**: *Please set the environment variable `DISABLE_WAYLAND=1` before you start Xournal++ Mobile.* 54 | 55 | ## Getting started 56 | 57 | ### Prepare 58 | 59 | > You would like to contribute? Please check out issues to solve [here](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile/-/issues) or get our `// TODO:`s [here](https://gitlab.com/search?search=TODO&project_id=20056916)! 60 | 61 | *The **GitHub** repository is only a mirrored repository. Please only contribute to the [original repository on **GitLab**](https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile).* 62 | 63 | Get your information about the `.xopp` file format at http://www-math.mit.edu/~auroux/software/xournal/manual.html#file-format . 64 | 65 | Install Flutter first. See [flutter.dev](https://flutter.dev/docs/get-started/install) for more details. 66 | 67 | ```shell 68 | # Run Flutter doctor to check whether the installation was successful 69 | flutter doctor 70 | ``` 71 | 72 | ### Get the sources and run 73 | 74 | Connect any Android or iOS device. 75 | 76 | ```shell 77 | git clone https://gitlab.com/TheOneWithTheBraid/xournalpp_mobile.git 78 | cd xournalpp_mobile 79 | flutter run --no-sound-null-safety 80 | ``` 81 | 82 | ### Test for the web 83 | 84 | If you want to test for the web, please run: 85 | 86 | ```shell 87 | flutter channel beta 88 | flutter upgrade 89 | flutter config --enable-web 90 | flutter run -d web --release --no-sound-null-safety # unfortunately, the debug flavour will result an empty screen 91 | ``` 92 | 93 | ### Desktop support 94 | 95 | Linux is perfectly supported by Xournal++ Mobile and you can get prebuilt binaries [above](#try-it-out) or install from [Snap Store](https://snapcraft.io/xournalpp-mobile). 96 | 97 | Windows is supported and tested too, but there are unfortunately no prebuilt binaries available. Execute the following commands to build them yourself. 98 | 99 | If you want to test for Linux, Windows or macOS, please run: 100 | 101 | ```shell 102 | flutter channel master 103 | flutter upgrade 104 | flutter config --enable-linux-desktop # or --enable-macos-desktop or --enable-windows-desktop 105 | flutter run -d linux --no-sound-null-safety # or macos or windows 106 | ``` 107 | 108 | ## Colors and Typography 109 | 110 | ### Colors 111 | 112 | Our primary color is the Material DeepPurple. I simply prefer a colorful application over an old-fashioned gray GTK+ application. 113 | 114 | `#673ab7` / `rgb(103, 58, 183)` / `CMYK(44%, 68%, 0%, 28%)` / `hsl(261°, 51%, 48%)` 115 | 116 | The accent color is Material Pink. 117 | 118 | `#e91e63` / `rgb(233, 30, 99)` / `CMYK(0%, 87%, 58%, 9%)`/ `hsl(340°, 81%, 51%)` 119 | 120 | The light color is White. 121 | 122 | `#ffffff` / `rgb(255, 255, 255)` / `CMYK(0%, 0%, 0%, 0%)`/ `hsl(0°, 0%, 100%)` 123 | 124 | The dark color is Material Blue Grey 900. 125 | 126 | `#263238` / `rgb(38, 50, 56)` / `CMYK(32%, 11%, 0%, 78%)`/ `hsl(200°, 19%, 18%)` 127 | 128 | ### Fonts 129 | 130 | - Display Text: Open Sans Extra Bold *(800)* `Apache 2.0`, *accent color* or *light color* 131 | - Title and Heading: Open Sans Regular *(400)* `Apache 2.0`, *light color* 132 | - Emphasis: Glacial Indifference Regular *(400)* `SIL Open Font License`, *light color*, *UPPERCASE* 133 | - Body: Open Sans Light *(300)* `Apache 2.0`, *light color* 134 | 135 | ## Misc 136 | 137 | *Like this project? [Buy me a Coffee](https://buymeacoff.ee/braid).* 138 | 139 | This software is powered by the education software [TestApp](https://testapp.schule) — **Learning. Easily.** 140 | 141 | [![TestApp banner](https://gitlab.com/testapp-system/testapp-flutter/-/raw/mobile/assets/Google%20Play%20EN.png)](https://testapp.schule) 142 | 143 | ## Legal notes 144 | 145 | This project is licensed under the terms and conditions of the EUPL-1.2 found in [LICENSE](LICENSE). 146 | --------------------------------------------------------------------------------