home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / prefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  18.1 KB  |  774 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. #ifndef _PREFS_H_
  21. #define _PREFS_H_
  22.  
  23. #include "xp_core.h"
  24. #include "msgcom.h"
  25.  
  26. /* prefs version */
  27.  
  28. #define PREFS_CURRENT_VERSION "1.0"
  29.  
  30. /* browser startup page */
  31. #define BROWSER_STARTUP_BLANK  0
  32. #define BROWSER_STARTUP_HOME   1
  33. #define BROWSER_STARTUP_LAST   2
  34.  
  35. /* mail server type */
  36. #define MAIL_SERVER_POP3       0
  37. #define MAIL_SERVER_IMAP       1
  38. #define MAIL_SERVER_MOVEMAIL   2
  39. #define MAIL_SERVER_INBOX      3
  40.  
  41. /* toolbar style */
  42. #define BROWSER_TOOLBAR_ICONS_ONLY     0
  43. #define BROWSER_TOOLBAR_TEXT_ONLY      1
  44. #define BROWSER_TOOLBAR_ICONS_AND_TEXT 2
  45.  
  46. /* news keep method */
  47. #define KEEP_ALL_NEWS          0
  48. #define KEEP_NEWS_BY_AGE       1
  49. #define KEEP_NEWS_BY_COUNT     2
  50.  
  51. /* offline startup mode */
  52. #define OFFLINE_STARTUP_ONLINE      0
  53. #define OFFLINE_STARTUP_OFFLINE     1
  54. #define OFFLINE_STARTUP_ASKME       2
  55.  
  56. /* offline news download increments */
  57. #define OFFLINE_NEWS_DL_ALL         0
  58. #define OFFLINE_NEWS_DL_UNREAD_ONLY 1
  59.  
  60. /* offline news download increments */
  61. #define OFFLINE_NEWS_DL_YESTERDAY    0
  62. #define OFFLINE_NEWS_DL_1_WK_AGO     1
  63. #define OFFLINE_NEWS_DL_2_WKS_AGO    2
  64. #define OFFLINE_NEWS_DL_1_MONTH_AGO  3
  65. #define OFFLINE_NEWS_DL_6_MONTHS_AGO 4
  66. #define OFFLINE_NEWS_DL_1_YEAR_AGO   5
  67.  
  68. /* use document fonts */
  69. #define DOC_FONTS_NEVER        0
  70. #define DOC_FONTS_QUICK        1
  71. #define DOC_FONTS_ALWAYS       2     
  72.  
  73. /* help file sites */
  74. #define HELPFILE_SITE_NETSCAPE  0
  75. #define HELPFILE_SITE_INSTALLED 1
  76. #define HELPFILE_SITE_CUSTOM    2
  77.  
  78. /* default link expiration for 'never expired' option */
  79. #define LINK_NEVER_EXPIRE_DAYS  180
  80.  
  81. /* default mail html action */
  82. #define HTML_ACTION_ASK        0
  83. #define HTML_ACTION_TEXT       1
  84. #define HTML_ACTION_HTML       2
  85. #define HTML_ACTION_BOTH       3
  86.  
  87. /* global preferences structure.
  88.  */
  89. typedef struct _XFE_GlobalPrefs 
  90. {
  91.     /* 
  92.      *  ----- preferences.js version -----
  93.      */
  94.  
  95.     char    *version_number;         
  96.     int      prefs_need_upgrade; /* 0 = no change, 1 = upgrade, -1 = downgrade */
  97.  
  98.     /*
  99.      *  ----- Appearance -----
  100.      */
  101.  
  102.     /*  launch on startup */
  103.  
  104.     XP_Bool startup_browser_p;    /* new for 4.0 */
  105.     XP_Bool startup_mail_p;       /* new for 4.0 */
  106.     XP_Bool startup_news_p;       /* new for 4.0 */
  107.     XP_Bool startup_editor_p;     /* new for 4.0 */
  108.     XP_Bool startup_conference_p; /* new for 4.0 */
  109.     XP_Bool startup_netcaster_p;  /* new for 4.0 */
  110.     XP_Bool startup_calendar_p;   /* new for 4.0 */
  111.  
  112.     int     startup_mode;         /* browser, mail or news; 3.0 only; 
  113.                                    * replaced by items above 
  114.                                    */
  115.  
  116.     /* show toolbar as */
  117.  
  118.     int     toolbar_style;        /* new for 4.0
  119.                                    * BROWSER_TOOLBAR_ICONS_ONLY     0
  120.                                    * BROWSER_TOOLBAR_TEXT_ONLY      1
  121.                                    * BROWSER_TOOLBAR_ICONS_AND_TEXT 2
  122.                                    * will update toolbar_icons_p and toolbar_text_p
  123.                                    * when reading in toolbar_style
  124.                                    */
  125.     XP_Bool toolbar_icons_p;
  126.     XP_Bool toolbar_text_p;
  127.  
  128.     /*
  129.      *  ----- Appearance/Colors -----
  130.      */
  131.  
  132.     XP_Bool  underline_links_p;
  133.     XP_Bool  use_doc_colors;
  134.     LO_Color text_color;
  135.     LO_Color background_color;
  136.     LO_Color links_color;
  137.     LO_Color vlinks_color;
  138.  
  139.     /*
  140.      *  ----- Advanced -----
  141.      */
  142.  
  143.     /* enabler */
  144.  
  145.     XP_Bool autoload_images_p;
  146. #ifdef JAVA
  147.     XP_Bool enable_java;
  148. #endif
  149.     XP_Bool enable_javascript;
  150.     XP_Bool enable_style_sheet;
  151.     XP_Bool auto_install;
  152.     XP_Bool email_anonftp;
  153.     XP_Bool warn_accept_cookie;
  154.  
  155.     int accept_cookie;              /* 0:disable, 1:enable-nowarn, else:enable-warn */
  156.  
  157.     /*
  158.      *  ----- Advanced/Password -----
  159.      */
  160.  
  161.     XP_Bool use_password;         /* new for 4.0 */
  162.  
  163.     int     ask_password;
  164.     int     password_timeout;
  165.  
  166.     /*
  167.      *  ----- Advanced/Cache -----
  168.      */
  169.  
  170.     int     memory_cache_size;
  171.     int     disk_cache_size;
  172.     int     verify_documents;
  173.     char   *cache_dir;
  174.  
  175.     /*
  176.      *  ----- Advanced/Proxies -----
  177.      */
  178.  
  179.     int     proxy_mode;
  180.  
  181.     char   *proxy_url;
  182.  
  183.     char   *socks_host;
  184.     int    socks_host_port;
  185.  
  186.     char   *ftp_proxy;
  187.     int    ftp_proxy_port;
  188.     char   *http_proxy;
  189.     int    http_proxy_port;
  190.     char   *gopher_proxy;
  191.     int    gopher_proxy_port;
  192.     char   *wais_proxy;
  193.     int    wais_proxy_port;
  194. #ifndef NO_SECURITY
  195.     char   *https_proxy;
  196.     int    https_proxy_port;
  197. #endif
  198.     char   *no_proxy;
  199.  
  200.     /*
  201.      *  ----- Advanced/Disk Space -----
  202.      */
  203.  
  204.     XP_Bool pop3_msg_size_limit_p;
  205.     int     pop3_msg_size_limit;
  206.     XP_Bool msg_prompt_purge_threshold;
  207.     int     msg_purge_threshold;
  208.     int     news_keep_method;    /* new for 4.0
  209.                                   * KEEP_ALL_NEWS          0
  210.                                   * KEEP_NEWS_BY_AGE       1
  211.                                   * KEEP_NEWS_BY_COUNT     2
  212.                                   */
  213.        int     news_keep_days;
  214.     int     news_keep_count;
  215.     XP_Bool news_keep_only_unread;
  216.     XP_Bool news_remove_bodies_by_age;
  217.     int     news_remove_bodies_days;
  218.  
  219.     /*
  220.      *  ----- Advanced/Help Files -----
  221.      */
  222.  
  223.     char   *help_source_url;
  224.     int     help_source_site;     /*
  225.                                    * HELPFILE_SITE_NETSCAPE  0
  226.                                    * HELPFILE_SITE_INSTALLED 1
  227.                                    * HELPFILE_SITE_CUSTOM    2
  228.                                    */
  229.  
  230.     /*
  231.      *  ----- Browser -----
  232.      */
  233.  
  234.     char   *home_document;          /* "" means start blank; overloaded in 3.0 */
  235.  
  236.     int     browser_startup_page; /* new for 4.0 
  237.                                    * BROWSER_STARTUP_BLANK  0
  238.                                    * BROWSER_STARTUP_HOME   1
  239.                                    * BROWSER_STARTUP_LAST   2
  240.                                    */
  241.  
  242.     int     global_history_expiration;    /* days */
  243.  
  244.     XP_Bool show_toolbar_p;
  245.  
  246.     XP_Bool ssl2_enable;
  247.     XP_Bool ssl3_enable;
  248.  
  249.     /*
  250.      *  ----- Browser/Fonts -----
  251.      */
  252.  
  253.     int     use_doc_fonts;        /*
  254.                                    * DOC_FONTS_ALWAYS       0     
  255.                                    * DOC_FONTS_QUICK        1
  256.                                    * DOC_FONTS_NEVER        2
  257.                                    */
  258.  
  259.     XP_Bool enable_webfonts;      
  260.     /*
  261.      *  ----- Browser/Applications -----
  262.      */
  263.  
  264.     char   *global_mime_types_file;
  265.     char   *private_mime_types_file;
  266.     char   *global_mailcap_file;
  267.     char   *private_mailcap_file;
  268.     char   *tmp_dir;
  269.  
  270.     /*
  271.      *  ----- Mail & News -----
  272.      */
  273.  
  274.     char   *citation_color;
  275.     MSG_FONT citation_font;
  276.     XP_Bool fixed_message_font_p;
  277.     MSG_CITATION_SIZE citation_size;
  278.  
  279.     /* if these are true, then the default gesture (dbl click or selecting from
  280.      a menu) reuses existing windows, and the alternate gesture (alt-dbl click)
  281.      opens a new one.  If they are false, the gestures switch behavior.
  282.  
  283.      Note:  If the thing you're opening already is on the screen somewhere, that
  284.      window is brought to the front and is reused.  There is no way to turn off this
  285.      behavior. */
  286.  
  287.     XP_Bool reuse_thread_window;
  288.     XP_Bool reuse_msg_window;
  289.     XP_Bool msg_in_thread_window;
  290.  
  291.     /*
  292.      *  ----- Mail & News/Identity -----
  293.      */
  294.  
  295.     char   *real_name;
  296.     char   *email_address;
  297.     char   *organization;
  298.     char   *signature_file;
  299.     char   *reply_to_address;
  300.     XP_Bool attach_address_card;
  301.  
  302.     /*
  303.      *  ----- Mail & News/Messages -----
  304.      */
  305.  
  306.     XP_Bool qp_p;
  307.     XP_Bool file_attach_binary;
  308.     XP_Bool mailbccself_p;
  309.     XP_Bool newsbccself_p;
  310.     XP_Bool mailfcc_p;
  311.     XP_Bool newsfcc_p;
  312.     XP_Bool autoquote_reply;
  313.     XP_Bool send_html_msg;
  314.  
  315.     int     msg_wrap_length;
  316.     int     html_def_action;
  317.  
  318.     char   *mail_bcc;
  319.     char   *news_bcc;
  320.     char   *mail_fcc;
  321.     char   *news_fcc;
  322.  
  323.     /*
  324.      *  ----- Mail & News/Mail Server -----
  325.      */
  326.  
  327.     XP_Bool use_movemail_p;
  328.     XP_Bool builtin_movemail_p;
  329.     XP_Bool auto_check_mail;
  330.     XP_Bool pop3_leave_mail_on_server;
  331.     XP_Bool imap_local_copies;
  332.     XP_Bool imap_server_ssl;
  333.     XP_Bool imap_delete_is_move_to_trash;
  334.     XP_Bool rememberPswd;
  335.     XP_Bool support_skey;
  336.     XP_Bool use_ns_mapi_server;
  337.     XP_Bool expand_addr_nicknames_only;
  338.     XP_Bool enable_biff;          /* new for 4.0 */
  339.  
  340.     char   *mailhost;
  341.     char   *movemail_program;
  342.     char   *pop3_host;
  343.     char   *pop3_user_id;
  344.     char   *mail_directory;
  345.     char   *imap_mail_directory;
  346.     char   *imap_mail_local_directory;
  347.  
  348.     int     biff_interval;
  349.  
  350.     int     mail_server_type;    /* new for 4.0
  351.                                   *    MAIL_SERVER_POP3        0
  352.                                   * MAIL_SERVER_IMAP        1
  353.                                   * MAIL_SERVER_MOVEMAIL    2
  354.                                   * MAIL_SERVER_INBOX       3
  355.                                   */
  356.  
  357.     int     reply_on_top;
  358.     int     reply_with_extra_lines;
  359.  
  360.     /*
  361.      *  ----- Mail & News/News Server -----
  362.      */
  363.  
  364.     char   *newshost;
  365.     char   *newsrc_directory;
  366.  
  367.     XP_Bool news_notify_on;
  368.     XP_Bool news_server_secure;
  369.  
  370.     int     news_max_articles;
  371.     int     news_server_port;
  372.  
  373.     /*
  374.      *  ----- Mail & News/Directory -----
  375.      */
  376.  
  377.     XP_Bool addr_book_lastname_first;
  378.  
  379.     /*
  380.      *  ----- Editor -----
  381.      */
  382.  
  383.     XP_Bool  editor_character_toolbar;
  384.     XP_Bool  editor_paragraph_toolbar;
  385.  
  386.     char*    editor_author_name;
  387.     char*    editor_html_editor;
  388.     char*    editor_image_editor;
  389.     char*    editor_document_template;
  390.     int32    editor_autosave_period;
  391.   
  392.     XP_Bool  editor_custom_colors;
  393.     LO_Color editor_background_color;
  394.     LO_Color editor_normal_color;
  395.     LO_Color editor_link_color;
  396.     LO_Color editor_active_color;
  397.     LO_Color editor_followed_color;
  398.     char*    editor_background_image;
  399.  
  400.     XP_Bool  editor_maintain_links;
  401.     XP_Bool  editor_keep_images;
  402.     char*    editor_publish_location;
  403.     char*    editor_publish_username;
  404.     char*    editor_publish_password;
  405.     XP_Bool  editor_save_publish_password;
  406.     char*    editor_browse_location;
  407.  
  408.     XP_Bool  editor_copyright_hint;
  409.  
  410.     /* to to add publish stuff */
  411.  
  412.     /*
  413.      *  ----- Offline -----
  414.      */
  415.  
  416.     int      offline_startup_mode;       /*
  417.                                           * OFFLINE_STARTUP_ONLINE      0
  418.                                           * OFFLINE_STARTUP_OFFLINE     1
  419.                                           * OFFLINE_STARTUP_ASKME       2
  420.                                           */
  421.  
  422.     /*
  423.      *  ----- Offline/News -----
  424.      */
  425.  
  426.     XP_Bool  offline_news_download_unread;
  427.     XP_Bool  offline_news_download_by_date;
  428.     XP_Bool  offline_news_download_use_days;
  429.     int      offline_news_download_days;
  430.     int      offline_news_download_inc;   /* 
  431.                                            * OFFLINE_NEWS_DL_YESTERDAY   1
  432.                                            * OFFLINE_NEWS_DL_1_WK_AGO    2
  433.                                            * OFFLINE_NEWS_DL_2_WKS_AGO   3
  434.                                            * OFFLINE_NEWS_DL_1_MONTH_AGO 4
  435.                                            * OFFLINE_NEWS_DL_1_YEAR_AGO  5
  436.                                            */
  437.  
  438.     /*
  439.      *  ----- Miscellaneous -----
  440.      */
  441.  
  442.     /* OPTIONS MENU
  443.      */
  444.  
  445.     XP_Bool show_url_p;
  446.     XP_Bool show_directory_buttons_p;
  447.     XP_Bool show_menubar_p;
  448.     XP_Bool show_bottom_status_bar_p;
  449.     XP_Bool fancy_ftp_p;
  450. #ifndef NO_SECURITY
  451.     XP_Bool show_security_bar_p;
  452. #endif
  453.  
  454.     /* APPLICATIONS */
  455.     /* spider begin */
  456.     /* LID CACHE */
  457.  
  458.     char   *sar_cache_dir;
  459.     /* spider end */
  460.  
  461.     char   *tn3270_command;
  462.     char   *telnet_command;
  463.     char   *rlogin_command;
  464.     char   *rlogin_user_command;
  465.  
  466.     /* CACHE
  467.      */
  468.  
  469.     XP_Bool cache_ssl_p;
  470.  
  471.     /* COLORS
  472.      */
  473.  
  474.     /* COMPOSITION
  475.      */
  476.     XP_Bool queue_for_later_p;
  477.  
  478.     /* DIRECTORIES
  479.      */
  480.  
  481.     char *bookmark_file;
  482.  
  483.     /*####*/  char *history_file;
  484.  
  485.     /* FONTS
  486.      */
  487.  
  488.     /* DEFAULT MIME CSID - used if unspecified in HTTP header */
  489.     int doc_csid;
  490.     char* font_charset;
  491.     char* font_spec_list; /* list of comma separated fonts */
  492.  
  493.     /* PREFERED LANGUAGES/REGIONS
  494.      */
  495.  
  496.     char *lang_regions;
  497.  
  498.     /*
  499.      * This will break on machines where int is 2 bytes.
  500.      * I did this in order to make reading preferences easier.
  501.      */
  502.  
  503.     int signature_date;
  504.  
  505.     /* IMAGES
  506.      */
  507.  
  508.     char *dither_images;
  509.     XP_Bool streaming_images;
  510.  
  511.     /* MAIL
  512.      */
  513.  
  514.     char* mail_folder_columns;
  515.     char* mail_message_columns;
  516.     char* mail_sash_geometry;
  517.     XP_Bool movemail_warn;
  518.  
  519.     /* NETWORK
  520.      */
  521.  
  522.     int max_connections;
  523.     int network_buffer_size;
  524.  
  525.     /* PROTOCOLS
  526.      */
  527.  
  528.     XP_Bool email_submit;
  529.     
  530.     /* NEWS
  531.      */
  532.  
  533.     XP_Bool news_cache_xover;
  534.     XP_Bool show_first_unread_p;
  535.     char    *news_folder_columns;
  536.     char    *news_message_columns;
  537.     char    *news_sash_geometry;
  538.  
  539.     /* SECURITY
  540.      */
  541.  
  542.     XP_Bool enter_warn;
  543.     XP_Bool leave_warn;
  544.     XP_Bool mixed_warn;
  545.     XP_Bool submit_warn;
  546.     char *cipher;
  547.     char *def_user_cert;
  548.  
  549. #ifdef FORTEZZA
  550.     int fortezza_toggle;
  551.     int fortezza_timeout;
  552. #endif
  553.  
  554.     /* STYLES 1
  555.      */
  556.     XP_Bool toolbar_tips_p;
  557.  
  558.  
  559.     /* STYLES 2
  560.      */
  561.  
  562.     /* Mail and News Organization
  563.      */
  564.  
  565.     /*XXX*/  XP_Bool emptyTrash;
  566.     char *pop3_password;
  567.     XP_Bool mail_thread_p;
  568.     XP_Bool news_thread_p;
  569.  
  570. #define FE_PANES_NORMAL     0
  571. #define FE_PANES_STACKED    1
  572. #define FE_PANES_HORIZONTAL 2
  573.  
  574.     int mail_pane_style;
  575.     int news_pane_style;
  576.  
  577.     int mail_sort_style;
  578.     int news_sort_style;
  579.  
  580.     /* BOOKMARK
  581.      */
  582.  
  583.     XP_Bool has_toolbar_folder;
  584.     char *personal_toolbar_folder;
  585.  
  586.     /* PRINT
  587.      */
  588.  
  589.     char *print_command;
  590.     XP_Bool print_reversed;
  591.     XP_Bool print_color;
  592.     XP_Bool print_landscape;
  593.     int print_paper_size;
  594.  
  595.     /* Lawyer nonsense */
  596.     char *license_accepted;
  597.  
  598.     /* USER HISTORY */
  599.     char *user_history_file;
  600.  
  601.  
  602.     /* Task Bar */
  603.     XP_Bool        task_bar_floating;
  604.     XP_Bool        task_bar_horizontal;
  605.     XP_Bool        task_bar_ontop;
  606.     int            task_bar_x;
  607.     int            task_bar_y;
  608.  
  609.     /* Toolbars */
  610.     int32        browser_navigation_toolbar_position;
  611.     XP_Bool        browser_navigation_toolbar_showing;
  612.     XP_Bool        browser_navigation_toolbar_open;
  613.  
  614.     int32        browser_location_toolbar_position;
  615.     XP_Bool        browser_location_toolbar_showing;
  616.     XP_Bool        browser_location_toolbar_open;
  617.  
  618.     int32        browser_personal_toolbar_position;
  619.     XP_Bool        browser_personal_toolbar_showing;
  620.     XP_Bool        browser_personal_toolbar_open;
  621.  
  622.     int32        messenger_navigation_toolbar_position;
  623.     XP_Bool        messenger_navigation_toolbar_showing;
  624.     XP_Bool        messenger_navigation_toolbar_open;
  625.  
  626.     int32        messenger_location_toolbar_position;
  627.     XP_Bool        messenger_location_toolbar_showing;
  628.     XP_Bool        messenger_location_toolbar_open;
  629.  
  630.     int32        messages_navigation_toolbar_position;
  631.     XP_Bool        messages_navigation_toolbar_showing;
  632.     XP_Bool        messages_navigation_toolbar_open;
  633.  
  634.     int32        messages_location_toolbar_position;
  635.     XP_Bool        messages_location_toolbar_showing;
  636.     XP_Bool        messages_location_toolbar_open;
  637.  
  638.     int32        folders_navigation_toolbar_position;
  639.     XP_Bool        folders_navigation_toolbar_showing;
  640.     XP_Bool        folders_navigation_toolbar_open;
  641.  
  642.     int32        folders_location_toolbar_position;
  643.     XP_Bool        folders_location_toolbar_showing;
  644.     XP_Bool        folders_location_toolbar_open;
  645.  
  646.     int32        address_book_address_book_toolbar_position;
  647.     XP_Bool        address_book_address_book_toolbar_showing;
  648.     XP_Bool        address_book_address_book_toolbar_open;
  649.  
  650.     int32        compose_message_message_toolbar_position;
  651.     XP_Bool        compose_message_message_toolbar_showing;
  652.     XP_Bool        compose_message_message_toolbar_open;
  653.  
  654.     int32        composer_composition_toolbar_position;
  655.     XP_Bool        composer_composition_toolbar_showing;
  656.     XP_Bool        composer_composition_toolbar_open;
  657.  
  658.     int32        composer_formatting_toolbar_position;
  659.     XP_Bool        composer_formatting_toolbar_showing;
  660.     XP_Bool        composer_formatting_toolbar_open;
  661.  
  662.     int32        browser_win_width;
  663.     int32        browser_win_height;
  664.  
  665.     int32        mail_compose_win_width;
  666.     int32        mail_compose_win_height;
  667.  
  668.     int32        editor_win_width;
  669.     int32        editor_win_height;
  670.  
  671.     int32        mail_folder_win_width;
  672.     int32        mail_folder_win_height;
  673.  
  674.     int32        mail_msg_win_width;
  675.     int32        mail_msg_win_height;
  676.  
  677.     int32        mail_thread_win_width;
  678.     int32        mail_thread_win_height;
  679.  
  680. } XFE_GlobalPrefs;
  681.  
  682.  
  683. #define xfe_PREFS_ALL        -1
  684.  
  685. /* General */
  686. #define xfe_GENERAL_OFFSET    0
  687. #define xfe_GENERAL(which) (which-xfe_GENERAL_OFFSET)
  688.  
  689. #define xfe_PREFS_STYLES    0
  690. #define xfe_PREFS_FONTS        1
  691. #define xfe_PREFS_APPS        2
  692. #define xfe_PREFS_HELPERS    3
  693. #define xfe_PREFS_IMAGES    4
  694. #define xfe_PREFS_LANG_REGIONS    5
  695.  
  696. /* Mail/News */
  697. #define xfe_MAILNEWS_OFFSET    10
  698. #define xfe_MAILNEWS(which) (which-xfe_MAILNEWS_OFFSET)
  699.  
  700. #define xfe_PREFS_APPEARANCE    10
  701. #define xfe_PREFS_COMPOSITION    11
  702. #define xfe_PREFS_SERVERS    12
  703. #define xfe_PREFS_IDENTITY    13
  704. #define xfe_PREFS_ORGANIZATION    14
  705.  
  706. /* Network */
  707. #define xfe_NETWORK_OFFSET    20
  708. #define xfe_NETWORK(which) (which-xfe_NETWORK_OFFSET)
  709.  
  710. #define xfe_PREFS_CACHE        20
  711. #define xfe_PREFS_NETWORK    21
  712. #define xfe_PREFS_PROXIES    22
  713. #define xfe_PREFS_PROTOCOLS    23
  714. #define xfe_PREFS_LANG        24
  715.  
  716. /* Security */
  717. #define xfe_SECURITY_OFFSET    30
  718. #define xfe_SECURITY(which) (which-xfe_SECURITY_OFFSET)
  719.  
  720. #define xfe_PREFS_SEC_GENERAL    30
  721. #define xfe_PREFS_SEC_PASSWORDS    31
  722. #define xfe_PREFS_SEC_PERSONAL    32
  723. #define xfe_PREFS_SEC_SITE    33
  724. /* Editor Text item from the Properties pulldown menu 26FEB96RCJ */
  725. #define xfe_PROPERTY_CHARACTER    34    /* added 26FEB96RCJ */
  726. #define xfe_PROPERTY_LINK    35    /* added 26FEB96RCJ */
  727. #define xfe_PROPERTY_PARAGRAPH    36    /* added 26FEB96RCJ */
  728.  
  729. /*
  730. #define xfe_PREFS_OPTIONS
  731. #define xfe_PREFS_PRINT    
  732. */
  733.  
  734. XP_BEGIN_PROTOS
  735.  
  736. /* Fills in the default preferences */
  737. extern void XFE_DefaultPrefs(XFE_GlobalPrefs *prefs);
  738.  
  739. /* reads in the global preferences.
  740.  *
  741.  * returns True on success and FALSE
  742.  * on failure (unable to open prefs file)
  743.  *
  744.  * the prefs structure must be zero'd at creation since
  745.  * this function will free any existing char pointers
  746.  * passed in and will malloc new ones.
  747.  */
  748. extern Bool XFE_ReadPrefs(char * filename, XFE_GlobalPrefs *prefs);
  749.  
  750. /* saves out the global preferences.
  751.  *
  752.  * returns True on success and FALSE
  753.  * on failure (unable to open prefs file)
  754.  */
  755. extern Bool XFE_SavePrefs(char * filename, XFE_GlobalPrefs *prefs);
  756. extern Bool fe_CheckVersionAndSavePrefs(char * filename, XFE_GlobalPrefs *prefs);
  757.  
  758. /* Upgrades the preferences to the Javascript file. */
  759. extern Bool XFE_UpgradePrefs(char* filename, XFE_GlobalPrefs* prefs);
  760.  
  761. extern void fe_upgrade_prefs(XFE_GlobalPrefs* prefs);
  762. extern void fe_check_prefs_version(XFE_GlobalPrefs* prefs);
  763.  
  764. /* Set the sorting behavior on the given mail/news context. */
  765. extern void fe_SetMailNewsSortBehavior(MWContext* context, XP_Bool thread,
  766.                        int sortcode);
  767.  
  768. /* Register a callback with libpref so that fe_globalPrefs will stay in sync */
  769. extern void FE_register_pref_callbacks(void);
  770.  
  771. XP_END_PROTOS
  772.  
  773. #endif /* _PREFS_H_ */
  774.