home *** CD-ROM | disk | FTP | other *** search
-
- /* low-level.h.wimpmsg
- *
- * Dreamscape - C++ class library for RISC OS
- * Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * See the Dreamscape documentation for more information.
- */
-
- #ifndef dreamscape_wimpmsg_H
- #define dreamscape_wimpmsg_H
-
- #include "bool.h"
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef bool (dscape_wimpmsg_handler)(const struct wimp_message *message,
- void *handle);
-
- void dscape_wimpmsg_dispatch_message(const struct wimp_message *message);
- void dscape_wimpmsg_register_handler(int id,
- dscape_wimpmsg_handler *function, void *handle);
- void dscape_wimpmsg_deregister_handler(int id,
- dscape_wimpmsg_handler *function, void *handle);
-
- #ifdef __cplusplus
- }
-
- struct wimp_message;
-
- class WimpMessageHandler {
- public:
- typedef dscape_wimpmsg_handler Handler;
-
- static void dispatch_message(const wimp_message *message)
- { dscape_wimpmsg_dispatch_message(message); }
- static void register_handler(int id, Handler *function, void *handle)
- { dscape_wimpmsg_register_handler(id, function, handle); }
- static void deregister_handler(int id, Handler *function, void *handle)
- { dscape_wimpmsg_deregister_handler(id, function, handle); }
- };
-
- #endif
-
- #endif
-