home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / !DeskLib / h / Handler < prev    next >
Encoding:
Text File  |  1993-06-29  |  3.3 KB  |  90 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:    Handler.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.02 (29 June 1993)
  14.     Purpose: Predefined default handlers for you to COPY and use as the
  15.              basis of your own handlers
  16.  
  17.              NOTE that these are basically EXAMPLE handlers, and so are
  18.              not all designed with peak efficiency in mind.
  19.              PLEASE read the information about these handlers *carefully*
  20.              before use.
  21.              Note that some handlers are for Event, some are for EventMsg
  22. */
  23.  
  24.  
  25. #ifndef __dl_handler_h
  26. #define __dl_handler_h
  27.  
  28.  
  29.  /*
  30.   *  Simply calls Wimp_CloseWindow()
  31.   */
  32. extern BOOL Handler_CloseWindow(event_pollblock *event, void *reference);
  33.  
  34.  
  35.  /*  Alternate handler to Handler_Close, which calls the higher-level 
  36.   *  Window_Delete() to close and delete the window, release memory, and
  37.   *  remove all handlers attached to the window.
  38.   */
  39. extern BOOL Handler_DeleteWindow(event_pollblock *event, void *reference);
  40.  
  41.  
  42.  /*
  43.   *  Simply calls Wimp_OpenWindow()
  44.   */
  45. extern BOOL Handler_OpenWindow(event_pollblock *event, void *reference);
  46.  
  47.  
  48.  /*
  49.   *  Supplies a NULL redraw loop (gets rectangles from the WIMP until
  50.   *  all rectangles have been "redrawn"). Doesn't actually do any drawing
  51.   *  though.
  52.   */
  53. extern BOOL Handler_NullRedraw(event_pollblock *event, void *reference);
  54.  
  55.  
  56.  /*
  57.   * Handler for clicks on "OK" or "Cancel" (3-d) type buttons 
  58.   * (Indents the button, waits for 1/3 second, and un-indents the button)
  59.   */
  60. extern BOOL Handler_ClickOK(event_pollblock *event, void *reference);
  61.  
  62.  
  63.  
  64.  
  65.  /* Handler_ModeChange ----------------------------------------------------
  66.   * This is a handler for mode change events. It calls Screen_CacheModeInfo()
  67.   * every time the screen mode changes, guaranteeing that the screen variables
  68.   * are always correct (EXCEPT, YOU must call Screen_CacheModeInfo() once
  69.   * during initialisation.
  70.   *
  71.   * If you have called Template_UseOutlineFonts() and the screen resolution
  72.   * has changed in such a way as to necessitate it, it also calls
  73.   * Window_ModeChange to fix all your icons which use outline fonts
  74.   * (otherwise, they often become the wrong size upon a mode change)
  75.   * (Note that this won't have a very useful effect unless you use Template
  76.   * and Window functions to create all your windows - in fact, such windows
  77.   * will no longer 'own' the fonts they are using, and these fonts may
  78.   * disappear or change at random in the future - so DON'T use this function
  79.   * unless ALL your windows were created with Window_Create.
  80.   *
  81.   * See also Window.h
  82.   *
  83.   * Attach it to mode change messages using:
  84.   *  EventMsg_Claim(message_MODECHANGE, event_any, Handler_ModeChange, NULL);
  85.   */
  86. extern BOOL Handler_ModeChange(event_pollblock *event, void *reference);
  87.  
  88.  
  89. #endif
  90.