How to send x,y data from HIDStylusDriver to StylusApp to Pen/Draw

Here is project I am researching: https://developer.apple.com/documentation/hiddriverkit/handling_stylus_input_from_a_human_interface_device

I have a Touch screen and I want:

  1. can control this screen, I can enable extension and control Touch screen successfully.
  2. can pen on this screen. To do this, I need to send X,Y to StylusApp(AppKit) But I Can not send X, Y to Swift StylusApp

Eventhough I can log X,Y it by default code:

But I don't know how to send it to AppKit to Pen. I have research about communicate Driver and Client: https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app#4324306 but seem HID driver don't support inheritance from IOUserClient:

Hi @eskimo, could you help me this case?

How to send x,y data from HIDStylusDriver to StylusApp to Pen/Draw
 
 
Q