home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / hiddenfr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.4 KB  |  132 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. #ifndef __HiddenFrame_H
  20. #define __HiddenFrame_H
  21.  
  22. #ifdef MOZ_MAIL_NEWS
  23. #include "addrdlg.h"    // rhp - for MAPI
  24. #endif /* MOZ_MAIL_NEWS */
  25.  
  26. // hiddenfr.h : header file
  27. //
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CHiddenFrame frame
  31.  
  32. #define MSG_TASK_NOTIFY         (WM_USER + 1)
  33. #define MSG_EXIT_INSTANCE_STATUS            (WM_USER + 999)
  34.  
  35. class CHiddenFrame : public CFrameWnd
  36. {
  37.     DECLARE_DYNCREATE(CHiddenFrame)
  38. protected:
  39.     CHiddenFrame();       // protected constructor used by dynamic creation
  40.     friend class CNetscapeApp;    //    Allow the application to create us though.
  41.  
  42. // Attributes
  43. public:
  44.  
  45. // Operations
  46. public:
  47.  
  48. #ifdef MOZ_MAIL_NEWS
  49.   void AddressDialog(LPSTR winText, MAPIAddressCallbackProc mapiCB, MAPIAddressGetAddrProc getProc); // rhp - for MAPI
  50. #endif /* MOZ_MAIL_NEWS */
  51.  
  52. // Overrides
  53.     // ClassWizard generated virtual function overrides
  54.     //{{AFX_VIRTUAL(CHiddenFrame)
  55.     //}}AFX_VIRTUAL
  56.  
  57. // Implementation
  58. protected:
  59.     virtual ~CHiddenFrame();
  60.  
  61.     void HandleWebNotification(LONG lMessage);
  62. #ifdef MOZ_MAIL_NEWS
  63.     void HandleInboxNotification(LONG lMessage);
  64.     void HandleMailNotification(LONG lMessage);
  65.     void HandleNewsNotification(LONG lMessage);
  66. #endif /* MOZ_MAIL_NEWS */
  67. #ifdef EDITOR
  68.     void HandleEditorNotification(LONG lMessage);
  69. #endif /* EDITOR */
  70. #ifdef MOZ_MAIL_NEWS
  71.     void HandleComposeNotification(LONG lMessage);
  72.     void HandleAddressBookNotification(LONG lMessage);
  73. #endif /* MOZ_MAIL_NEWS */
  74.  
  75.     // Generated message map functions
  76.     //{{AFX_MSG(CHiddenFrame)
  77.         // NOTE - the ClassWizard will add and remove member functions here.
  78.     afx_msg LONG OnNetworkActivity(UINT socket, LONG lParam);
  79.     afx_msg LONG OnFoundDNS(WPARAM wParam, LONG lParam);
  80.     afx_msg LONG OnForceIOSelect(WPARAM wParam, LONG lParam);
  81.     afx_msg LONG OnTaskNotify(WPARAM wParam, LPARAM lParam);
  82.     afx_msg void OnDestroy(void);
  83.     afx_msg void OnEndSession(BOOL bEnding);
  84.     afx_msg LONG OnRequestExitStatus(WPARAM wParam/*0*/,LPARAM lParam/*0*/);
  85.     //}}AFX_MSG
  86. #ifdef XP_WIN16
  87.     afx_msg LONG OnNetworkAccept(UINT socket, LONG lParam);
  88.     afx_msg LONG OnNetworkRead(UINT socket, LONG lParam);
  89.     afx_msg LONG OnNetworkWrite(UINT socket, LONG lParam);
  90.     afx_msg LONG OnNetworkClose(UINT socket, LONG lParam);
  91. #endif
  92. #ifdef MOZ_MAIL_NEWS
  93.     afx_msg LONG OnAltMailBiffNotification(WPARAM wParam, LPARAM lParam);
  94. #endif
  95.     afx_msg BOOL OnQueryEndSession(); //~~av
  96.  
  97. #ifdef MOZ_MAIL_NEWS
  98.     afx_msg LONG OnProcessIPCHook(UINT, LONG);   // rhp - for IPC
  99. #endif
  100.  
  101.     DECLARE_MESSAGE_MAP()
  102. };
  103.  
  104. //    Global Vars
  105. //
  106. extern CMapStringToOb DNSCacheMap;
  107. extern const UINT NEAR msg_FoundDNS;
  108. extern UINT NEAR msg_NetActivity;
  109. #ifdef XP_WIN16
  110. extern UINT NEAR msg_NetAccept;
  111. extern UINT NEAR msg_NetRead;
  112. extern UINT NEAR msg_NetWrite;
  113. extern UINT NEAR msg_NetClose;
  114. #endif
  115. extern UINT NEAR msg_ForceIOSelect;
  116.  
  117. //  Net dike.
  118. //  Give priority to all events except msg_ForceIOSelect and msg_NetActivity
  119. //    (both registered with RegisterWindowMessage) function every X number
  120. //    of MessagePumps (keeps IO going even if message queue flooded).
  121. //  The goal here is to keep the application responsive while heavy network or file IO
  122. //    activity is occuring from the msg_ForceIOSelect or msg_NetActivity
  123. //    registered message.  Note that msg_NetActivity is equal to
  124. //    msg_ForceIOSelect + 1 (we assume, but handle correctly below anyhow).
  125. extern int gNetFloodStage;
  126. #define NET_FLOWCONTROL 16  //    Set higher for better UI responsivness.
  127. #define NET_MESSAGERANGE (MIN(msg_ForceIOSelect, msg_NetActivity) - 1)
  128.  
  129.  
  130. /////////////////////////////////////////////////////////////////////////////
  131. #endif // __HiddenFrame_H
  132.