home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libnet / mkhelp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  59 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef MKHELP_H
  20. #define MKHELP_H
  21.  
  22. /* EA: Help Begin */
  23.  
  24. /* The following structure stores the URL of the current help topic and project
  25.    file of a help window.  Because this information is accessed by a javascript
  26.    context sometime after the URL is delivered to the window, we needed a persistent
  27.    way in which the data would remain associated with a given window, and,
  28.    despite a great desire to not muck around with the MWContext, that was the
  29.    only thing that was in scope at the time.  Lou Montoulli suggested using
  30.    fields that are part of the URL_struct, such as the fe_data and Chrome
  31.    fields, but these were not in scope at the time that the Javascript calls
  32.    were being evaluated. */
  33.  
  34. typedef struct HelpInfoStruct_ {
  35.     char        *topicURL;
  36.     char        *projectURL;
  37. } HelpInfoStruct;
  38.  
  39. #define HELP_INFO_PTR(MW_CTX)        ((HelpInfoStruct *) (MW_CTX).pHelpInfo)
  40.  
  41. /* Called by netlib to parse a nethelp URL.  ParseNetHelpURL alters the
  42.    URL struct passed in to point to the location of the help project file
  43.    specified by the nethelp URL. */
  44.    
  45. extern int
  46. NET_ParseNetHelpURL(URL_Struct *URL_s);
  47.  
  48. /* stream converter to parse an HTML help mapping file
  49.  * and load the url associated with the id
  50.  */
  51. extern NET_StreamClass *
  52. NET_HTMLHelpMapToURL(int         format_out,
  53.                      void       *data_object,
  54.                      URL_Struct *URL_s,
  55.                      MWContext  *window_id);
  56.  
  57. #endif /* MKHELP_H */
  58.  
  59.