diff options
author | Michael Turvey <mwturvey@users.noreply.github.com> | 2017-03-17 14:55:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 14:55:02 -0700 |
commit | 7f62d016ff5fe45e9cae0ff29c189b64ed1bb315 (patch) | |
tree | 37e1519a9d2ee922596c3db48ee178d2f53f5ecf /test.c | |
parent | a53c520c2d1a3bb9faa4cb5e4ee9ccc48bb1835f (diff) | |
parent | 64e3b67aa0d6a970e1e1988881e77d04c4fb5b07 (diff) | |
download | libsurvive-7f62d016ff5fe45e9cae0ff29c189b64ed1bb315.tar.gz libsurvive-7f62d016ff5fe45e9cae0ff29c189b64ed1bb315.tar.bz2 |
Merge pull request #40 from mwturvey/UsbTrackerOnWin
Wired Watchman Support
Diffstat (limited to 'test.c')
-rwxr-xr-x | test.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -1,4 +1,6 @@ +#ifdef __linux__ #include <unistd.h> +#endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> @@ -9,6 +11,31 @@ struct SurviveContext * ctx; +void HandleKey( int keycode, int bDown ) +{ + if( !bDown ) return; + + if( keycode == 'O' || keycode == 'o' ) + { + survive_send_magic(ctx,1,0,0); + } + if( keycode == 'F' || keycode == 'f' ) + { + survive_send_magic(ctx,0,0,0); + } +} + +void HandleButton( int x, int y, int button, int bDown ) +{ +} + +void HandleMotion( int x, int y, int mask ) +{ +} + +void HandleDestroy() +{ +} static void dump_iface( struct SurviveObject * so, const char * prefix ) @@ -56,6 +83,7 @@ int main() dump_iface( survive_get_so_by_name( ctx, "WM0" ), "WM0" ); dump_iface( survive_get_so_by_name( ctx, "WM1" ), "WM1" ); dump_iface( survive_get_so_by_name( ctx, "TR0" ), "TR0" ); + dump_iface( survive_get_so_by_name( ctx, "WW0" ), "WW0" ); while(survive_poll(ctx) == 0) { |