diff --git a/.flutter-plugins b/.flutter-plugins index 0fc73ae..34ece9a 100644 --- a/.flutter-plugins +++ b/.flutter-plugins @@ -1,4 +1,8 @@ # This is a generated file; do not edit or check into version control. +bitsdojo_window=/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window-0.1.5/ +bitsdojo_window_linux=/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_linux-0.1.3/ +bitsdojo_window_macos=/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_macos-0.1.3/ +bitsdojo_window_windows=/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_windows-0.1.5/ device_info_plus=/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus-4.1.3/ device_info_plus_linux=/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_linux-3.0.0/ device_info_plus_macos=/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_macos-3.0.0/ @@ -13,5 +17,3 @@ path_provider_linux=/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_linux- path_provider_windows=/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.3/ pdfx=/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/ printing=/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/ -screen_retriever=/home/naoufal/.pub-cache/hosted/pub.dev/screen_retriever-0.1.6/ -window_manager=/home/naoufal/.pub-cache/hosted/pub.dev/window_manager-0.3.0/ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 5029ce4..1730b5e 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus-4.1.3/","native_build":true,"dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.1/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":["device_info_plus"]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus-4.1.3/","native_build":true,"dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"/home/naoufal/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.7/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_android-2.0.22/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":["device_info_plus"]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus_macos","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_macos-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.1/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]},{"name":"screen_retriever","path":"/home/naoufal/.pub-cache/hosted/pub.dev/screen_retriever-0.1.6/","native_build":true,"dependencies":[]},{"name":"window_manager","path":"/home/naoufal/.pub-cache/hosted/pub.dev/window_manager-0.3.0/","native_build":true,"dependencies":["screen_retriever"]}],"linux":[{"name":"device_info_plus_linux","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_linux-3.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]},{"name":"screen_retriever","path":"/home/naoufal/.pub-cache/hosted/pub.dev/screen_retriever-0.1.6/","native_build":true,"dependencies":[]},{"name":"window_manager","path":"/home/naoufal/.pub-cache/hosted/pub.dev/window_manager-0.3.0/","native_build":true,"dependencies":["screen_retriever"]}],"windows":[{"name":"device_info_plus_windows","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_windows-4.1.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]},{"name":"screen_retriever","path":"/home/naoufal/.pub-cache/hosted/pub.dev/screen_retriever-0.1.6/","native_build":true,"dependencies":[]},{"name":"window_manager","path":"/home/naoufal/.pub-cache/hosted/pub.dev/window_manager-0.3.0/","native_build":true,"dependencies":["screen_retriever"]}],"web":[{"name":"device_info_plus_web","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_web-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":["device_info_plus_macos","device_info_plus_linux","device_info_plus_web","device_info_plus_windows"]},{"name":"device_info_plus_linux","dependencies":[]},{"name":"device_info_plus_macos","dependencies":[]},{"name":"device_info_plus_web","dependencies":[]},{"name":"device_info_plus_windows","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"pdfx","dependencies":["device_info_plus"]},{"name":"printing","dependencies":[]},{"name":"screen_retriever","dependencies":[]},{"name":"window_manager","dependencies":["screen_retriever"]}],"date_created":"2023-02-25 14:39:42.635250","version":"3.7.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus-4.1.3/","native_build":true,"dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.1/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":["device_info_plus"]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus-4.1.3/","native_build":true,"dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"/home/naoufal/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.7/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_android-2.0.22/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":["device_info_plus"]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"bitsdojo_window_macos","path":"/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_macos-0.1.3/","native_build":true,"dependencies":[]},{"name":"device_info_plus_macos","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_macos-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.1/","native_build":true,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"bitsdojo_window_linux","path":"/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_linux-0.1.3/","native_build":true,"dependencies":[]},{"name":"device_info_plus_linux","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_linux-3.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"bitsdojo_window_windows","path":"/home/naoufal/.pub-cache/hosted/pub.dev/bitsdojo_window_windows-0.1.5/","native_build":true,"dependencies":[]},{"name":"device_info_plus_windows","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_windows-4.1.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/home/naoufal/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus_web","path":"/home/naoufal/.pub-cache/hosted/pub.dev/device_info_plus_web-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/naoufal/.pub-cache/hosted/pub.dev/file_picker-5.2.5/","dependencies":[]},{"name":"pdfx","path":"/home/naoufal/.pub-cache/hosted/pub.dev/pdfx-2.3.0/","dependencies":[]},{"name":"printing","path":"/home/naoufal/.pub-cache/hosted/pub.dev/printing-5.10.1/","dependencies":[]}]},"dependencyGraph":[{"name":"bitsdojo_window","dependencies":["bitsdojo_window_windows","bitsdojo_window_macos","bitsdojo_window_linux"]},{"name":"bitsdojo_window_linux","dependencies":[]},{"name":"bitsdojo_window_macos","dependencies":[]},{"name":"bitsdojo_window_windows","dependencies":[]},{"name":"device_info_plus","dependencies":["device_info_plus_macos","device_info_plus_linux","device_info_plus_web","device_info_plus_windows"]},{"name":"device_info_plus_linux","dependencies":[]},{"name":"device_info_plus_macos","dependencies":[]},{"name":"device_info_plus_web","dependencies":[]},{"name":"device_info_plus_windows","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"pdfx","dependencies":["device_info_plus"]},{"name":"printing","dependencies":[]}],"date_created":"2023-03-03 12:33:22.141483","version":"3.7.5"} \ No newline at end of file diff --git a/.kdev4/pdf_tools.kdev4 b/.kdev4/pdf_tools.kdev4 new file mode 100644 index 0000000..e7f800c --- /dev/null +++ b/.kdev4/pdf_tools.kdev4 @@ -0,0 +1,14 @@ +[Buildset] +BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x12\x00p\x00d\x00f\x00_\x00t\x00o\x00o\x00l\x00s) + +[Launch] +Launch Configurations=Launch Configuration 0 + +[Launch][Launch Configuration 0] +Configured Launch Modes=execute +Configured Launchers=scriptAppLauncher +Name=New Script Application Launcher +Type=Script Application + +[Project] +VersionControlSupport=kdevgit diff --git a/lib/main.dart b/lib/main.dart index bffed06..34cfcba 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,19 +1,25 @@ import 'dart:io'; import 'dart:ui' as ui; + +import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:pdf/pdf.dart'; -import 'package:printing/printing.dart'; import 'package:pdf/widgets.dart' as pw; -import 'package:window_manager/window_manager.dart'; +import 'package:printing/printing.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); - // Must add this line. - await windowManager.ensureInitialized(); + if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { - await windowManager.setSize(const Size(450, 300)); + doWhenWindowReady(() { + const initialSize = Size(600, 300); + appWindow.minSize = initialSize; + appWindow.maxSize = initialSize; + appWindow.size = initialSize; + appWindow.alignment = Alignment.center; + appWindow.show(); + }); } runApp(const MyApp()); } @@ -28,15 +34,126 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { String _openFilePath = ""; + bool loading = false; String? _encryption = ""; double _dpi = 200; + @override + Widget build(BuildContext context) { + // test(); + return MaterialApp( + home: Scaffold( + //appBar: AppBar(title: const Text("PDF Tools")), + body: Row( + children: [ + RightSide( + body: Padding( + padding: const EdgeInsets.all(8.0), + child: Column(children: [ + Row( + children: [ + Expanded( + child: ElevatedButton( + onPressed: (loading) ? null : () => openFile(), + child: Flex( + direction: Axis.vertical, + children: const [ + Icon(Icons.folder), + Text("Open pdf") + ], + )), + ), + const SizedBox( + width: 10, + ), + Expanded( + child: ElevatedButton( + onPressed: (_openFilePath.isEmpty || loading) + ? null + : () => saveFile(), + child: Flex( + direction: Axis.vertical, + children: const [ + Icon(Icons.save), + Text("save"), + ], + )), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 10, bottom: 10), + child: Row( + children: [ + Expanded( + child: Container( + decoration: BoxDecoration( + borderRadius: + const BorderRadius.all(Radius.circular(5)), + border: Border.all( + color: Colors.grey, + width: 1, + )), + padding: const EdgeInsets.only(top: 10, bottom: 10), + child: Padding( + padding: const EdgeInsets.only(left: 5, right: 5), + child: Text(_openFilePath), + ), + ), + ), + ], + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisSize: MainAxisSize.max, + children: [ + const Text("Quality :"), + Expanded( + child: Slider( + min: 100, + max: 500, + divisions: 20, + label: _dpi.toString(), + value: _dpi, + onChanged: (_openFilePath.isEmpty || loading) + ? null + : (value) { + setState(() { + _dpi = value; + }); + }, + ), + ), + Text(_dpi.toString()), + ], + ), + const SizedBox(height: 10), + TextField( + enabled: (_openFilePath.isNotEmpty), + decoration: const InputDecoration( + labelText: 'Encrypt (Optional)', + border: OutlineInputBorder(), + ), + controller: TextEditingController(text: _encryption), + onSubmitted: (value) { + setState(() { + _encryption = value; + }); + }, + ), + const SizedBox(height: 10), + ]), + )) + ], + ), + ), + ); + } + Future convert(String savePath) async { final pdf = pw.Document(); final file = File(savePath); - - final openddPdf = await rootBundle.load(_openFilePath); - var doc = openddPdf.buffer.asUint8List(); - + final doc = await File(_openFilePath).readAsBytes(); // var tempDir = Directory.systemTemp.createTempSync(); // int index = 1; @@ -60,111 +177,79 @@ class _MyAppState extends State { } void openFile() async { + setState(() { + loading = true; + }); FilePickerResult? result = await FilePicker.platform .pickFiles(allowMultiple: false, lockParentWindow: true); if (result != null) { setState(() { _openFilePath = result.files.first.path!; }); - } else { - // User canceled the picker } + setState(() { + loading = false; + }); } Future saveFile() async { + setState(() { + loading = true; + }); var savePath = await FilePicker.platform .saveFile(allowedExtensions: ['pdf'], lockParentWindow: true); if (savePath != null) { - return await convert(savePath); - } else { - // User canceled the picker + await convert(savePath); } + setState(() { + loading = false; + }); } +} +final backgroundStartColor = Colors.grey.shade50; +final backgroundEndColor = Colors.grey.shade300; + +// ignore: must_be_immutable +class RightSide extends StatelessWidget { + RightSide({Key? key, required this.body}) : super(key: key); + Widget body; @override Widget build(BuildContext context) { - // test(); - return MaterialApp( - home: Scaffold( - appBar: AppBar(title: const Text("PDF Tools")), - body: SizedBox( - width: double.infinity, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( + return Expanded( + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [backgroundStartColor, backgroundEndColor], + stops: const [0.0, 1.0]), + ), + child: Column(children: [ + WindowTitleBarBox( + child: Row( children: [ - Text(_openFilePath), - Column(children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.max, - children: [ - const Text("Quality :"), - Expanded( - child: Slider( - min: 100, - max: 500, - divisions: 20, - label: _dpi.toString(), - value: _dpi, - onChanged: (value) { - setState(() { - _dpi = value; - }); - }, - ), - ), - Text(_dpi.toString()), - ], - ), - const SizedBox(height: 10), - TextField( - decoration: const InputDecoration( - labelText: 'Encrypt (Optional)', - border: OutlineInputBorder(), - ), - controller: TextEditingController(text: _encryption), - onSubmitted: (value) { - setState(() { - _encryption = value; - }); - }, - ), - const SizedBox(height: 10), - Row( - children: [ - ElevatedButton( - onPressed: () => openFile(), - child: Flex( - direction: Axis.vertical, - children: const [ - Icon(Icons.folder), - Text("Open pdf") - ], - )), - ElevatedButton( - onPressed: () async { - await saveFile(); - showDialog( - context: context, - builder: (context) => Text("ok"), - ); - }, - child: Flex( - direction: Axis.vertical, - children: const [ - Icon(Icons.save), - Text("save"), - ], - )), - ], - ), - ]) + Expanded(child: MoveWindow()), + const WindowButtons(), ], ), ), - ), + body + ]), ), ); } } + +class WindowButtons extends StatelessWidget { + const WindowButtons({Key? key}) : super(key: key); + @override + Widget build(BuildContext context) { + return Row( + children: [ + MinimizeWindowButton(), + CloseWindowButton(), + ], + ); + } +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index af59b2e..51b91cd 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,18 +6,14 @@ #include "generated_plugin_registrant.h" +#include #include -#include -#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) bitsdojo_window_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "BitsdojoWindowPlugin"); + bitsdojo_window_plugin_register_with_registrar(bitsdojo_window_linux_registrar); g_autoptr(FlPluginRegistrar) printing_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); printing_plugin_register_with_registrar(printing_registrar); - g_autoptr(FlPluginRegistrar) screen_retriever_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); - screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); - g_autoptr(FlPluginRegistrar) window_manager_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); - window_manager_plugin_register_with_registrar(window_manager_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 512628d..6625209 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,9 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + bitsdojo_window_linux printing - screen_retriever - window_manager ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/linux/my_application.cc b/linux/my_application.cc index f4a3af2..da4d1e6 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -1,3 +1,4 @@ +#include #include "my_application.h" #include @@ -47,8 +48,10 @@ static void my_application_activate(GApplication* application) { gtk_window_set_title(window, "pdf_tools"); } - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); +auto bdw = bitsdojo_window_from(window); // <--- add this line +bdw->setCustomFrame(true); // <-- add this line +//gtk_window_set_default_size(window, 1280, 720); // <-- comment this line +gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index a690f34..ec962da 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,18 +5,16 @@ import FlutterMacOS import Foundation +import bitsdojo_window_macos import device_info_plus_macos import path_provider_foundation import pdfx import printing -import screen_retriever -import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PdfxPlugin.register(with: registry.registrar(forPlugin: "PdfxPlugin")) PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) - ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) - WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) } diff --git a/pdf_tools.kdev4 b/pdf_tools.kdev4 new file mode 100644 index 0000000..508115f --- /dev/null +++ b/pdf_tools.kdev4 @@ -0,0 +1,4 @@ +[Project] +CreatedFrom= +Manager=KDevGenericManager +Name=pdf_tools diff --git a/pdf_tools.sublime-project b/pdf_tools.sublime-project new file mode 100644 index 0000000..938b952 --- /dev/null +++ b/pdf_tools.sublime-project @@ -0,0 +1,11 @@ +{ + "folders": + [ + { + "path": ".", + } + ], + "debugger_configurations": + [ + ], +} diff --git a/pdf_tools.sublime-workspace b/pdf_tools.sublime-workspace new file mode 100644 index 0000000..8ba722e --- /dev/null +++ b/pdf_tools.sublime-workspace @@ -0,0 +1,596 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "w", + "windowManager" + ], + [ + "gr", + "grey" + ], + [ + "siz", + "SizedBox(…)" + ], + [ + "s", + "stless" + ] + ] + }, + "buffers": + [ + { + "file": "lib/main.dart", + "settings": + { + "buffer_size": 6908, + "line_ending": "Unix" + }, + "undo_stack": + [ + [ + 40, + 1, + "", + null, + "AgAAAGcBAAAAAAAAkwEAAAAAAAAAAAAAkwEAAAAAAACTAQAAAAAAAC0AAAAgIFdpZGdldHNGbHV0dGVyQmluZGluZy5lbnN1cmVJbml0aWFsaXplZCgpOwo", + "AQAAAAAAAAABAAAAZwEAAAAAAACUAQAAAAAAAAAAAAAAAPC/" + ], + [ + 43, + 1, + "insert", + { + "characters": "\n" + }, + "AgAAAJMBAAAAAAAAlAEAAAAAAAAAAAAAlAEAAAAAAACWAQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAkwEAAAAAAACTAQAAAAAAAAAAAAAAAPC/" + ], + [ + 48, + 1, + "right_delete", + null, + "AQAAAJYBAAAAAAAAlgEAAAAAAABDAAAAICAvLyBNdXN0IGFkZCB0aGlzIGxpbmUuCiAgYXdhaXQgd2luZG93TWFuYWdlci5lbnN1cmVJbml0aWFsaXplZCgpOw", + "AQAAAAAAAAABAAAAlgEAAAAAAADZAQAAAAAAAP///////+9/" + ], + [ + 59, + 1, + "insert", + { + "characters": "s" + }, + "AwAAAOgBAAAAAAAA6QEAAAAAAAAAAAAA6QEAAAAAAADpAQAAAAAAAEgAAABhd2FpdCB3aW5kb3dNYW5hZ2VyLnNldFJlc2l6YWJsZShmYWxzZSk7CiAgICBhd2FpdCB3aW5kb3dNYW5hZ2VyLnNldFNpemWUAQAAAAAAAJQBAAAAAAAAAgAAACAg", + "AQAAAAAAAAABAAAAMAIAAAAAAADoAQAAAAAAAAAAAAAAAPC/" + ], + [ + 62, + 1, + "insert", + { + "characters": "etWin" + }, + "BQAAAOcBAAAAAAAA6AEAAAAAAAAAAAAA6AEAAAAAAADpAQAAAAAAAAAAAADpAQAAAAAAAOoBAAAAAAAAAAAAAOoBAAAAAAAA6wEAAAAAAAAAAAAA6wEAAAAAAADsAQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA5wEAAAAAAADnAQAAAAAAAAAAAAAAAPC/" + ], + [ + 63, + 1, + "insert", + { + "characters": "d" + }, + "AQAAAOwBAAAAAAAA7QEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA7AEAAAAAAADsAQAAAAAAAAAAAAAAAPC/" + ], + [ + 65, + 1, + "insert", + { + "characters": "o" + }, + "AQAAAO0BAAAAAAAA7gEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA7QEAAAAAAADtAQAAAAAAAAAAAAAAAPC/" + ], + [ + 67, + 1, + "insert", + { + "characters": "w" + }, + "AQAAAO4BAAAAAAAA7wEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA7gEAAAAAAADuAQAAAAAAAAAAAAAAAPC/" + ], + [ + 69, + 1, + "insert", + { + "characters": "Size" + }, + "BAAAAO8BAAAAAAAA8AEAAAAAAAAAAAAA8AEAAAAAAADxAQAAAAAAAAAAAADxAQAAAAAAAPIBAAAAAAAAAAAAAPIBAAAAAAAA8wEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA7wEAAAAAAADvAQAAAAAAAAAAAAAAAPC/" + ], + [ + 78, + 1, + "left_delete", + null, + "AQAAAN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015QXBwU3RhdGUoKTsKfQoKY2xhc3MgX015QXBwU3RhdGUgZXh0ZW5kcyBTdGF0ZTxNeUFwcD4gewogIFN0cmluZyBfb3BlbkZpbGVQYXRoID0gIiI7CiAgU3RyaW5nPyBfZW5jcnlwdGlvbiA9ICIiOwogIGRvdWJsZSBfZHBpID0gMjAwOwogIEBvdmVycmlkZQogIFdpZGdldCBidWlsZChCdWlsZENvbnRleHQgY29udGV4dCkgewogICAgLy8gdGVzdCgpOwogICAgcmV0dXJuIE1hdGVyaWFsQXBwKAogICAgICBob21lOiBTY2FmZm9sZCgKICAgICAgICAvL2FwcEJhcjogQXBwQmFyKHRpdGxlOiBjb25zdCBUZXh0KCJQREYgVG9vbHMiKSksCiAgICAgICAgYm9keTogU2l6ZWRCb3goCiAgICAgICAgICB3aWR0aDogZG91YmxlLmluZmluaXR5LAogICAgICAgICAgY2hpbGQ6IFBhZGRpbmcoCiAgICAgICAgICAgIHBhZGRpbmc6IGNvbnN0IEVkZ2VJbnNldHMuYWxsKDguMCksCiAgICAgICAgICAgIGNoaWxkOiBDb2x1bW4oCiAgICAgICAgICAgICAgY2hpbGRyZW46IFsKICAgICAgICAgICAgICAgIENvbHVtbihjaGlsZHJlbjogWwogICAgICAgICAgICAgICAgICBSb3coCiAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW46IFsKICAgICAgICAgICAgICAgICAgICAgIEV4cGFuZGVkKAogICAgICAgICAgICAgICAgICAgICAgICBjaGlsZDogRWxldmF0ZWRCdXR0b24oCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvblByZXNzZWQ6ICgpID0+IG9wZW5GaWxlKCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZDogRmxleCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uOiBBeGlzLnZlcnRpY2FsLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbjogY29uc3QgWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEljb24oSWNvbnMuZm9sZGVyKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUZXh0KCJPcGVuIHBkZiIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApKSwKICAgICAgICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBTaXplZEJveCgKICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwLAogICAgICAgICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAgICAgICAgICAgIEV4cGFuZGVkKAogICAgICAgICAgICAgICAgICAgICAgICBjaGlsZDogRWxldmF0ZWRCdXR0b24oCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvblByZXNzZWQ6IChfb3BlbkZpbGVQYXRoLmlzRW1wdHkpP251bGw6ICgpIGFzeW5jIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgc2F2ZUZpbGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0RpYWxvZygKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0OiBjb250ZXh0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXI6IChjb250ZXh0KSA9PiBjb25zdCBUZXh0KCJvayIpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkOiBGbGV4KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3Rpb246IEF4aXMudmVydGljYWwsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuOiBjb25zdCBbCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWNvbihJY29ucy5zYXZlKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUZXh0KCJzYXZlIiksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICApKSwKICAgICAgICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAgICAgICAgUGFkZGluZygKICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBjb25zdCBFZGdlSW5zZXRzLm9ubHkodG9wOiAxMCwgYm90dG9tOiAxMCksCiAgICAgICAgICAgICAgICAgICAgY2hpbGQ6IFJvdygKICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIEV4cGFuZGVkKAogICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkOiBDb250YWluZXIoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNvcmF0aW9uOiBCb3hEZWNvcmF0aW9uKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQm9yZGVyUmFkaXVzLmFsbChSYWRpdXMuY2lyY3VsYXIoNSkpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogQm9yZGVyLmFsbCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiBDb2xvcnMuZ3JleSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkpLAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IGNvbnN0IEVkZ2VJbnNldHMub25seSh0b3A6IDEwLCBib3R0b206IDEwKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkOiBQYWRkaW5nKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBjb25zdCBFZGdlSW5zZXRzLm9ubHkobGVmdDogNSxyaWdodDogNSksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkOiBUZXh0KF9vcGVuRmlsZVBhdGgpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICBSb3coCiAgICAgICAgICAgICAgICAgICAgbWFpbkF4aXNBbGlnbm1lbnQ6IE1haW5BeGlzQWxpZ25tZW50LnNwYWNlRXZlbmx5LAogICAgICAgICAgICAgICAgICAgIG1haW5BeGlzU2l6ZTogTWFpbkF4aXNTaXplLm1heCwKICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbjogWwogICAgICAgICAgICAgICAgICAgICAgY29uc3QgVGV4dCgiUXVhbGl0eSA6IiksCiAgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlZCgKICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQ6IFNsaWRlcigKICAgICAgICAgICAgICAgICAgICAgICAgICBtaW46IDEwMCwKICAgICAgICAgICAgICAgICAgICAgICAgICBtYXg6IDUwMCwKICAgICAgICAgICAgICAgICAgICAgICAgICBkaXZpc2lvbnM6IDIwLAogICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfZHBpLnRvU3RyaW5nKCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF9kcGksCiAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2VkOiAoX29wZW5GaWxlUGF0aC5pc0VtcHR5KT9udWxsOih2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U3RhdGUoKCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfZHBpID0gdmFsdWU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAgICAgICAgICAgIFRleHQoX2RwaS50b1N0cmluZygpKSwKICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICBjb25zdCBTaXplZEJveChoZWlnaHQ6IDEwKSwKICAgICAgICAgICAgICAgICAgVGV4dEZpZWxkKAogICAgICAgICAgICAgICAgICAgIGVuYWJsZWQ6IChfb3BlbkZpbGVQYXRoLmlzTm90RW1wdHkpLAogICAgICAgICAgICAgICAgICAgIGRlY29yYXRpb246IGNvbnN0IElucHV0RGVjb3JhdGlvbigKICAgICAgICAgICAgICAgICAgICAgIGxhYmVsVGV4dDogJ0VuY3J5cHQgKE9wdGlvbmFsKScsCiAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IE91dGxpbmVJbnB1dEJvcmRlcigpLAogICAgICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlcjogVGV4dEVkaXRpbmdDb250cm9sbGVyKHRleHQ6IF9lbmNyeXB0aW9uKSwKICAgICAgICAgICAgICAgICAgICBvblN1Ym1pdHRlZDogKHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICBzZXRTdGF0ZSgoKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIF9lbmNyeXB0aW9uID0gdmFsdWU7CiAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICBjb25zdCBTaXplZEJveChoZWlnaHQ6IDEwKSwKICAgICAgICAgICAgICAgIF0pCiAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgKSwKICAgICAgICAgICksCiAgICAgICAgKSwKICAgICAgKSwKICAgICk7CiAgfQoKICBGdXR1cmUgY29udmVydChTdHJpbmcgc2F2ZVBh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gICAgIC8vIGluZGV4Kys7CiAgICB9CgogICAgcmV0dXJuIGZpbGUud3JpdGVBc0J5dGVzKGF3YWl0IHBkZi5zYXZlKCkpOwogIH0KCiAgdm9pZCBvcGVuRmlsZSgpIGFzeW5jIHsKICAgIEZpbGVQaWNrZXJSZXN1bHQ/IHJlc3VsdCA9IGF3YWl0IEZpbGVQaWNrZXIucGxhdGZvcm0KICAgICAgICAucGlja0ZpbGVzKGFsbG93TXVsdGlwbGU6IGZhbHNlLCBsb2NrUGFyZW50V2luZG93OiB0cnVlKTsKICAgIGlmIChyZXN1bHQgIT0gbnVsbCkgewogICAgICBzZXRTdGF0ZSgoKSB7CiAgICAgICAgX29wZW5GaWxlUGF0aCA9IHJlc3VsdC5maWxlcy5maXJzdC5wYXRoITsKICAgICAgfSk7CiAgICB9IGVsc2UgewogICAgICAvLyBVc2VyIGNhbmNlbGVkIHRoZSBwaWNrZXIKICAgIH0KICB9CgogIEZ1dHVyZSBzYXZlRmlsZSgpIGFzeW5jIHsKICAgIHZhciBzYXZlUGF0aCA9IGF3YWl0IEZpbGVQaWNrZXIucGxhdGZvcm0KICAgICAgICAuc2F2ZUZpbGUoYWxsb3dlZEV4dGVuc2lvbnM6IFsncGRmJ10sIGxvY2tQYXJlbnRXaW5kb3c6IHRydWUpOwogICAgaWYgKHNhdmVQYXRoICE9IG51bGwpIHsKICAgICAgcmV0dXJuIGF3YWl0IGNvbnZlcnQoc2F2ZVBhdGgpOwogICAgfSBlbHNlIHsKICAgICAgLy8gVXNlciBjYW5jZWxlZCB0aGUgcGlja2VyCiAgICB9CiAgfQp9CgAAAAAAAAAA/BoAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA3AEAAAAAAADcAQAAAAAAAAAAAAAAAPC/" + ] + ] + }, + { + "file": "pubspec.yaml", + "settings": + { + "buffer_size": 4165, + "encoding": "UTF-8", + "line_ending": "Unix" + }, + "undo_stack": + [ + [ + 17, + 1, + "revert", + null, + "AgAAAAAAAAAAAAAAAAAA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jaWVzLAogICMgc2VlIGh0dHBzOi8vZmx1dHRlci5kZXYvY3VzdG9tLWZvbnRzLyNmcm9tLXBhY2thZ2VzCgAAAAAAAAAA/Q8AAAAAAAAAAAAA", + "AQAAAAAAAAABAAAACwgAAAAAAAAZCAAAAAAAAAAAAAAAAPC/" + ], + [ + 25, + 1, + "right_delete", + null, + "AQAAAAgIAAAAAAAACAgAAAAAAAAZAAAACiAgd2luZG93X21hbmFnZXI6IF4wLjMuMA", + "AQAAAAAAAAABAAAAIQgAAAAAAAAICAAAAAAAAAAAAAAAAPC/" + ], + [ + 41, + 1, + "", + null, + "AQAAAO0GAAAAAAAAdAcAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA7QYAAAAAAADtBgAAAAAAAAAAAAAAAPC/" + ], + [ + 46, + 1, + "right_delete", + null, + "AQAAAO0GAAAAAAAA7QYAAAAAAAANAAAAZGVwZW5kZW5jaWVzOg", + "AQAAAAAAAAABAAAA+gYAAAAAAADtBgAAAAAAAAAAAAAAAPC/" + ], + [ + 68, + 1, + "right_delete", + null, + "AQAAAKwIAAAAAAAArAgAAAAAAAAZAAAACiAgZGVza3RvcF93aW5kb3c6IF4wLjQuMA", + "AQAAAAAAAAABAAAAxQgAAAAAAACsCAAAAAAAAAAAAAAAAPC/" + ] + ] + } + ], + "build_system": "", + "build_system_choices": + [ + ], + "build_varint": "", + "command_palette": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + [ + "LSP: ", + "LSP: Refactor…" + ], + [ + "package ", + "Package Control: Remove Package" + ], + [ + "terminus", + "Terminus: Toggle Panel" + ], + [ + "debu", + "Debugger: Open" + ], + [ + "deb", + "Debugger: Open" + ], + [ + "debug", + "Debugger: Open" + ], + [ + "packa", + "Package Control: Install Package" + ], + [ + "insta", + "Package Control: Install Package" + ], + [ + "ls", + "Preferences: LSP-Dart Settings" + ], + [ + "lsp-", + "Preferences: LSP-Dart Settings" + ], + [ + "install", + "Package Control: Install Package" + ], + [ + "lsp-dart", + "Preferences: LSP-Dart Settings" + ], + [ + "lsp", + "Preferences: LSP-Dart Settings" + ], + [ + "dart", + "Preferences: LSP-Dart Settings" + ], + [ + "-dart", + "Preferences: LSP-Dart Settings" + ], + [ + "lsp-da", + "LSP-Dart: Goto Super" + ], + [ + "package", + "Package Control: Install Package" + ], + [ + "pack", + "Package Control: Install Package" + ], + [ + "term", + "Terminal: Open in project folder" + ], + [ + "termi", + "Terminal: Open" + ], + [ + "lsp-dar", + "Preferences: LSP-Dart Settings" + ], + [ + "Package Control: ", + "Package Control: Install Package" + ], + [ + "pakca", + "Package Control: List Packages" + ] + ], + "width": 0.0 + }, + "console": + { + "height": 0.0, + "history": + [ + ] + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "expanded_folders": + [ + "/home/naoufal/Documents/Code/Flutter/pdf_tools", + "/home/naoufal/Documents/Code/Flutter/pdf_tools/lib" + ], + "file_history": + [ + "/home/naoufal/Documents/Code/Flutter/pdf_tools/lib/main.dart", + "/home/naoufal/.pub-cache/hosted/pub.dev/window_manager-0.3.0/lib/src/window_manager.dart", + "/home/naoufal/Documents/Code/Flutter/pdf_tools/tt", + "/home/naoufal/.config/sublime-text/Packages/Debugger/modules/adapters/dart.py", + "/home/naoufal/.config/sublime-text/Packages/Debugger/modules/adapters/flutter.py", + "/home/naoufal/.config/sublime-text/Packages/Debugger/modules/adapters/js.py", + "/home/naoufal/.config/sublime-text/Packages/Debugger/data/adapters/go/extension/dist/debugAdapter.js", + "/home/naoufal/.config/sublime-text/Packages/Debugger/data/adapters/lua-local/extension/extension/debugAdapter.js", + "/home/naoufal/.config/sublime-text/Packages/Debugger/modules/adapters/python.py", + "/home/naoufal/.config/sublime-text/Packages/Debugger/examples/dart/main.dart", + "/home/naoufal/.config/sublime-text/Packages/Debugger/examples/java/main.java", + "/home/naoufal/.config/sublime-text/Packages/Debugger/examples/flutter/main.lua", + "/home/naoufal/.config/sublime-text/Packages/Debugger/examples/go/main.go", + "/home/naoufal/.config/sublime-text/Packages/Debugger/examples/python/main.py", + "/home/naoufal/.config/sublime-text/Packages/User/Side Bar.sublime-settings", + "/home/naoufal/snap/flutter/common/flutter/packages/flutter/lib/src/material/elevated_button.dart", + "/home/naoufal/snap/flutter/common/flutter/bin/cache/pkg/sky_engine/lib/ui/painting.dart", + "/home/naoufal/snap/flutter/common/flutter/bin/cache/pkg/sky_engine/lib/typed_data/typed_data.dart", + "/home/naoufal/snap/flutter/common/flutter/bin/cache/pkg/sky_engine/lib/core/string.dart", + "/home/naoufal/.config/sublime-text/Packages/User/Default (Linux).sublime-keymap", + "/home/naoufal/.config/sublime-text/Packages/LSP/Default.sublime-keymap", + "/home/naoufal/Documents/Code/Flutter/catalogue_v2/lib/test.dart", + "/home/naoufal/Documents/Code/Flutter/catalogue_v2/lib/pages/home.dart", + "/home/naoufal/Documents/Code/Flutter/catalogue_v2/lib/main.dart", + "/home/naoufal/Documents/Code/Flutter/catalogue_v2/README.md", + "/home/naoufal/.config/sublime-text/Packages/User/LSP-Dart.sublime-settings", + "/home/naoufal/.config/sublime-text/Packages/LSP-Dart/LSP-Dart.sublime-settings", + "/home/naoufal/.config/sublime-text/Packages/User/Dart - Plugin Settings.sublime-settings" + ], + "find": + { + "height": 42.0 + }, + "find_in_files": + { + "height": 0.0, + "where_history": + [ + ] + }, + "find_state": + { + "case_sensitive": false, + "find_history": + [ + "setResizable" + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": false, + "replace_history": + [ + ], + "reverse": false, + "scrollbar_highlights": true, + "show_context": true, + "use_buffer2": true, + "use_gitignore": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "sheets": + [ + { + "buffer": 0, + "file": "lib/main.dart", + "semi_transient": false, + "settings": + { + "buffer_size": 6908, + "regions": + { + }, + "selection": + [ + [ + 476, + 476 + ] + ], + "settings": + { + "auto_complete_triggers": + [ + { + "characters": "<", + "selector": "text.html, text.xml" + }, + { + "rhs_empty": true, + "selector": "punctuation.accessor" + } + ], + "git_gutter_is_enabled": true, + "lsp_active": true, + "lsp_hover_provider_count": 1, + "lsp_uri": "file:///home/naoufal/Documents/Code/Flutter/pdf_tools/lib/main.dart", + "show_definitions": false, + "syntax": "Packages/Dartlight/Dart.tmLanguage", + "tab_size": 2, + "translate_tabs_to_spaces": true + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 1, + "stack_multiselect": false, + "type": "text" + }, + { + "buffer": 1, + "file": "pubspec.yaml", + "selected": true, + "semi_transient": false, + "settings": + { + "buffer_size": 4165, + "regions": + { + }, + "selection": + [ + [ + 2158, + 2158 + ] + ], + "settings": + { + "auto_complete_triggers": + [ + { + "characters": "<", + "selector": "text.html, text.xml" + }, + { + "rhs_empty": true, + "selector": "punctuation.accessor" + } + ], + "git_gutter_is_enabled": true, + "lsp_active": true, + "lsp_hover_provider_count": 1, + "lsp_uri": "file:///home/naoufal/Documents/Code/Flutter/pdf_tools/pubspec.yaml", + "show_definitions": false, + "syntax": "Packages/YAML/YAML.sublime-syntax", + "tab_size": 2, + "translate_tabs_to_spaces": true + }, + "translation.x": 0.0, + "translation.y": 567.0, + "zoom_level": 1.0 + }, + "stack_index": 0, + "stack_multiselect": false, + "type": "text" + } + ] + } + ], + "incremental_find": + { + "height": 30.0 + }, + "input": + { + "height": 42.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "output.Debugger": + { + "height": 426.0 + }, + "output.Debugger Console": + { + "height": 181.0 + }, + "output.LSP Log Panel": + { + "height": 0.0 + }, + "output.Terminus": + { + "height": 172.0 + }, + "output.diagnostics": + { + "height": 0.0 + }, + "output.find_results": + { + "height": 0.0 + }, + "output.mdpopups": + { + "height": 0.0 + }, + "output.references": + { + "height": 144.0 + }, + "pinned_build_system": "", + "project": "pdf_tools.sublime-project", + "replace": + { + "height": 56.0 + }, + "save_all_on_build": true, + "select_file": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 0.0 + }, + "select_project": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 0.0 + }, + "select_symbol": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 0.0 + }, + "selected_group": 0, + "settings": + { + }, + "show_minimap": true, + "show_open_files": false, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 237.0, + "status_bar_visible": true, + "template_settings": + { + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 84bd6f0..19aa6b4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,9 +41,9 @@ dependencies: path_provider: ^2.0.12 pdfx: ^2.3.0 printing: ^5.10.1 - window_manager: ^0.3.0 flutter_localizations: sdk: flutter + bitsdojo_window: ^0.1.5 dev_dependencies: flutter_test: diff --git a/tt b/tt deleted file mode 100644 index 772d94a..0000000 Binary files a/tt and /dev/null differ diff --git a/tt.pdf b/tt.pdf deleted file mode 100644 index 9fba5f2..0000000 Binary files a/tt.pdf and /dev/null differ diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c1a224e..8e72149 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,18 +6,15 @@ #include "generated_plugin_registrant.h" +#include #include #include -#include -#include void RegisterPlugins(flutter::PluginRegistry* registry) { + BitsdojoWindowPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("BitsdojoWindowPlugin")); PdfxPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PdfxPlugin")); PrintingPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PrintingPlugin")); - ScreenRetrieverPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); - WindowManagerPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("WindowManagerPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index bcb3de9..83186d2 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,10 +3,9 @@ # list(APPEND FLUTTER_PLUGIN_LIST + bitsdojo_window_windows pdfx printing - screen_retriever - window_manager ) list(APPEND FLUTTER_FFI_PLUGIN_LIST