home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / pref_helpers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.8 KB  |  101 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. #ifndef __xfe_pref_helpers_h
  20. #define __xfe_pref_helpers_h
  21.  
  22. #include <X11/Intrinsic.h>
  23. #include "net.h"
  24.  
  25. struct fe_prefs_helpers_data
  26. {
  27.   MWContext *context;
  28.  
  29.   /* Helpers page */
  30.   Widget helpers_selector, helpers_page;
  31.   Widget helpers_list;
  32.  
  33.   /* New Helper and Plugin stuff */
  34.   Widget mime_types_desc_text;
  35.   Widget mime_types_text;
  36.   Widget mime_types_suffix_text;
  37.  
  38.   /* Editor */
  39.   Widget navigator_b;
  40.   Widget plugin_b;
  41.   Widget plugin_option;
  42.   Widget plugin_pulldown;
  43.   Widget app_b;
  44.   Widget app_text;
  45.   Widget app_browse;
  46.   Widget save_b;
  47.   Widget unknown_b;
  48.  
  49.   Widget editor;
  50.   Widget edit_b;
  51.   Widget new_b;
  52.   Widget delete_b;
  53.  
  54.   /* Data Stuff */
  55.   int pos;
  56.   NET_cdataStruct *cd;
  57.   char **plugins;
  58. };
  59.  
  60. #ifdef __cplusplus
  61. #define EXTERN extern "C"
  62. #else
  63. #define EXTERN extern
  64. #endif
  65.  
  66. EXTERN void
  67. fe_helpers_build_mime_list(struct fe_prefs_helpers_data *fep);
  68.  
  69. EXTERN struct fe_prefs_helpers_data *
  70. fe_helpers_make_helpers_page (MWContext *context, Widget parent);
  71.  
  72. EXTERN void
  73. fe_helpers_prepareForDestroy(struct fe_prefs_helpers_data *fep);
  74.  
  75. /* Given a mimetype string, will return the mailcap entry (md_list)
  76.  * associated with this mimetype. If the mimetype has no mailcap entry
  77.  * associated with this, returns NULL.
  78.  */
  79. EXTERN NET_mdataStruct *
  80. fe_helpers_get_mailcap_from_type(char *type);
  81.  
  82. /* Adds a new entry into the mailcap list (md_list) */
  83. EXTERN void
  84. fe_helpers_add_new_mailcap_data(char *contenttype, char* src_str,
  85.                 char *command, char *xmode, Boolean isLocal);
  86.  
  87. /* Update the xmode of a mailcap entry. Also the src_string is updated.
  88.  * If the mailcap entry is NULL, this will create a new one.
  89.  */
  90. EXTERN void
  91. fe_helpers_update_mailcap_entry(char *contenttype, NET_mdataStruct *md,
  92.                 char *xmode);
  93.  
  94. /* From plugins.c */
  95. EXTERN XP_Bool fe_IsMailcapEntryPlugin(NET_mdataStruct *md_item);
  96. EXTERN char *fe_GetPluginNameFromMailcapEntry(NET_mdataStruct *md_item);
  97. EXTERN int fe_GetMimetypeInfoFromPlugin(char *pluginName, char *mimetype,
  98.                     char **r_desc, char **r_ext);
  99.  
  100. #endif
  101.