home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / gcc / !GCC / patches / DeskLib / h / Handler < prev    next >
Encoding:
Text File  |  1994-10-03  |  4.6 KB  |  129 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, 1993, 1994 Jason Williams
  13.     Version: 1.03 (01 April 1994)
  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. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32.  /*
  33.   *  Simply calls Wimp_CloseWindow()
  34.   */
  35. extern BOOL Handler_CloseWindow(event_pollblock *event, void *reference);
  36.  
  37.  
  38.  /*  Alternate handler to Handler_Close, which calls the higher-level
  39.   *  Window_Delete() to close and delete the window, release memory, and
  40.   *  remove all handlers attached to the window.
  41.   */
  42. extern BOOL Handler_DeleteWindow(event_pollblock *event, void *reference);
  43.  
  44.  
  45.  /*
  46.   *  Simply calls Wimp_OpenWindow()
  47.   */
  48. extern BOOL Handler_OpenWindow(event_pollblock *event, void *reference);
  49.  
  50.  
  51.  /*
  52.   *  Supplies a NULL redraw loop (gets rectangles from the WIMP until
  53.   *  all rectangles have been "redrawn"). Doesn't actually do any drawing
  54.   *  though.
  55.   */
  56. extern BOOL Handler_NullRedraw(event_pollblock *event, void *reference);
  57.  
  58.  
  59.  /*
  60.   * Handler for clicks on "OK" or "Cancel" (3-d) type buttons
  61.   * (Indents the button, waits for 1/3 second, and un-indents the button)
  62.   */
  63. extern BOOL Handler_ClickOK(event_pollblock *event, void *reference);
  64.  
  65.  
  66.  
  67.  
  68.  /* Handler_ModeChange ----------------------------------------------------
  69.   * This is a handler for mode change events. It calls Screen_CacheModeInfo()
  70.   * every time the screen mode changes, guaranteeing that the screen variables
  71.   * are always correct (EXCEPT, YOU must call Screen_CacheModeInfo() once
  72.   * during initialisation.
  73.   *
  74.   * If you have called Template_UseOutlineFonts() and the screen resolution
  75.   * has changed in such a way as to necessitate it, it also calls
  76.   * Window_ModeChange to fix all your icons which use outline fonts
  77.   * (otherwise, they often become the wrong size upon a mode change)
  78.   * (Note that this won't have a very useful effect unless you use Template
  79.   * and Window functions to create all your windows - in fact, such windows
  80.   * will no longer 'own' the fonts they are using, and these fonts may
  81.   * disappear or change at random in the future - so DON'T use this function
  82.   * unless ALL your windows were created with Window_Create.
  83.   *
  84.   * See also Window.h
  85.   *
  86.   * Attach it to mode change messages using:
  87.   *  EventMsg_Claim(message_MODECHANGE, event_any, Handler_ModeChange, NULL);
  88.   */
  89. extern BOOL Handler_ModeChange(event_pollblock *event, void *reference);
  90.  
  91.  
  92.  
  93.  
  94. /* Handler_DragNULL & Handler_DragFinish ----------------------------------
  95.  *
  96.  * These handlers are for use with the Drag sublibrary.
  97.  * See Drag.h for details of how this operates.
  98.  *
  99.  * DragNULL is called on NULL events to allow drag updates (redraw of a
  100.  * selection as it is dragged, for example). It calls the drag handler
  101.  * registered with Drag_SetHandlers() on each NULL it recieves.
  102.  * (Note that currently I have not written support for enabling and disabling
  103.  * NULL events with the Event sublibrary as needed, because I never use Event)
  104.  *
  105.  * DragFinish is called on a USERDRAG event (drag has finished) to tidy up
  106.  * at the end of a drag (Complete a selection, or save a file, etc).
  107.  * This calls the Drag-Completed handler registered with Drag_SetHandlers
  108.  * and also resets the drag handlers (as no drag is now in progress)
  109.  */
  110. extern BOOL Handler_DragNULL(event_pollblock *event, void *reference);
  111. extern BOOL Handler_DragFinish(event_pollblock *event, void *reference);
  112.  
  113.  
  114.  
  115.  /*  Handler_HatchRedraw --------------------------------------------------
  116.   *
  117.   *  Hatch the work area of a window. Useful when testing
  118.   *  a program before you get round to writing your own redraw
  119.   *  routines so you can see that something is happening.
  120.   */
  121. extern BOOL Handler_HatchRedraw(event_pollblock *event, void *reference);
  122.  
  123.  
  124. #ifdef __cplusplus
  125.            }
  126. #endif
  127.  
  128. #endif
  129.