27#include "oslib/wimp.h"
44 void (*
callback)(wimp_message *message));
58 wimp_t task,
void (*
callback)(wimp_message *message))
65 error = xwimp_send_message(event, message, task);
67 NSLOG(netsurf, INFO,
"xwimp_send_message: 0x%x: %s",
68 error->errnum, error->errmess);
75 assert(event == wimp_USER_MESSAGE_RECORDED);
95 wimp_w to_w, wimp_i to_i,
void (*
callback)(wimp_message *message),
103 error = xwimp_send_message_to_window(event, message, to_w, to_i, to_t);
106 "xwimp_send_message_to_window: 0x%x: %s",
115 assert(event == wimp_USER_MESSAGE_RECORDED);
136 void (*
callback)(wimp_message *message))
145 add->
id = message->my_ref;
146 return (add != NULL);
158 void (*
callback)(wimp_message *message))
166 void (*
callback)(wimp_message *message))
198 if (event == wimp_USER_MESSAGE_ACKNOWLEDGE) {
200 bool handled =
false;
201 int ref = message->my_ref;
208 if ((ref == test->
id) &&
223 if ((test->
id == 0) &&
239 while ((test =
next)) {
241 if (ref == test->
id) {
#define NSLOG(catname, level, logmsg, args...)
static void ro_message_free(int ref)
bool ro_message_handle_message(wimp_event_no event, wimp_message *message)
Attempts to route a message.
bool ro_message_register_handler(wimp_message *message, unsigned int message_code, void(*callback)(wimp_message *message))
Registers a return route for a message.
static struct active_message * ro_message_add(unsigned int message_code, void(*callback)(wimp_message *message))
bool ro_message_send_message(wimp_event_no event, wimp_message *message, wimp_t task, void(*callback)(wimp_message *message))
Sends a message and registers a return route for a bounce.
bool ro_message_register_route(unsigned int message_code, void(*callback)(wimp_message *message))
Registers a route for a message code.
bool ro_message_send_message_to_window(wimp_event_no event, wimp_message *message, wimp_w to_w, wimp_i to_i, void(*callback)(wimp_message *message), wimp_t *to_t)
Sends a message and registers a return route for a bounce.
struct active_message * current_messages
Automated RISC OS message routing (interface).
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
struct active_message * next
unsigned int message_code
struct active_message * previous
void(* callback)(wimp_message *message)