home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / libfont / src / libfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.5 KB  |  138 lines

  1. /* -*- Mode: C++; tab-width: 8; 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.  *
  20.  * General include that contain all general junk that is in the system.
  21.  *
  22.  * dp Suresh <dp@netscape.com>
  23.  */
  24.  
  25.  
  26. #ifndef _libfont_H_
  27. #define _libfont_H_
  28.  
  29. #include "stdio.h"            /* Use C stdio to print errors */
  30. #include "string.h"
  31.  
  32. /*
  33.  * XXX Technically a lot of these includes should be ifdef MOZILLA_CLIENT
  34.  * XXX as the make sense only when libfont/ is used with communicator.
  35.  * XXX
  36.  * XXX Eventually when we want java applications to use libfont/ then we will take
  37.  * XXX we might want to enforce this rule strict.
  38.  */
  39.  
  40. #include "xp_mcom.h"
  41. #include "jritypes.h"        /* For jri types jint, jsize */
  42. #include "net.h"            /* URL_Struct */
  43. #include "merrors.h"
  44. #include "proto.h"
  45. #include "shist.h"        /* For SHIST_GetCurrent() */
  46.  
  47. #include "prlink.h"            /* NSPR PR_LoadLibrary */
  48.  
  49. /* Some of our interfaces use MWContext * and this is defined in
  50.  * the mozilla client ns/include/structs.h
  51.  *
  52.  * By doing this we will have problems working with other consumers
  53.  * like java application.
  54.  */
  55. #include "structs.h"    /* For MWContext */ 
  56.  
  57. #ifndef NO_PREF_CHANGE
  58. #ifdef MOZILLA_CLIENT
  59. #include "prefapi.h"    /* For mozilla prefs */
  60. #endif
  61. #endif /* NO_PREF_CHANGE */
  62.  
  63. #ifndef NO_HTML_DIALOGS_CHANGE
  64. #include "htmldlgs.h"    /* For NF_AboutData()::XP_ConvertStringToArgVec() */
  65. #include "xpgetstr.h"
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif /* __cplusplus */
  69.  
  70. #ifdef __cplusplus
  71. }
  72. #endif /* __cplusplus */
  73. #endif /* NO_HTML_DIALOGS_CHANGE */
  74.  
  75. #include "libi18n.h"    /* For unicode conversion routines */
  76.  
  77. /*
  78.  * Cross module memory allocator and deallocator.
  79.  * Until jmc works this out, we will use these.
  80.  */
  81. #define WF_ALLOC(n) XP_ALLOC(n)
  82. #define WF_FREE(p) XP_FREE(p)
  83. #define WF_REALLOC(p, n) XP_REALLOC(p, n)
  84.  
  85. /*
  86.  * Debug tracing
  87.  */
  88. extern int wf_trace_flag;
  89. #define WF_TRACEMSG(msg) XP_LTRACE(wf_trace_flag, 1, msg)
  90.  
  91. /*
  92.  * Forward declaration of all interface structures.
  93.  */
  94. struct nfdoer;
  95. struct nff;
  96. struct nffbc;
  97. struct nffbp;
  98. struct nffbu;
  99. struct nffmi;
  100. struct nffp;
  101. struct nfrc;
  102. struct nfrf;
  103. struct nfstrm;
  104. struct nfdlm;
  105.  
  106. /*
  107.  * new_stream_data
  108.  * This structure is passed in as client_data to NewStream
  109.  */
  110. struct wf_new_stream_data {
  111.     struct nfdoer *observer;
  112.     struct nff *f;
  113.     struct nfrc *rc;
  114.     char *url_of_page;
  115. };
  116.  
  117. #ifdef __cplusplus
  118. extern "C" {
  119. #endif /* __cplusplus */
  120.     void wfUrlExit(URL_Struct *urls, int status, MWContext *cx);
  121.     NET_StreamClass* wfNewStream(FO_Present_Types format_out,
  122.         void* client_data,    URL_Struct* urls, MWContext* cx);
  123. #ifdef __cplusplus
  124. }
  125. #endif /* __cplusplus */
  126.  
  127.  
  128.  
  129. #ifdef __cplusplus
  130. #include "wfMisc.h"
  131. #endif /* __cplusplus */
  132.  
  133. #define WF_CATALOG_FILE_VERSION "1.0"
  134.  
  135. #define    WF_PATH_SEP_STR    ";"
  136.  
  137. #endif /* _libfont_H_ */
  138.