Repository navigation
feat(win32): callbacks and message windows on the classic engine - #53
Merged
Merged
Conversation
Brings NSWinRT.win32.callback and NSWinRT.win32.messageWindow to the classic engine, matching napi. A napi message window created off the UI thread now delivers to its listener on its own thread.
Pre-merge checks:
|
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
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.
Brings
NSWinRT.win32.callbackandNSWinRT.win32.messageWindowto the classic engine, matching napi.callback(ret, argTypes, fn)returns{ pointer, release() }: a libffi closure that runsfnon its creating thread, hopping through the UI dispatcher when native code calls from another thread. A throw is reported and the callback returns zero.messageWindow(listener)returns{ hwnd, close() }for a hidden top-level window, so it also gets broadcasts likeTaskbarCreated.Tests:
win32_callback_runs_during_the_callandwin32_message_window_delivers_messagesintegration tests.