22 #ifndef NUVIE_MISC_CALLBACK_H 23 #define NUVIE_MISC_CALLBACK_H 25 #include "ultima/nuvie/core/nuvie_defs.h" 43 MSGSCROLL_CB_TEXT_READY,
52 char *callback_user_data;
57 callback_user_data =
nullptr;
58 callback_target =
nullptr;
63 virtual uint16 callback(uint16 msg,
CallBack *caller,
void *data =
nullptr) {
64 DEBUG(0, LEVEL_WARNING,
"Unhandled callback. msg (%x)\n", msg);
68 uint16 message(uint16 msg,
void *msg_data =
nullptr,
void *my_data =
nullptr) {
70 set_user_data(my_data);
71 callback_target->set_user_data(callback_user_data);
73 return (callback_target->callback(msg,
this, msg_data));
76 void set_user_data(
void *user_data) {
77 callback_user_data = (
char *)user_data;
Definition: detection.h:27
Definition: call_back.h:50