Skip to content
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

Make MouseEvent.nativeEvent and KeyEvent.nativeKeyEvent as Any? #87

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Nov 17, 2021

Also introduce extensions, which should be used by the users, if they need interop with AWT:
val PointerEvent.awtEvent: java.awt.event.MouseEvent
val KeyEvent.awtEvent: java.awt.event.KeyEvent

We don't yet support non-awt events, as we cast to it internally, but we can do it in the future, when we get rid of this casting.

Make JetBrains/compose-multiplatform#1348 irrelevant.
We can introduce new types in the future.

I don't want to mark it experimental because:

  • these types can be used in libraries, it is better if make them backward compatible
  • the current PR proposal covers all known cases for our future API
  • this API looks pretty simple to write fallback, if we deprecate them someday

Also introduce extensions, which should be used by the users, if they need interop with AWT:
val PointerEvent.awtEvent: java.awt.event.MouseEvent
val KeyEvent.awtEvent: java.awt.event.KeyEvent

We don't yet support non-awt events, as we cast to it internally, but we can do it in the future, when we get rid of this casting.

Make JetBrains/compose-multiplatform#1348 irrelevant.
We can introduce new types in the future.

I don't want to mark it experimental because:
- these types can be used in libraries, it is better if make them backward compatible
- the current PR proposal covers all known cases for our future API
- this API looks pretty simple to write fallback, if we deprecate them someday
@igordmn igordmn merged commit 3624749 into release/1.0 Nov 18, 2021
@igordmn igordmn requested a review from prepor November 18, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants