home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / gcc / !GCC / patches / DeskLib / h / EventMsg < prev    next >
Encoding:
Text File  |  1994-10-03  |  3.0 KB  |  79 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    EventMsg.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (16 Mar 1992)
  14.     Purpose: Augments Event() routines to provide a better way of serving
  15.              WIMP messages to a set of user handler functions
  16. */
  17.  
  18.  
  19. #ifndef __dl_eventmsg_h
  20. #define __dl_eventmsg_h
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /* EventMsg_Initialise ----------------------------------------------------
  27.  * Initialises the EventMsg system ready for use. Attaches EventMsg event
  28.  * handlers to catch all incoming Wimp messages (events 17, 18).
  29.  */
  30. extern void EventMsg_Initialise(void);
  31.  
  32.  
  33. /* EventMsg_Claim ---------------------------------------------------------
  34.  * Much like Event_Claim.
  35.  * Pass in the type of message (message action) you wish to handle, or
  36.  * event_ANY to handle ALL messages.
  37.  * Pass in the window for which this applies (event_ANY == all windows)
  38.  * Also pass in the handler function itself (a standard event_handler)
  39.  * and your own reference.
  40.  * Specific-window handlers will have priority over general handlers when
  41.  * an incoming message is dispatched to your registered handlers.
  42.  */
  43. extern BOOL EventMsg_Claim(message_action messagetype, window_handle window,
  44.                            event_handler handler, void *reference);
  45.  
  46.  
  47. /* EventMsg_Release -------------------------------------------------------
  48.  * Release the handler for a specific message type and specific window
  49.  * combination.
  50.  * If you pass in event_ANY for the messagetype, only non-message-specific
  51.  * handlers may be released. (c.f. EventMsg_ReleaseMessage)
  52.  * If you pass in event_ANY for the window handle, only non-window-specific
  53.  * handlers may be released. (c.f. EventMsg_ReleaseWindow)
  54.  */
  55. extern int EventMsg_Release(message_action messagetype, window_handle window,
  56.                             event_handler handler);
  57.  
  58.  
  59. /* EventMsg_ReleaseWindow -------------------------------------------------
  60.  * Finds and removes all message handlers that relate to the given window.
  61.  * If you pass in event_ANY as the window handle, all non-window-specific
  62.  * handlers will be released.
  63.  */
  64. extern int EventMsg_ReleaseWindow(window_handle window);
  65.  
  66.  
  67. /* EventMsg_ReleaseMessage ------------------------------------------------
  68.  * Finds and removes all message handlers that relate to the specified
  69.  * message type. If you pass in event_ANY as the type, all handlers that
  70.  * are not message-specific will be released.
  71.  */
  72. extern BOOL EventMsg_ReleaseMessage(message_action messagetype);
  73.  
  74. #ifdef __cplusplus
  75.            }
  76. #endif
  77.  
  78. #endif
  79.