home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / mozilla.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  20.8 KB  |  636 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. // mozilla.h : main header file for the NETSCAPE application
  20. //
  21.  
  22. #ifndef _NETSCAPE_H
  23. #define _NETSCAPE_H
  24.  
  25. #ifdef MOZ_MAIL_NEWS  // Is this the right ifdef to use
  26. #include "csttlbr2.h"
  27. #endif /* MOZ_MAIL_NEWS */
  28.  
  29. #ifdef MOZ_TASKBAR
  30. #include "taskbar.h"
  31. #endif /* MOZ_TASKBAR */
  32.  
  33. // This may have to be enabled
  34. #if 0
  35. #include "widgetry.h"
  36. #endif 
  37.  
  38.  
  39. #include "splash.h"
  40. #include "intlwin.h"
  41. #include "woohoo.h"
  42. #include "nsfont.h"
  43. #include "postal.h" 
  44. #include "libmime.h"
  45. #include "rdf.h"
  46. #include "rdfacc.h"
  47.  
  48. #include "ownedlst.h"
  49. #ifdef XP_WIN32
  50. #include "mmsystem.h"
  51. #endif
  52.  
  53. extern int winfeInProcessNet;
  54.  
  55. // navigator startup states
  56. #define STARTUP_BROWSER     0x1
  57. #define STARTUP_MAIL        0x2
  58. #define STARTUP_NEWS        0x4
  59. #define STARTUP_EDITOR      0x8
  60.  
  61. #define STARTUP_MAIL_NEWS                 (STARTUP_MAIL | STARTUP_NEWS)
  62. #define STARTUP_MAIL_BROWSER          (STARTUP_MAIL | STARTUP_BROWSER)
  63. #define STARTUP_NEWS_BROWSER          (STARTUP_NEWS | STARTUP_BROWSER)
  64. #define STARTUP_MAIL_NEWS_BROWSER     (STARTUP_MAIL | STARTUP_NEWS | STARTUP_BROWSER)
  65. #define STARTUP_MAIL_EDITOR                   (STARTUP_MAIL | STARTUP_EDITOR)
  66. #define STARTUP_NEWS_EDITOR                   (STARTUP_NEWS | STARTUP_EDITOR)
  67. #define STARTUP_BROWSER_EDITOR            (STARTUP_BROWSER | STARTUP_EDITOR)
  68. #define STARTUP_MAIL_NEWS_EDITOR      (STARTUP_MAIL | STARTUP_NEWS | STARTUP_EDITOR)
  69. #define STARTUP_MAIL_BROWSER_EDITOR   (STARTUP_MAIL | STARTUP_BROWSER | STARTUP_EDITOR)
  70. #define STARTUP_NEWS_BROWSER_EDITOR   (STARTUP_NEWS | STARTUP_BROWSER | STARTUP_EDITOR)
  71. #define STARTUP_MAIL_NEWS_BROWSER_EDITOR     (STARTUP_MAIL | STARTUP_NEWS | STARTUP_BROWSER | STARTUP_EDITOR)
  72. // component launch states
  73. #define STARTUP_INBOX           0x10
  74. #define STARTUP_FOLDER          0x20    
  75. #define STARTUP_CLIENT_MAPI      0x30  // rhp - DOES THIS WORK - will it break other startups???
  76. #define STARTUP_FOLDERS         0x40
  77. #define STARTUP_ADDRESS         0x80
  78. #define STARTUP_COMPOSE         0x100
  79. #define STARTUP_IMPORT          0x200
  80. #define STARTUP_EXPORT          0x300
  81. #define STARTUP_NETCASTER       0x400
  82. #define STARTUP_ACCOUNT_SETUP   0x800
  83. #define STARTUP_JAVA_DEBUG_AGENT 0x1000
  84. #define STARTUP_JAVA            0x1200
  85. #define STARTUP_CALENDAR        0x4000
  86. #define STARTUP_CONFERENCE      0x8000
  87. #define STARTUP_NETHELP         0x2000
  88.  
  89. // max list of things in the menu
  90. #define MAX_HISTORY_ITEMS   (LAST_HISTORY_MENU_ID-FIRST_HISTORY_MENU_ID)
  91. #define MAX_SECURITY_CHECKS 12
  92. #define MAX_BOOKMARK_ITEMS  (LAST_BOOKMARK_MENU_ID-FIRST_BOOKMARK_MENU_ID)
  93. #define MAX_FILE_BOOKMARK_ITEMS (LAST_FILE_BOOKMARK_MENU_ID-FIRST_FILE_BOOKMARK_MENU_ID)
  94.  
  95. #define MAX_INTERNAL_OLEFORMAT 4
  96.  
  97. #define FIRST_SHORTCUT_ID               (IDC_SHORTCUT_BASE)   // 1800
  98. #define LAST_SHORTCUT_ID                (FIRST_SHORTCUT_ID + 50)
  99. #define FIRST_PLACES_MENU_ID    (IDC_FIRST_PLACES_MENU_ID)
  100. #define LAST_PLACES_MENU_ID             (FIRST_PLACES_MENU_ID + 50)
  101. #define FIRST_HELP_MENU_ID              (IDC_FIRST_HELP_MENU_ID)
  102. #define LAST_HELP_MENU_ID               (FIRST_HELP_MENU_ID + 50)
  103.  
  104. #define IS_BOOKMARK_ID(nCmdId)\
  105.     ((nCmdId) >= FIRST_BOOKMARK_MENU_ID && (nCmdId) <= LAST_BOOKMARK_MENU_ID)
  106.  
  107. #define IS_HISTORY_ID(nCmdId)\
  108.     ((nCmdId) >= FIRST_HISTORY_MENU_ID && (nCmdId) <= LAST_HISTORY_MENU_ID)
  109.  
  110. #define IS_FILE_BOOKMARK_ID(nCmdId)\
  111.     ((nCmdId) >= FIRST_FILE_BOOKMARK_MENU_ID && (nCmdId) <= LAST_FILE_BOOKMARK_MENU_ID)
  112.  
  113. #define IS_SHORTCUT_ID(nCmdId) \
  114.     ((nCmdId) >= FIRST_SHORTCUT_ID && (nCmdId) <= LAST_SHORTCUT_ID)
  115.  
  116. #define IS_PLACESMENU_ID(nCmdId) \
  117.     ((nCmdId) >= FIRST_PLACES_MENU_ID && (nCmdId) <= LAST_PLACES_MENU_ID)
  118.  
  119. #define IS_HELPMENU_ID(nCmdId) \
  120.     ((nCmdId) >= FIRST_HELP_MENU_ID && (nCmdId) <= LAST_HELP_MENU_ID)
  121.  
  122. // A FE specific structure to store info we need about images
  123.  
  124. #ifdef LAYERS
  125. // Event data for compositor-based event dispatch
  126. // Is this the right place for this??
  127. typedef struct _fe_EventStruct {
  128.     UINT uFlags;
  129.     UINT nChar;
  130.     int32 x, y;
  131.     BOOL pbReturnImmediately;
  132.     LO_Element *pElement;    
  133.     uint32 fe_modifiers;
  134. } fe_EventStruct;
  135.  
  136. #endif /* LAYERS */
  137.  
  138. #define IMAGE_ICON_SIZE         32
  139. #define NEWS_X_SIZE                 88
  140. #define NEWS_Y_SIZE         36
  141. #define GOPHER_ICON_SIZE    20
  142.  
  143.  
  144. // How to handle an external application
  145. #define HANDLE_VIA_NETSCAPE  50
  146. #define HANDLE_UNKNOWN      100
  147. #define HANDLE_EXTERNAL     200
  148. #define HANDLE_SAVE                 300
  149. #define HANDLE_VIA_PLUGIN   400
  150. #define HANDLE_MOREINFO     500
  151. #define HANDLE_SHELLEXECUTE 600
  152. #define HANDLE_BY_OLE           700
  153.  
  154. #define TB_PICTURESANDTEXT 0
  155. #define TB_PICTURES 1
  156. #define TB_TEXT 2
  157.  
  158. // Limits the number of publish and template history URLs to save in preferences
  159. #define MAX_PUBLISH_LOCATIONS  20
  160. #define MAX_TEMPLATE_LOCATIONS 20
  161.  
  162. // This flag allows differences between Gold and Non-gold 
  163. //   behavior in code common to both (e.g., SiteManager interaction)
  164. extern BOOL bIsGold;
  165.  
  166. #ifdef XP_WIN32
  167. // System for communication between Navigator/Editor and Site Manager
  168. #include "talk.h"
  169. #ifdef EDITOR
  170. extern ITalkSMClient * pITalkSMClient;
  171. #endif /* EDITOR */
  172. // This should be set ONLY if pITalkSMClient is not null
  173. extern BOOL bSiteMgrIsRegistered;
  174. // This is set if we find an existing window on startup
  175. //   or we invoke site manager from menu
  176. extern BOOL bSiteMgrIsActive;
  177.  
  178. // Message ID to find out if SiteManager is active,
  179. //   or for it to tell us it has been activated or is closing down
  180. extern "C" UINT WM_SITE_MANAGER;
  181. #endif
  182.  
  183. // These are obtained by RegisterWindowMessage() when app starts
  184. // Used to detect 1st instance and start Editor or Navigator
  185. //   when 2nd instance is attempted
  186. extern "C" UINT WM_NG_IS_ACTIVE;
  187. extern "C" UINT WM_OPEN_EDITOR;
  188. extern "C" UINT WM_OPEN_NAVIGATOR;
  189.  
  190. extern char szNGMemoryMapFilename[];
  191.  
  192. //
  193. // Function pointers for keeping track of the MAPI DLL if we have
  194. //   loaded it.  
  195. //
  196. typedef BOOL (WINAPI* REGISTERMAIL)(HWND, const char *);
  197. typedef BOOL (WINAPI* OPENMAIL)(const char *, const char *);
  198. typedef BOOL (WINAPI* COMPOSEMAIL)(const char *, const char *,
  199.     const char *, const char *, const char *, const char *, const char *, const char*); 
  200. typedef BOOL (WINAPI* UNREGISTERMAIL)(void);
  201. typedef BOOL (WINAPI* SHOWMAILBOX)(void); 
  202. typedef BOOL (WINAPI* SHOWMESSAGECENTER)(void); 
  203. typedef BOOL (WINAPI* CLOSEMAIL)(void); 
  204. typedef BOOL (WINAPI* GETMENUITEMSTRING)(ALTMAIL_MENU_ID, char *, int);
  205.  
  206. // msgcom.h types
  207. //
  208. class MSG_Prefs;
  209.  
  210. // AddressBook types
  211. //
  212. class ABook;
  213. class CCmdParse;
  214.  
  215. /////////////////////////////////////////////////////////////////////////////
  216. // CNetscapeApp:
  217. // See mozilla.cpp for the implementation of this class
  218. //
  219.  
  220. // this is for us to take care for font caching.
  221. struct NsWinFont 
  222. {
  223.    LOGFONT logFontStruct;
  224.    HFONT   hFont;
  225.    short   refCount;
  226. };
  227.  
  228. class CNetscapeApp : public CWinApp
  229. {
  230.  //  Wether or not we allow UNC file names.
  231.  public:
  232.      BOOL m_bUNC;
  233.  
  234. //  Wether or not we're in init instance, and the cached value of m_nCmdShow.
  235. public:
  236.     BOOL m_bInInitInstance;
  237.     BOOL m_bInGetCriticalFiles;
  238.     int m_iFrameCmdShow;
  239.  
  240. //      OLE Server template.
  241. public:
  242.     COleTemplateServer m_OleTemplateServer;
  243. //  Shell extension registrations.
  244. private:
  245.     void EnableShellStuff();
  246.     
  247. public:
  248.     CNetscapeApp();
  249.     int ExitInstance();
  250.     BOOL m_bExit;
  251.     BOOL m_bExitStatus;
  252.     CNetscapeDocTemplate  *m_ViewTmplate;
  253. #ifdef EDITOR
  254.     // We now create the EditTemplate class
  255.     //  even in non-editors, but we do NOT
  256.     //  allocate menu and accelerators
  257.     //  if we are not an editor
  258.     CNetscapeEditTemplate *m_EditTmplate;
  259.  
  260.     CNetscapeComposeTemplate *m_ComposeTemplate;
  261.     CNetscapeTextComposeTemplate *m_TextComposeTemplate;
  262.     CNetscapeAddrTemplate *m_AddrTemplate;
  263. #endif // EDITOR
  264.  
  265.     CWnd * m_pUpdateWhatsNewWnd;
  266.     MWContext * m_pBmContext;
  267. #ifdef MOZ_MAIL_NEWS
  268.     MWContext * m_pAddressContext;
  269. #endif
  270.     CStubsCX *m_pSlaveCX;
  271.     CRDFCX *m_pRDFCX;
  272.     HANDLE hAccelTable;
  273.     DWORD m_dwSplashTime;
  274.     BOOL m_bDontLoadHome;
  275.     HWND m_ParentAppWindow;
  276.     BOOL m_bChildWindow;
  277.  
  278.     //  Our very own run/pump/idle implementation.
  279. public:
  280.     int Run();
  281.     BOOL NSPumpMessage();
  282. #ifdef MOZ_LOC_INDEP
  283.     /* location independence exit code */
  284.     BOOL LIStuffEnd();
  285. #endif /* MOZ_LOC_INDEP */
  286.     BOOL IsIdleMessage(MSG *pMsg);
  287.     BOOL OnIdle(LONG lIdleCount);
  288. #ifdef XP_WIN16
  289.     CPoint m_ptCursorLast;      // last mouse position
  290.     UINT m_nMsgLast;            // last mouse message
  291. #endif
  292.  
  293.  
  294.     CString NSToolBarClass;
  295.     //  Trusted application spawn list.
  296.     CSpawnList *m_pSpawn;
  297.  
  298.     // List of owned and lost file types (for the default browser check)
  299.     COwnedAndLostList m_OwnedAndLostList;
  300.  
  301.     //      The hidden frame.
  302.     CHiddenFrame *m_pHiddenFrame;
  303.  
  304.     //      The list of top level frames.
  305.     CGenericFrame   *m_pFrameList;
  306. #ifdef MOZ_MAIL_NEWS
  307.     CAddrFrame          *m_pAddressWindow;
  308.     ABook               *m_pABook;
  309.     XP_List             *m_directories;
  310. #endif /* MOZ_MAIL_NEWS */
  311.  
  312. public:
  313.     time_t GetTime()    {
  314.     DWORD dwElapsedTicks = m_dwMsgTick - m_dwStartTick;
  315.     DWORD dwElapsedSeconds = dwElapsedTicks / 1000;
  316.     return(m_ttStartTime + dwElapsedSeconds);
  317.     }
  318.     void InitTime();
  319.     DWORD GetMessageTime()  {
  320.     return(m_dwLastMsgTick);
  321.     }
  322.     
  323.     HFONT CreateAppFont(LOGFONT& logFont);
  324.     void ReleaseAppFont(HFONT logFont);
  325.  
  326. //------------
  327. //    Dave H. - The following functions are for NavCenter.
  328.     CNSNavFrame* CreateNewNavCenter(CNSGenFrame* pParentFrame=NULL, BOOL useViewType = FALSE, HT_ViewType viewType = HT_VIEW_BOOKMARK);
  329. //--- End Nav Center.
  330.  
  331. private:
  332.     time_t m_ttStartTime;
  333.     DWORD m_dwStartTick;
  334.     DWORD m_dwMsgTick;
  335.     DWORD m_dwLastMsgTick;
  336.     XP_List* m_appFontList;
  337.  
  338. #if defined( _DEBUG) && defined( XP_WIN32 )
  339.     // Debug Trace window
  340.     PROCESS_INFORMATION     m_pi;
  341.     int InitConsoleWindow(void);
  342. #endif
  343.  
  344. private:
  345. #ifdef MOZ_TASKBAR
  346.     CTaskBarMgr m_TaskBarMgr;
  347. #endif /* MOZ_TASKBAR */
  348.     
  349. #ifdef XP_WIN16
  350.     enum HELP_IDLE_TYPE{SENT_MESSAGE=1,NOT_SENT=2};
  351.     HELP_IDLE_TYPE m_helpstate;
  352. #endif
  353.  
  354. public:
  355. #ifdef MOZ_TASKBAR
  356.     CTaskBarMgr & GetTaskBarMgr()
  357.     {
  358.         return(m_TaskBarMgr);
  359.     }
  360. #endif /* MOZ_TASKBAR */
  361.     
  362.     //  Explicitly use idle binding to timeout code if no timers available.
  363.     BOOL m_bIdleProcessTimeouts;
  364.  
  365.     //  Are we the default browser (as opposed to the others trouncing all over our
  366.     //      registry entries)?
  367.     void MakeDefaultBrowser();
  368.     void CheckDefaultBrowser();
  369.  
  370.  
  371.     ////////////////////////////////////////////////////////
  372.     // Cache two memory CDCs for faster drawing
  373.     CDC * pIconDC;     // drawing stuff NOT in main view
  374.     CDC * pImageDC;    // drawing stuff in the main view area
  375.  
  376.     // override INI functions so that we goto the Registry in Win32
  377.     UINT    GetProfileInt(LPCTSTR lpszSection, LPCTSTR lpszEntry, int nDefault);
  378.     CString GetProfileString(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault = NULL);
  379.     BOOL    WriteProfileInt(LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue);
  380.     BOOL    WriteProfileString(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue);
  381.     CString m_pSARCacheDir;                 /* larubbio */
  382.     DWORD   GetPrivateProfileString(LPCSTR lpSectionName, LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName);
  383.  
  384.     ///////////////////////////////////////////////////////////////////////
  385.     // Does this binary use a locked preference file?
  386.     BOOL    m_bUseLockedPrefs;
  387.     CString m_csLockedPrefs;
  388.  
  389.     ///////////////////////////////////////////////////////////////////////
  390.     // MAPI function pointers and state information
  391.     HINSTANCE       m_hPostalLib;
  392.     OPENMAIL        m_fnOpenMailSession;
  393.     COMPOSEMAIL     m_fnComposeMailMessage;
  394.     UNREGISTERMAIL  m_fnUnRegisterMailClient;
  395.     SHOWMAILBOX       m_fnShowMailBox; 
  396.     SHOWMESSAGECENTER m_fnShowMessageCenter; 
  397.     CLOSEMAIL         m_fnCloseMailSession; 
  398.     GETMENUITEMSTRING m_fnGetMenuItemString; 
  399.     BOOL              m_bInitMapi;
  400.  
  401.     ///////////////////////////////////////////////////////////////////////
  402.     // The main User Directory pointer
  403.     CString m_UserDirectory;
  404.  
  405.     int     m_iTemplateLocationCount;
  406.  
  407.     ///////////////////////////////////////////////////////////////////////
  408.     // Application level preferences
  409.     CString m_pCacheDir;
  410.     char * m_pTempDir;
  411.  
  412.     CString m_pTelnet;
  413.     CString m_pTn3270;
  414.     CString m_pHTML;
  415.  
  416.     // bookmark file location
  417.     CString m_pBookmarkFile;
  418.  
  419.     // Appearance of toolbars/component bars
  420.     int m_pToolbarStyle;
  421.  
  422.     // preference type stuff
  423.     int    m_nConfig;
  424.     int    m_iNumTypesInINIFile;
  425.     CString m_pHomePage;
  426.     int             m_iCSID;        // Default encoding
  427.  
  428.     // Should telnet urls be parsed into host/port?
  429.     BOOL m_bParseTelnetURLs;
  430.  
  431.     // dialup stuff
  432.     BOOL m_bKioskMode;
  433.     BOOL m_bSuperKioskMode;
  434.     BOOL m_bNetworkProfile;
  435. #ifdef MOZ_MAIL_NEWS
  436.     BOOL m_bCreateNews;
  437.     BOOL m_bCreateMail;
  438. #endif /* MOZ_MAIL_NEWS */
  439.     BOOL m_bCreateNetcaster;
  440. #ifdef EDITOR
  441.     // "-EDIT" or "/EDIT" on command line causes us to start editor
  442.     BOOL m_bCmdEdit;
  443. #endif // EDITOR
  444. #ifdef MOZ_MAIL_NEWS
  445.     //component launch flags
  446.     BOOL m_bCreateInbox;    //causes the inbox to be started
  447.   BOOL m_bCreateInboxMAPI;   // start inbox minimized!
  448.     BOOL m_bCreateFolders;  //causes the folders frame window to be started
  449.     BOOL m_bCreateFolder;   //causes a particular folder in the folders frame window to open
  450.     BOOL m_bCreateCompose;  //causes the compose window to be opened, 3 different possibilities
  451. #endif /* MOZ_MAIL_NEWS */
  452. #ifdef EDITOR
  453.     BOOL m_bCreateEdit;             //brings up the edit window
  454. #endif // EDITOR
  455. #ifdef MOZ_MAIL_NEWS
  456.     BOOL m_bCreateAddress;  //openes the address book window
  457. #endif // MOZ_MAIL_NEWS
  458.     BOOL m_bCreateLDIF_IMPORT; //imports an LDIF file
  459.     BOOL m_bCreateLDIF_EXPORT; //exports an LDIF file
  460.     BOOL m_bCreateBrowser;  //forces the browser to be launch despite preferences settings
  461.     BOOL m_bCreateJavaDebugAgent;    //causes the java debug agent to be started
  462.     BOOL m_bHasArguments;   //tells us if we have more work to do with the command line
  463.                             //if after removing any preceding switch, there are still parameters
  464.                             //on the command line this var is set to TRUE
  465.     BOOL m_bAlwaysDockTaskBar;  //tells us to dock the taskbar regardless of preferences
  466.  
  467.     // "-new_profile" on command line causes us to create a new profile
  468.     BOOL m_bCreateNewProfile;
  469.     // "-profile_manager" on command line causes us to launch profile manager
  470.     BOOL m_bProfileManager;
  471.  
  472.     // security checks      
  473.     Bool   m_nSecurityCheck[MAX_SECURITY_CHECKS];
  474.  
  475.     // Use unicode font on NT ?
  476.     BOOL    m_bUseUnicodeFont;
  477.     BOOL    m_bUseVirtualFont;
  478.  
  479.     // Should the browser window show the Netscape Button
  480.     BOOL    m_bShowNetscapeButton;
  481.     // End of preferences
  482.     ///////////////////////////////////////////////////////////////////////////
  483.     
  484.     char        * m_CmdLineLoadURL;
  485.     char            * m_CmdLineProfile;
  486.     CWnd        * m_pBookmarks;
  487. #ifdef MOZ_MAIL_NEWS
  488.     CWnd        * m_pAddressBook;
  489. #endif /* MOZ_MAIL_NEWS */
  490.     CSplashWnd  m_splash;  
  491.  
  492.      MWContext    * m_pNetcasterWindow;        
  493.  
  494.     
  495. #ifdef FORTEZZA
  496.     CBitmap  * m_pFortezzaSecureBmp;
  497. #endif
  498.  
  499.     CMapStringToObNoCase  m_HelperListByType;
  500.  
  501.     // Message ID for the Event notifications sent by NSPR
  502.     UINT m_msgNSPREventNotify;
  503.  
  504.     // parameters of the last find operation so that Find Again will work correctly
  505.     // These should probably be stuck in a struct or something for encapsulation
  506.     CString m_csFindString;
  507.     CString m_csReplaceString;
  508.     CString m_strStubFile;//used for launching compose from command line with only an attachment given.
  509.     BOOL    m_bMatchCase;
  510.     BOOL    m_bSearchDown;
  511.  
  512.     CIntlFont *m_pIntlFont;
  513.     HINSTANCE m_hResInst;  // Instance handle for resource dll
  514.  
  515. // Overrides
  516.     virtual BOOL InitApplication();
  517.     virtual BOOL InitInstance();
  518.     virtual BOOL OnDDECommand(char *pszCommand);
  519.     int MessageBox(HWND hWnd, LPCSTR lpszText,
  520.                LPCSTR lpszCaption = NULL,
  521.                UINT nType = MB_OK);
  522.  
  523. // Implementation
  524.     BOOL m_bEmbedded;       //      Wether or not running embedded
  525.     BOOL m_bAutomated;      //      Wether or not running automated
  526.  
  527.     int m_iCmdLnX;      //      X position on the command line.
  528.     int m_iCmdLnCX;
  529.     int m_iCmdLnY;  //      Y position on the command line.
  530.     int m_iCmdLnCY;
  531.  
  532.     // OEM stuff                     
  533.     int m_nChangeHomePage;  // some OEMs want user to be unable to change homepage
  534.     int m_nNetscapeInToolbar;  // draw a little N in the toolbar for OEM people 
  535.     // end of OEM stuff
  536.     //component launch stuff  A.J.
  537.     BOOL ParseComponentArguments(char *pszCommandLine, BOOL bRemove);
  538.     BOOL ExistComponentArguments(char *pszCommandLine);
  539.     void LaunchComponentWindow(int iStartupMode, char *pszCmdLine);
  540.     void SetStartupMode(int *iStartupMode);
  541.     void BuildStubFile();//Sets the m_strStubFile member
  542.     CString BuildDDEFile();//Returns a CString type to a random file name
  543.  
  544.  
  545. #ifdef MOZ_MAIL_NEWS
  546.     BOOL LaunchComposeAndAttach(CStringList &rlstrArgumentList);
  547.     MSG_AttachmentData * BuildAttachmentListFromFile(char *pszAttachFile);
  548. #endif /* MOZ_MAIL_NEWS */
  549.     BOOL BuildCmdLineList(const char* pszRemoveString,CCmdParse &cmdParse, CStringList &rlstrList, char* pszCmdLine);
  550.     BOOL ImportExportLDIF(ABook *pBook, char *pszFileName, int action); 
  551.     BOOL ProcessCommandLineDDE(char *pszDDECommand);
  552.     void RemoveDDESyntaxAndSwitch(CString strSwitch, char *pszCmdLine);
  553.  
  554.     //end of component launch stuff
  555.  
  556.     void parseCommandLine(char * commandLine);
  557.     int RuntimeIntSwitch(const char *pSwitch);
  558.     CString RuntimeStringSwitch(const char *pSwitch, BOOL bCheckCommand = TRUE);
  559.     BOOL IsRuntimeSwitch(const char *pSwitch,BOOL bRemove=TRUE);
  560.     BOOL IsRuntimeSwitch(const char *pSwitch,char *pszCommandLine, BOOL bRemove=TRUE);
  561.  
  562.     BOOL LoadPageSetupOptions();
  563.     void SavePageSetupOptions();
  564.  
  565.     // load the network and stuff
  566.     void InitNetwork();
  567.  
  568.     //  Amazing security and app version information.
  569.     CString m_csWinsock;    //  Description of running winsock.
  570.     CString ResolveShortAppVersion();  //  Create first part of user/agent 
  571.     CString ResolveAppVersion();    //  Create the agent part of the user/agent field.
  572.     void StoreVersionInReg();
  573.  
  574.     // Re-Implement bogus CWnd::SendMessageToDescendants(...) method
  575.     static void PASCAL SendMessageToDescendants(HWND hWnd, UINT message,
  576.                         WPARAM wParam, LPARAM lParam); 
  577.  
  578.     // Are we Personal Edition?
  579.     BOOL      m_bPEEnabled;
  580.     HINSTANCE m_hPEInst;
  581.     BOOL      m_bAccountSetup;
  582.     BOOL      m_bAccountSetupStartupJava;
  583.     CString   m_csPEPage;  // Don't use this if one-time homepage happens
  584.  
  585.     void CommonAppExit();
  586.  
  587.     inline BOOL showSplashScreen(const CString &csPrintCommand); 
  588.  
  589.     //{{AFX_MSG(CNetscapeApp)
  590.     afx_msg void OnAppAbout();
  591.     afx_msg void OnAppExit();
  592.     afx_msg void OnAppSuperExit();
  593.     afx_msg void OnHelp();
  594.     //}}AFX_MSG
  595.     DECLARE_MESSAGE_MAP()
  596. };
  597.  
  598.  
  599. // Used to factor some code out for MOZ_MAIL_NEWS
  600. BOOL CNetscapeApp::showSplashScreen(const CString &csPrintCommand)
  601. {
  602. #ifdef MOZ_MAIL_NEWS
  603.     return (!(m_bEmbedded || m_bAutomated || m_bCreateInboxMAPI) && csPrintCommand.IsEmpty());
  604. #else
  605.     return (!(m_bEmbedded || m_bAutomated) && csPrintCommand.IsEmpty());
  606. #endif
  607. }
  608.  
  609. /////////////////////////////////////////////////////////////////////////////
  610.  
  611. extern CNetscapeApp NEAR theApp;
  612.  
  613. //#ifdef MOZ_NETSCAPE_FONT_MODULE
  614. // the only one object of CNetscapeFontModule
  615. extern CNetscapeFontModule    theGlobalNSFont;
  616. //#endif // MOZ_NETSCAPE_FONT_MODULE 
  617.  
  618. // Home Grown resources
  619. #define IDC_URL_EDIT     25000
  620. #define IDC_HIST_LIST    25001
  621. #define DYNAMIC_RESOURCE 25010
  622.  
  623. // Speed of animation 0 == fast 1000 == once per sec
  624. #define ANIMATE_ICON_SPEED      300
  625.  
  626. // Bogus temp dir name so we can see if we've gotten one or not
  627. #define BOGUS_TEMP_DIR                          "xxxxx"
  628.  
  629. // Win16 has _MAX_PATH, not MAX_PATH catch easy and frequent mistakes
  630. #ifndef MAX_PATH
  631. #define MAX_PATH _MAX_PATH
  632. #endif
  633.  
  634. #endif
  635.  
  636.