/*
    ####             #    #     # #
    #   #            #    #       #          The FreeWare C library for
    #   #  ##   ###  #  # #     # ###             RISC OS machines
    #   # #  # #     # #  #     # #  #   ___________________________________
    #   # ####  ###  ##   #     # #  #
    #   # #        # # #  #     # #  #    Please refer to the accompanying
    ####   ### ####  #  # ##### # ###    documentation for conditions of use
    ________________________________________________________________________

    File:    Window.AutoHelp.c
    Author:  Copyright  1995
    Version: 1.01
    Purpose: 
    History: 1.01 (14 Nov 1995) JS Made SDLS compatible
*/

#include "Desk.Wimp.h"
#include "Desk.Event.h"
#include "Desk.Window.h"

#include "WindowDefs.h"



/* NOTE:
 * By #defining "Desk_USE_EVENTMSG" on compilation, the HelpHandler will be
 * called ONLY for a HelpRequest message, but this will also pull in the
 * "EventMsg" code.
 *
 * This function is basically here to show you how to include the
 * Desk_Window_HelpHandler under your own steam, using either EventMsg or Event
 *
 * use: #define Desk_USE_EVENTMSG 1
 *
 */


extern Desk_bool Desk_Window_AutoHelp(Desk_window_handle window, Desk_icon_handle icon)
{
#ifdef Desk_USE_EVENTMSG
  return(Desk_EventMsg_Claim(Desk_message_HELPREQUEST, window,
                          Desk_SDLS_dllEntry( Desk_Window_HelpHandler), NULL);
#else
  return(Desk_Event_Claim(Desk_event_USERMESSAGERECORDED, window, icon,
                                                 Desk_SDLS_dllEntry( Desk_Window_HelpHandler), NULL));
#endif
}
