home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / layout / shim.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  10.2 KB  |  246 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.  
  20. extern void *lo_InitFEFunctions(void *context);
  21.  
  22. extern void shim_IL_StartPage(DocumentContext context);
  23. extern void shim_IL_NoMoreImages(DocumentContext context);
  24. extern void shim_IL_UseDefaultColormapThisPage(DocumentContext context);
  25. extern void shim_IL_ColormapTag(char *url, DocumentContext context);
  26. extern void shim_IL_ReplaceImage(DocumentContext context,
  27.             LO_ImageStruct *ret_image, LO_ImageStruct *image);
  28. extern void shim_FE_ShiftImage(DocumentContext context,
  29.             LO_ImageStruct *image);
  30.  
  31.  
  32. extern void shim_FE_GetJavaAppSize(DocumentContext context,
  33.             LO_JavaAppStruct *java, URL_ReloadMethod force_reload);
  34. extern void shim_FE_GetEmbedSize(DocumentContext context,
  35.             LO_EmbedStruct *embed, URL_ReloadMethod force_reload);
  36. extern void shim_FE_GetImageInfo(DocumentContext context,
  37.             LO_ImageStruct *image, URL_ReloadMethod force_reload);
  38.  
  39. extern void shim_FE_GetTextInfo(DocumentContext context,
  40.             LO_TextStruct *text, LO_TextInfo *text_info);
  41. extern char *shim_FE_TranslateISOText(DocumentContext context,
  42.             int charset, char *ISO_Text);
  43.  
  44.  
  45. extern void shim_FE_DisplayText(DocumentContext context,
  46.             int iLocation, LO_TextStruct *text,
  47.             XP_Bool need_bg);
  48. extern void shim_FE_DisplaySubtext(DocumentContext context,
  49.             int iLocation, LO_TextStruct *text,
  50.             int32 start_pos, int32 end_pos, XP_Bool need_bg);
  51. extern void shim_FE_DisplayEmbed(DocumentContext context,
  52.             int iLocation, LO_EmbedStruct *embed);
  53. extern void shim_FE_DisplayJavaApp(DocumentContext context,
  54.             int iLocation, LO_JavaAppStruct *java_app);
  55. extern void shim_FE_DisplayImage(DocumentContext context,
  56.             int iLocation, LO_ImageStruct *image);
  57. extern void shim_FE_DisplaySubImage(DocumentContext context,
  58.             int iLocation, LO_ImageStruct *image,
  59.             int32 x, int32 y, uint32 width, uint32 height);
  60. extern void shim_FE_DisplayEdge(DocumentContext context,
  61.             int iLocation, LO_EdgeStruct *edge);
  62. extern void shim_FE_DisplayTable(DocumentContext context,
  63.             int iLocation, LO_TableStruct *table);
  64. extern void shim_FE_DisplaySubDoc(DocumentContext context,
  65.             int iLocation, LO_SubDocStruct *subdoc);
  66. extern void shim_FE_DisplayCell(DocumentContext context,
  67.             int iLocation, LO_CellStruct *cell);
  68. extern void shim_FE_DisplayLineFeed(DocumentContext context,
  69.         int iLocation, LO_LinefeedStruct *lfeed, XP_Bool need_bg);
  70. extern void shim_FE_DisplayHR(DocumentContext context,
  71.             int iLocation, LO_HorizRuleStruct *hrule);
  72. extern void shim_FE_DisplayBullet(DocumentContext context,
  73.             int iLocation, LO_BulletStruct *bullet);
  74. extern void shim_FE_DisplayFormElement(DocumentContext context,
  75.             int iLocation, LO_FormElementStruct *form_element);
  76.  
  77. extern void shim_FE_GetFormElementInfo(DocumentContext context,
  78.             LO_FormElementStruct *form_element);
  79. extern void shim_FE_GetFormElementValue(DocumentContext context,
  80.             LO_FormElementStruct *form_element, XP_Bool hide);
  81. extern void shim_FE_FormTextIsSubmit(DocumentContext context,
  82.             LO_FormElementStruct *single_text_ele);
  83. extern void shim_FE_FreeFormElement(DocumentContext context,
  84.             LO_FormElementData *form_data);
  85. extern void shim_FE_ResetFormElement(DocumentContext context,
  86.             LO_FormElementStruct *form_element);
  87. extern void shim_FE_SetFormElementToggle(DocumentContext context,
  88.             LO_FormElementStruct *form_element, XP_Bool toggle);
  89.  
  90. extern void shim_FE_FreeEdgeElement(DocumentContext context,
  91.             LO_EdgeStruct *edge);
  92. extern void shim_FE_FreeEmbedElement(DocumentContext context,
  93.             LO_EmbedStruct *embed);
  94. extern void shim_FE_HideJavaAppElement(DocumentContext context,
  95.             void *session_data);
  96. extern void shim_FE_FreeImageElement(DocumentContext context,
  97.             LO_ImageStruct *image);
  98.  
  99. extern void shim_FE_GetFullWindowSize(DocumentContext context,
  100.             int32 *width, int32 *height);
  101. extern void shim_FE_GetEdgeMinSize(DocumentContext context,
  102.             int32 *size
  103. #if defined(XP_WIN) || defined(XP_OS2)
  104.             , Bool no_edge
  105. #endif
  106.             );
  107. extern void shim_FE_LoadGridCellFromHistory(DocumentContext context,
  108.             void *hist, URL_ReloadMethod force_reload);
  109. extern DocumentContext shim_FE_MakeGridWindow(DocumentContext context,
  110.             void *history,
  111.             int32 x, int32 y, int32 width, int32 height,
  112.             char *url_str, char *window_name, int8 scrolling,
  113.             URL_ReloadMethod force_reload
  114.             , Bool no_edge
  115.             );
  116. extern void shim_FE_RestructureGridWindow(DocumentContext context,
  117.             int32 x, int32 y, int32 width, int32 height);
  118. extern void *shim_FE_FreeGridWindow(DocumentContext context,
  119.             XP_Bool save_history);
  120.  
  121.  
  122. extern void shim_FE_SecurityDialog(DocumentContext context, int message);
  123.  
  124. extern void shim_FE_GetDocPosition(DocumentContext context,
  125.             int location, int32 *x, int32 *y);
  126. extern void shim_FE_SetDocPosition(DocumentContext context,
  127.             int location, int32 x, int32 y);
  128. extern void shim_FE_ScrollDocTo(DocumentContext context,
  129.             int location, int32 x, int32 y);
  130. extern void shim_FE_SetDocDimension(DocumentContext context,
  131.             int location, int32 width, int32 height);
  132. extern void shim_FE_ClearView(DocumentContext context,
  133.             int location);
  134. extern void shim_FE_SetDocTitle(DocumentContext context,
  135.             char *title);
  136. extern void shim_FE_SetBackgroundColor(DocumentContext context,
  137.             uint8 red, uint8 green, uint8 blue);
  138.  
  139. extern void shim_FE_SetProgressBarPercent(DocumentContext context,
  140.             int32 percent);
  141.  
  142. extern void shim_FE_LayoutNewDocument(DocumentContext context,
  143.         URL *url_struct, int32 *width, int32 *height,
  144.         int32 *margin_width, int32 *margin_height);
  145. extern void shim_FE_FinishedLayout(DocumentContext context);
  146. extern void shim_FE_BeginPreSection(DocumentContext context);
  147. extern void shim_FE_EndPreSection(DocumentContext context);
  148.  
  149. extern void shim_NPL_DeleteSessionData(DocumentContext context,
  150.             void *sessionData);
  151. extern void shim_LJ_DeleteSessionData(DocumentContext context,
  152.             void *sessionData);
  153.  
  154. extern void shim_LJ_CreateApplet(LO_JavaAppStruct *java,
  155.             DocumentContext context);
  156.  
  157. extern PRBool shim_SECMOZ_GenKeyFromChoice(DocumentContext context,
  158.             LO_Element *form,
  159.             char *choice, char *challenge,
  160.             char **pValue, PRBool *pDone);
  161. extern PRBool shim_SECMOZ_MakeSubmitPaymentDialog(DocumentContext context,
  162.             LO_Element *form,
  163.             void *values, void *cert_str,
  164.             char *order,
  165.             char **pValue, PRBool *pDone);
  166.  
  167. extern int16 shim_INTL_DefaultDocCharSetID(DocumentContext context);
  168. extern int16 shim_INTL_DefaultTextAttributeCharSetID(DocumentContext context);
  169. extern void shim_INTL_Relayout(DocumentContext context);
  170.  
  171. extern HISTORY *shim_SHIST_GetList(DocumentContext context);
  172. extern HST_ENT *shim_SHIST_GetPrevious(DocumentContext context);
  173. extern void shim_SHIST_FreeHistoryEntry(DocumentContext context,
  174.                 HST_ENT *hist);
  175. extern void shim_SHIST_SetCurrentDocFormListData(DocumentContext context,
  176.         void *data);
  177. extern void shim_SHIST_SetCurrentDocEmbedListData(DocumentContext context,
  178.         void *data);
  179. extern void shim_SHIST_SetCurrentDocGridData(DocumentContext context,
  180.         void *data);
  181.  
  182. extern void shim_LM_SendLoadEvent(DocumentContext context,
  183.                 LM_LoadEvent event);
  184. extern void shim_LM_SendImageEvent(DocumentContext context,
  185.                 LO_ImageStruct *images, LM_ImageEvent event);
  186. extern void shim_LM_ReleaseDocument(DocumentContext context, PRBool resize_reload);
  187. extern void shim_LM_ClearContextStream(DocumentContext context);
  188. /* EJB - until we have mocha modularized, MochaDecoder and MochaObject
  189.    will become void
  190. */
  191. extern void *shim_LM_GetMochaDecoder(DocumentContext context);
  192.  
  193. extern void *shim_LM_ReflectFormElement(DocumentContext context,
  194.                 LO_FormElementStruct *form_element);
  195. extern void *shim_LM_ReflectForm(DocumentContext context,
  196.                 struct lo_FormData_struct *form_data);
  197. extern void *shim_LM_ReflectImage(DocumentContext context,
  198.                 LO_ImageStruct *image, char *name);
  199. extern void *shim_LM_ReflectNamedAnchor(DocumentContext context,
  200.             struct lo_NameList_struct *name_rec, uint index);
  201. extern void *shim_LM_ReflectLink(DocumentContext context,
  202.                 LO_AnchorData *anchor, uint index);
  203. extern void *shim_LM_ReflectApplet(DocumentContext context,
  204.                 LO_JavaAppStruct *applet, uint index);
  205. extern void *shim_LM_ReflectEmbed(DocumentContext context,
  206.                 LO_EmbedStruct *embed, uint index);
  207. extern void *shim_LM_ReflectLayer(DocumentContext context,
  208.                 CL_Layer *layer, CL_Layer *parent_layer);
  209.  
  210. extern void shim_XP_InterruptContext(DocumentContext context);
  211.  
  212. /* EJB this stream interface is totally new in the modularized
  213.    world, I don't know what to do here.
  214. extern struct netscape_net_Stream *shim_NET_NewStream(char *name,
  215.                MKStreamWriteFunc put,
  216.                MKStreamCompleteFunc complete,
  217.                MKStreamAbortFunc abort,
  218.                MKStreamWriteReadyFunc ready,
  219.                void *data,
  220.                DocumentContext context);
  221. */
  222. extern int shim_NET_GetURL(URL *url_struct,
  223.         int16 output_format,
  224.         DocumentContext context,
  225.         void *exit_routine);
  226. extern Bool shim_NET_ParseMimeHeader(DocumentContext context,
  227.         URL *url_struct,
  228.         char *name, char *value,
  229.         XP_Bool is_http);
  230.  
  231. extern void shim_FE_GetTextFrame(DocumentContext context,
  232.         LO_TextStruct *text, int32 start, int32 end, XP_Rect *frame);
  233.  
  234. extern void shim_FE_EraseBackground(DocumentContext context,
  235.             int location, int32 x, int32 y,
  236.             uint32 width, uint32 height,
  237.             LO_Color *bg, LO_ImageStruct *image);
  238.  
  239. extern PRBool shim_FE_HandleLayerEvent(DocumentContext context,
  240.             CL_Layer *layer, CL_Event *event);
  241.  
  242. extern void shim_FE_GetOrigin(DocumentContext context,
  243.             int location, int32 *x, int32 *y);
  244. extern void shim_FE_SetOrigin(DocumentContext context,
  245.             int location, int32 x, int32 y);
  246.