Showing
5 changed files
with
43 additions
and
3 deletions
printing/lib/src/platform_js.dart
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com> | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +const useFFI = false; |
printing/lib/src/platform_os.dart
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com> | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +import 'dart:io' show Platform; | ||
| 18 | + | ||
| 19 | +final useFFI = Platform.isMacOS || Platform.isIOS; |
| @@ -15,10 +15,10 @@ | @@ -15,10 +15,10 @@ | ||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | import 'dart:async'; | 17 | import 'dart:async'; |
| 18 | -import 'dart:io' show Platform; | ||
| 19 | import 'dart:typed_data'; | 18 | import 'dart:typed_data'; |
| 20 | 19 | ||
| 21 | import 'callback.dart'; | 20 | import 'callback.dart'; |
| 21 | +import 'platform_js.dart' if (dart.library.io) 'print_job_platform_ffi.dart'; | ||
| 22 | import 'raster.dart'; | 22 | import 'raster.dart'; |
| 23 | 23 | ||
| 24 | /// Represents a print job to communicate with the platform implementation | 24 | /// Represents a print job to communicate with the platform implementation |
| @@ -74,7 +74,7 @@ class PrintJobs { | @@ -74,7 +74,7 @@ class PrintJobs { | ||
| 74 | onHtmlRendered: onHtmlRendered, | 74 | onHtmlRendered: onHtmlRendered, |
| 75 | onCompleted: onCompleted, | 75 | onCompleted: onCompleted, |
| 76 | onPageRasterized: onPageRasterized, | 76 | onPageRasterized: onPageRasterized, |
| 77 | - useFFI: Platform.isMacOS || Platform.isIOS, | 77 | + useFFI: useFFI, |
| 78 | ); | 78 | ); |
| 79 | _printJobs[job.index] = job; | 79 | _printJobs[job.index] = job; |
| 80 | return job; | 80 | return job; |
-
Please register or login to post a comment