nanogui: How to send custom events?
Subject:
Re: [nanogui] How to send custom events?
From:
"Greg Haerr" ####@####.####
Date:
26 Mar 2011 18:05:56 -0000
Message-Id: <043801cbebe0$71d335a0$6964a8c0@winXP>
: I want to use nano-x API to send some custom events to windows,
: like the SendMessage function in Windows API. But as far as I know,
: there are only GrInjectKeyboardEvent and GrInjectPointerEvent to
: achieve the similar effect, is there anyway to send arbitrary events
: to a window?
Yes, use the GrSendClientData function, which sends a
GR_EVENT_CLIENT_DATA event to the window. The
application loop then gets the data via GrRequestClientData().
You should use v0.92 or the latest git repo, as I debugged some
small issues with this functionality. There is a sample demo
client/server in src/demos/nanox/{get,set}selection.c for more
details.
Regards,
Greg