diff options
Diffstat (limited to 'test.c')
-rw-r--r--[-rwxr-xr-x] | test.c | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -1,14 +1,41 @@ +#ifdef __linux__ #include <unistd.h> +#endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <survive.h> #include <os_generic.h> -#include <DrawFunctions.h> +#include <CNFGFunctions.h> 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) { |