1 /* rec_callback.h - callbacks for recognizer actions 2 3 Copyright 2001 Carl Worth 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2, or (at your option) 8 any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 */ 15 16 #ifndef REC_CALLBACK_H 17 #define REC_CALLBACK_H 18 19 #include "action.h" 20 21 typedef void (*rec_cb_fun_t)(void *action_item, void *data); 22 struct rec_callback 23 { 24 rec_cb_fun_t cb_fun; 25 void *data; 26 struct rec_callback *next; 27 }; 28 typedef struct rec_callback rec_callback_t; 29 30 int rec_callback_init(rec_callback_t *callback, rec_cb_fun_t cb_fun, void *data); 31 void rec_callback_deinit(rec_callback_t *callback); 32 33 #endif 34