diff options
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) { |