/** * nCapture - Screenshots for TI-Nspire * Copyright (C) 2013 Levak * mail: levak92@gmail.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ #ifndef SYSCALL_H_ # define SYSCALL_H_ /* Any event */ static const int hook_addrs[] = {0x100575B0, 0x100574EC, 0x10056CAC, 0x10056C10}; #define HOOK_ADDR (nl_osvalue((int*)hook_addrs, sizeof(hook_addrs)/sizeof(hook_addrs[0]))) static const int hook_values[] = {0xE12FFF32, 0xE12FFF32, 0xE12FFF32, 0xE12FFF32}; #define HOOK_VALUE (nl_osvalue((int*)hook_values, sizeof(hook_values)/sizeof(hook_values[0]))) static unsigned end_event_addrs[] = {0x1000F5E4, 0x1000F5BC, 0x1000F5B0, 0x1000F5B0}; #define end_event SYSCALL_CUSTOM(end_event_addrs, void, void) static unsigned get_res_string_addrs[] = {0x100E9B20, 0x100E9E10, 0x100E9634, 0x100E994C}; #define get_res_string SYSCALL_CUSTOM(get_res_string_addrs, char *, int, int) static unsigned show_save_dialog_addrs[] = {0x10209800, 0x10209EF8, 0x10209270, 0x102099CC}; #define show_save_dialog SYSCALL_CUSTOM(show_save_dialog_addrs, int, int, char *, char *, int, int) /* static const int send_key_event_addrs[] = {0X1005DD2C, 0X1005DC68, 0X1005D428, 0X1005D38C}; #define send_key_event SYSCALL_CUSTOM(send_key_event_addrs, void, void *, int, int, int) => send_key_event((void*)0x10B0A8B0, 0x961B, 0, 1); */ #endif /* !SYSCALL_H_ */