home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / stubfe / stubctxt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  10.8 KB  |  665 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.    stubctxt.c --- stub fe handling of MWContext initialization.
  21. */
  22.  
  23. #include "structs.h"
  24. #include "ntypes.h"
  25. #include "xpassert.h"
  26. #include "proto.h"
  27. #include "fe_proto.h"
  28.  
  29. #include "stubform.h"
  30.  
  31. static MWContext*
  32. STUBFE_CreateNewDocWindow(MWContext *calling_context,
  33.               URL_Struct *URL)
  34. {
  35.   return NULL;
  36. }
  37.  
  38. static void
  39. STUBFE_LayoutNewDocument(MWContext *context,
  40.              URL_Struct *url_struct,
  41.              int32 *iWidth,
  42.              int32 *iHeight,
  43.              int32 *mWidth,
  44.              int32 *mHeight)
  45. {
  46. }
  47.  
  48. static void 
  49. STUBFE_SetDocTitle (MWContext * context,
  50.             char * title)
  51. {
  52. }
  53.  
  54. static void 
  55. STUBFE_FinishedLayout (MWContext *context)
  56. {
  57. }
  58.  
  59. static char* 
  60. STUBFE_TranslateISOText (MWContext * context,
  61.              int charset,
  62.              char *ISO_Text)
  63. {
  64.   return NULL;
  65. }
  66.  
  67. static int 
  68. STUBFE_GetTextInfo (MWContext * context,
  69.             LO_TextStruct *text,
  70.             LO_TextInfo *text_info)
  71. {
  72.   return -1;
  73. }
  74.  
  75. static void 
  76. STUBFE_GetEmbedSize (MWContext * context,
  77.              LO_EmbedStruct *embed_struct,
  78.              NET_ReloadMethod force_reload)
  79. {
  80. }
  81.  
  82. static void 
  83. STUBFE_GetJavaAppSize (MWContext * context,
  84.                LO_JavaAppStruct *java_struct,
  85.                NET_ReloadMethod force_reload)
  86. {
  87. }
  88.  
  89. static void 
  90. STUBFE_FreeEmbedElement (MWContext *context,
  91.              LO_EmbedStruct *embed)
  92. {
  93. }
  94.  
  95. static void 
  96. STUBFE_FreeJavaAppElement (MWContext *context,
  97.                struct LJAppletData *appletData)
  98. {
  99. }
  100.  
  101. static void 
  102. STUBFE_HideJavaAppElement (MWContext *context,
  103.                struct LJAppletData *java_app)
  104. {
  105. }
  106.  
  107. static void 
  108. STUBFE_FreeEdgeElement (MWContext *context,
  109.             LO_EdgeStruct *edge)
  110. {
  111. }
  112.  
  113. static void 
  114. STUBFE_FormTextIsSubmit (MWContext * context,
  115.              LO_FormElementStruct * form_element)
  116. {
  117. }
  118.  
  119. static void 
  120. STUBFE_DisplaySubtext (MWContext * context,
  121.                int iLocation,
  122.                LO_TextStruct *text,
  123.                int32 start_pos,
  124.                int32 end_pos,
  125.                XP_Bool need_bg)
  126. {
  127. }
  128.  
  129. static void 
  130. STUBFE_DisplayText (MWContext * context,
  131.             int iLocation,
  132.             LO_TextStruct *text,
  133.             XP_Bool need_bg)
  134. {
  135. }
  136.  
  137. static void 
  138. STUBFE_DisplayEmbed (MWContext * context,
  139.              int iLocation,
  140.              LO_EmbedStruct *embed_struct)
  141. {
  142. }
  143.  
  144.  
  145. static void 
  146. STUBFE_DisplayJavaApp (MWContext * context,
  147.                int iLocation,
  148.                LO_JavaAppStruct *java_struct)
  149. {
  150. }
  151.  
  152. static void 
  153. STUBFE_DisplayEdge (MWContext * context,
  154.             int iLocation,
  155.             LO_EdgeStruct *edge_struct)
  156. {
  157. }
  158.  
  159. static void 
  160. STUBFE_DisplayTable (MWContext * context,
  161.              int iLocation,
  162.              LO_TableStruct *table_struct)
  163. {
  164. }
  165.  
  166. static void 
  167. STUBFE_DisplayCell (MWContext * context,
  168.             int iLocation,
  169.             LO_CellStruct *cell_struct)
  170. {
  171. }
  172.  
  173. static void 
  174. STUBFE_DisplaySubDoc (MWContext * context,
  175.               int iLocation,
  176.               LO_SubDocStruct *subdoc_struct)
  177. {
  178. }
  179.  
  180. static void 
  181. STUBFE_DisplayLineFeed (MWContext * context,
  182.             int iLocation ,
  183.             LO_LinefeedStruct *line_feed,
  184.             XP_Bool need_bg)
  185. {
  186. }
  187.  
  188. static void 
  189. STUBFE_DisplayHR (MWContext * context,
  190.           int iLocation ,
  191.           LO_HorizRuleStruct *HR_struct)
  192. {
  193. }
  194.  
  195. static void 
  196. STUBFE_DisplayBullet (MWContext *context,
  197.               int iLocation,
  198.               LO_BullettStruct *bullet)
  199. {
  200. }
  201.  
  202. static void 
  203. STUBFE_DisplayFormElement (MWContext * context,
  204.                int iLocation,
  205.                LO_FormElementStruct * form_element)
  206. {
  207. }
  208.  
  209. static void 
  210. STUBFE_DisplayBorder (MWContext *context,
  211.               int iLocation,
  212.               int x,
  213.               int y,
  214.               int width,
  215.               int height,
  216.               int bw,
  217.               LO_Color *color,
  218.               LO_LineStyle style)
  219. {
  220. }
  221.  
  222. static void 
  223. STUBFE_DisplayFeedback (MWContext *context,
  224.             int iLocation,
  225.             LO_Element *element)
  226. {
  227. }
  228.  
  229. static void 
  230. STUBFE_ClearView (MWContext * context,
  231.           int which)
  232. {
  233. }
  234.  
  235. static void 
  236. STUBFE_SetDocDimension (MWContext *context,
  237.             int iLocation,
  238.             int32 iWidth,
  239.             int32 iLength)
  240. {
  241. }
  242.  
  243. static void 
  244. STUBFE_SetDocPosition (MWContext *context,
  245.                int iLocation,
  246.                int32 iX,
  247.                int32 iY)
  248. {
  249. }
  250.  
  251. static void 
  252. STUBFE_GetDocPosition (MWContext *context,
  253.                int iLocation,
  254.                int32 *iX,
  255.                int32 *iY)
  256. {
  257. }
  258.  
  259. static void 
  260. STUBFE_BeginPreSection (MWContext *context)
  261. {
  262. }
  263.  
  264. static void 
  265. STUBFE_EndPreSection (MWContext *context)
  266. {
  267. }
  268.  
  269. static void
  270. STUBFE_Progress(MWContext *context,
  271.         const char *msg)
  272. {
  273. }
  274.  
  275. static void 
  276. STUBFE_SetProgressBarPercent (MWContext *context,
  277.                   int32 percent)
  278. {
  279. }
  280.  
  281. static void 
  282. STUBFE_SetBackgroundColor (MWContext *context,
  283.                uint8 red,
  284.                uint8 green,
  285.                uint8 blue)
  286. {
  287. }
  288.  
  289. static void 
  290. STUBFE_SetCallNetlibAllTheTime (MWContext * win_id)
  291. {
  292. }
  293.  
  294. static void 
  295. STUBFE_ClearCallNetlibAllTheTime (MWContext * win_id)
  296. {
  297. }
  298.  
  299. static void 
  300. STUBFE_GraphProgressInit (MWContext *context,
  301.               URL_Struct *URL_s,
  302.               int32 content_length)
  303. {
  304. }
  305.  
  306. static void 
  307. STUBFE_GraphProgressDestroy (MWContext *context,
  308.                  URL_Struct *URL_s,
  309.                  int32 content_length,
  310.                  int32 total_bytes_read)
  311. {
  312. }
  313.  
  314. static void 
  315. STUBFE_GraphProgress (MWContext *context,
  316.               URL_Struct *URL_s,
  317.               int32 bytes_received,
  318.               int32 bytes_since_last_time,
  319.               int32 content_length)
  320. {
  321. }
  322.  
  323. static XP_Bool 
  324. STUBFE_UseFancyFTP (MWContext * window_id)
  325. {
  326.   return FALSE;
  327. }
  328.  
  329. static XP_Bool 
  330. STUBFE_UseFancyNewsgroupListing (MWContext *window_id)
  331. {
  332.   return FALSE;
  333. }
  334.  
  335. static int 
  336. STUBFE_FileSortMethod (MWContext * window_id)
  337. {
  338.   return -1;
  339. }
  340.  
  341. static XP_Bool 
  342. STUBFE_ShowAllNewsArticles (MWContext *window_id)
  343. {
  344.   return FALSE;
  345. }
  346.  
  347. static void
  348. STUBFE_Alert(MWContext *context,
  349.          const char *msg)
  350. {
  351. }
  352.  
  353. static XP_Bool 
  354. STUBFE_Confirm(MWContext * context,
  355.            const char * Msg)
  356. {
  357.   return FALSE;
  358. }
  359.  
  360. static char* 
  361. STUBFE_Prompt(MWContext * context,
  362.           const char * Msg,
  363.           const char * dflt)
  364. {
  365.   return NULL;
  366. }
  367.  
  368. static char* 
  369. STUBFE_PromptWithCaption(MWContext * context,
  370.              const char *caption,
  371.              const char * Msg,
  372.              const char * dflt)
  373. {
  374.   return NULL;
  375. }
  376.  
  377. static XP_Bool 
  378. STUBFE_PromptUsernameAndPassword (MWContext *context,
  379.                   const char * message,
  380.                   char **username,
  381.                   char **password)
  382. {
  383.   return FALSE;
  384. }
  385.  
  386. static char* 
  387. STUBFE_PromptPassword(MWContext * context,
  388.               const char * Msg)
  389. {
  390.   return NULL;
  391. }
  392.  
  393. static void 
  394. STUBFE_EnableClicking(MWContext* context)
  395. {
  396. }
  397.  
  398. static void 
  399. STUBFE_AllConnectionsComplete(MWContext * context)
  400. {
  401. }
  402.  
  403. static void 
  404. STUBFE_EraseBackground (MWContext * context,
  405.             int iLocation,
  406.             int32 x,
  407.             int32 y,
  408.             uint32 width,
  409.             uint32 height,
  410.             LO_Color *bg)
  411. {
  412. }
  413.  
  414. static void 
  415. STUBFE_SetDrawable (MWContext *context,
  416.             CL_Drawable *drawable)
  417. {
  418. }
  419.  
  420. static void 
  421. STUBFE_GetTextFrame (MWContext *context,
  422.              LO_TextStruct *text,
  423.              int32 start,
  424.              int32 end,
  425.              XP_Rect *frame)
  426. {
  427. }
  428.  
  429. /* these functions are to allow dealyed native window applet creation and transparent applet */
  430. static void 
  431. STUBFE_HandleClippingView (MWContext *pContext,
  432.                struct LJAppletData *appletD,
  433.                int x,
  434.                int y,
  435.                int width,
  436.                int height)
  437. {
  438. }
  439.  
  440. static void 
  441. STUBFE_DrawJavaApp (MWContext *pContext,
  442.             int iLocation,
  443.             LO_JavaAppStruct *pJava)
  444. {
  445. }
  446.  
  447. static ContextFuncs _stubfe_funcs = {
  448. #define FE_DEFINE(func, returns, args) STUBFE##_##func,
  449. #include "mk_cx_fn.h"
  450. };
  451.  
  452. MWContext*
  453. STUBFE_CreateMWContext()
  454. {
  455.   MWContext *context = XP_NewContext();
  456.  
  457.   XP_ASSERT(context);
  458.   if (!context) return NULL;
  459.  
  460.   context->funcs = &_stubfe_funcs;
  461.  
  462.   return context;
  463. }
  464.  
  465. int32
  466. FE_GetContextID(MWContext *window_id)
  467. {
  468. }
  469.  
  470. MWContext*
  471. FE_GetInitContext()
  472. {
  473. }
  474.  
  475. MWContext*
  476. FE_MakeNewWindow(MWContext *old_context,
  477.          URL_Struct *url,
  478.          char *window_name,
  479.          Chrome *chrome)
  480. {
  481. }
  482.  
  483. void
  484. FE_DestroyWindow(MWContext *context)
  485. {
  486. }
  487.  
  488. void
  489. FE_UpdateStopState(MWContext *context)
  490. {
  491. }
  492.  
  493. void
  494. FE_UpdateChrome(MWContext *window,
  495.         Chrome *chrome)
  496. {
  497. }
  498.  
  499. void
  500. FE_QueryChrome(MWContext *window,
  501.            Chrome *chrome)
  502. {
  503. }
  504.  
  505. void 
  506. FE_BackCommand(MWContext *context)
  507. {
  508. }
  509.  
  510. void 
  511. FE_ForwardCommand(MWContext *context)
  512. {
  513. }
  514.  
  515. void 
  516. FE_HomeCommand(MWContext *context)
  517. {
  518. }
  519.  
  520. void 
  521. FE_PrintCommand(MWContext *context)
  522. {
  523. }
  524.  
  525. XP_Bool
  526. FE_FindCommand(MWContext *context,
  527.            char *text,
  528.            XP_Bool case_sensitive,
  529.            XP_Bool backwards,
  530.            XP_Bool wrap)
  531. {
  532. }
  533.  
  534. void 
  535. FE_GetWindowOffset(MWContext *pContext, 
  536.            int32 *sx, 
  537.            int32 *sy)
  538. {
  539. }
  540.  
  541. void 
  542. FE_GetScreenSize(MWContext *pContext, 
  543.          int32 *sx, 
  544.          int32 *sy)
  545. {
  546. }
  547.  
  548. void 
  549. FE_GetAvailScreenRect(MWContext *pContext, 
  550.               int32 *sx, 
  551.               int32 *sy, 
  552.               int32 *left, 
  553.               int32 *top)
  554. {
  555. }
  556.  
  557. void 
  558. FE_GetPixelAndColorDepth(MWContext *pContext, 
  559.              int32 *pixelDepth, 
  560.              int32 *colorDepth)
  561. {
  562. }
  563.  
  564. void
  565. FE_ShiftImage (MWContext *context,
  566.            LO_ImageStruct *lo_image)
  567. {
  568. }
  569.  
  570. void
  571. FE_ScrollDocTo (MWContext *context,
  572.         int iLocation,
  573.         int32 x,
  574.         int32 y)
  575. {
  576. }
  577.  
  578. void
  579. FE_ScrollDocBy (MWContext *context,
  580.         int iLocation,
  581.         int32 x,
  582.         int32 y)
  583. {
  584. }
  585.  
  586. int
  587. FE_GetURL (MWContext *context,
  588.        URL_Struct *url)
  589. {
  590. }
  591.  
  592. void
  593. FE_SetRefreshURLTimer(MWContext *context, 
  594.               uint32     seconds, 
  595.               char      *refresh_url)
  596. {
  597. }
  598.  
  599. int
  600. FE_EnableBackButton(MWContext* context)
  601. {
  602. }
  603.  
  604. int
  605. FE_EnableForwardButton(MWContext* context)
  606. {
  607. }
  608.  
  609. int
  610. FE_DisableBackButton(MWContext* context)
  611. {
  612. }
  613.  
  614. int
  615. FE_DisableForwardButton(MWContext* context)
  616. {
  617. }
  618.  
  619. MWContext *
  620. FE_MakeBlankWindow(MWContext *old_context,
  621.            URL_Struct *url,
  622.            char *window_name)
  623. {
  624. }
  625.  
  626. void
  627. FE_SetWindowLoading(MWContext *context,
  628.             URL_Struct *url,
  629.             Net_GetUrlExitFunc **exit_func)
  630. {
  631. }
  632.  
  633. void
  634. FE_RaiseWindow(MWContext *context)
  635. {
  636. }
  637.  
  638. void
  639. FE_ConnectToRemoteHost(MWContext* ctxt,
  640.                int url_type,
  641.                char* hostname,
  642.                char* port,
  643.                char* username)
  644. {
  645. }
  646.  
  647. void*
  648. FE_AboutData(const char* which,
  649.          char** data_ret,
  650.          int32* length_ret,
  651.          char** content_type_ret)
  652. {
  653. }
  654.  
  655. void
  656. FE_FreeAboutData(void* data,
  657.          const char* which)
  658. {
  659. }
  660.  
  661. XP_Bool
  662. FE_IsNetcasterInstalled()
  663. {
  664. }
  665.