home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / dreamscape / source / Dreamscape / Headers / low-level / h / wimpmsg < prev    next >
Encoding:
Text File  |  1996-08-30  |  1.4 KB  |  52 lines

  1.  
  2. /* low-level.h.wimpmsg
  3.  *
  4.  * Dreamscape - C++ class library for RISC OS
  5.  * Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Library General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  * See the Dreamscape documentation for more information.
  12.  */
  13.  
  14. #ifndef dreamscape_wimpmsg_H
  15. #define dreamscape_wimpmsg_H
  16.  
  17. #include "bool.h"
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. typedef bool (dscape_wimpmsg_handler)(const struct wimp_message *message,
  24.         void *handle);
  25.  
  26. void dscape_wimpmsg_dispatch_message(const struct wimp_message *message);
  27. void dscape_wimpmsg_register_handler(int id,
  28.     dscape_wimpmsg_handler *function, void *handle);
  29. void dscape_wimpmsg_deregister_handler(int id,
  30.     dscape_wimpmsg_handler *function, void *handle);
  31.  
  32. #ifdef __cplusplus
  33. }
  34.  
  35. struct wimp_message;
  36.  
  37. class WimpMessageHandler {
  38. public:
  39.   typedef dscape_wimpmsg_handler Handler;
  40.  
  41.   static void dispatch_message(const wimp_message *message)
  42.         { dscape_wimpmsg_dispatch_message(message); }
  43.   static void register_handler(int id, Handler *function, void *handle)
  44.         { dscape_wimpmsg_register_handler(id, function, handle); }
  45.   static void deregister_handler(int id, Handler *function, void *handle)
  46.         { dscape_wimpmsg_deregister_handler(id, function, handle); }
  47. };
  48.  
  49. #endif
  50.  
  51. #endif
  52.