forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 17
[Clipboard] setData and getData implementations added #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
swift-kim
merged 3 commits into
flutter-tizen:flutter-2.0.1-tizen
from
pkosko:clipboard_getData_v2
May 11, 2021
Merged
[Clipboard] setData and getData implementations added #76
swift-kim
merged 3 commits into
flutter-tizen:flutter-2.0.1-tizen
from
pkosko:clipboard_getData_v2
May 11, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
d960717
to
9d4d636
Compare
rwalczyna
suggested changes
Apr 27, 2021
pwasowski2
suggested changes
Apr 27, 2021
* Removed unnecessary mutex * Cleaned temporary logs
pwasowski2
approved these changes
Apr 28, 2021
swift-kim
reviewed
Apr 28, 2021
swift-kim
approved these changes
Apr 29, 2021
rwalczyna
approved these changes
May 11, 2021
Please rebase. |
swift-kim
pushed a commit
that referenced
this pull request
Jun 7, 2021
* [Clipboard] setData and getData implementations added and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback); * [Clipboard] Fixes after review * Removed unnecessary mutex * Cleaned temporary logs
swift-kim
pushed a commit
that referenced
this pull request
Sep 27, 2021
* [Clipboard] setData and getData implementations added and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback); * [Clipboard] Fixes after review * Removed unnecessary mutex * Cleaned temporary logs
swift-kim
pushed a commit
that referenced
this pull request
Nov 14, 2021
* [Clipboard] setData and getData implementations added and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback); * [Clipboard] Fixes after review * Removed unnecessary mutex * Cleaned temporary logs
swift-kim
pushed a commit
that referenced
this pull request
Dec 9, 2021
* [Clipboard] setData and getData implementations added and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback); * [Clipboard] Fixes after review * Removed unnecessary mutex * Cleaned temporary logs
swift-kim
pushed a commit
that referenced
this pull request
Dec 17, 2021
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
swift-kim
pushed a commit
that referenced
this pull request
Feb 7, 2022
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
swift-kim
pushed a commit
that referenced
this pull request
Feb 11, 2022
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
swift-kim
pushed a commit
that referenced
this pull request
May 12, 2022
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
swift-kim
pushed a commit
that referenced
this pull request
Aug 5, 2022
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
swift-kim
pushed a commit
that referenced
this pull request
Sep 1, 2022
swift-kim
pushed a commit
that referenced
this pull request
Sep 1, 2022
and also removed code for hasStrings, as this API is not present in documentation. [Before] Clipboard.setData and Clipboard.getData feature was not implemented [After] Naive implementation of clipboard shared only inside Flutter application and only via Clipboard API. Such decision was done because of supporting partial functionality on all profiles. CBHM API is supported only on mobile and currently it is not possible to support it in other way. Dart code below is able to set/get internal clipboard data: ClipboardData cd = ClipboardData(text: 'some text'); Clipboard.setData(cd); Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain); void dataCallback(ClipboardData? d) { if (d != null) { String? text = d.text; if(text != null) { print("Clipboard data $text"); } } } d.then(dataCallback);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clipboard.getData, Clipboard.setData implementation part of https://github.sec.samsung.net/f-project/home/issues/35
This PR adds naive implementation using no platform specific APIs to share system clipboard. Because of internal issues of CBHM API, which causes not deterministic behaviour of API flow and missing native support on non-mobile profiles I decided to provide simple implementation for only sharing some clipboard data inside application.
As Clipboard.hasStrings() API is not described in docs https://api.flutter.dev/flutter/services/Clipboard-class.html, I removed part for handling such message.
[Before] Clipboard.setData and Clipboard.getData features were not implemented
[After] Naive implementation of clipboard shared only inside Flutter application
and only via Clipboard API. Such decision was done because of supporting partial
functionality on all profiles. CBHM API is supported only on mobile and currently
it is not possible to support it in other way.
Dart code below is able to set/get internal clipboard data: