home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / qahook.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.5 KB  |  98 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. // This is a header file for the QA hooks that are getting added
  20. // to Communicator. 
  21. //
  22. // Written by: Rich Pizzarro (rhp)
  23. //
  24. #ifndef _QAHOOK
  25. #define _QAHOOK
  26.  
  27. //
  28. // Need this for Win16 since it is an undocumented message
  29. //
  30. #ifndef WIN32
  31.  
  32. #define WM_COPYDATA                     0x004A
  33. //#define WM_COPYDATA                     0x7666
  34.  
  35. /*
  36.  * lParam of WM_COPYDATA message points to...
  37.  */
  38. typedef struct tagCOPYDATASTRUCT {
  39.     DWORD     dwData;
  40.     DWORD     cbData;
  41.     LPVOID     lpData;
  42. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  43.  
  44. #endif // ifndef WIN32
  45.  
  46. // A chunk of shared memory will be identified by name: 
  47.  
  48. #define SHARED_MEMORY_CHUNK_NAME "NSCP_QA_SMEM" 
  49. #define SHARED_MEMORY_CHUNK_SIZE (16 * 1024) 
  50.  
  51. // The following structure will be stored in the shared memory 
  52. // and will be used to pass data back and forth 
  53.  
  54. #pragma pack(4) 
  55.  
  56. typedef struct  
  57.   DWORD m_dwSize;               // size of the shared memory block 
  58.   DWORD m_dwBytesUsed;          // size of data in m_Data 
  59.   BYTE  m_buf[1]; 
  60. } CSharedData; 
  61.  
  62. #pragma pack() 
  63.  
  64. // 
  65. // *open existing* shared memory chunk 
  66. // once you have the pointer to the new segment 
  67. // use this pointer to access data, e.g.: 
  68. // 
  69. //  if(pData->m_dwBytesUsed > 0) 
  70. //  { 
  71. //    // use pData->m_buf here 
  72. //  } 
  73. //
  74. CSharedData     *OpenExistingSharedMemory(void);
  75.  
  76. // 
  77. // to close shared memory segment
  78. // 
  79. void            CloseSharedMemory();
  80.  
  81. //
  82. // Defines needed for requests being made with the WM_COPYDATA call...
  83. //
  84. typedef enum {
  85.     QA_OLGETCOUNT = 0,
  86.     QA_OLGETVISIBLECOUNT,
  87.     QA_OLGETTEXT,
  88.     QA_OLSETFOCUSLINE,
  89.     QA_OLGETFOCUSLINE,
  90.     QA_OLGETCOLCOUNT,
  91.     QA_OLGETNUMCHILDREN,
  92.     QA_OLSCROLLINTOVIEW,
  93.   QA_OLGETISCOLLAPSED
  94. } QA_REQUEST_TYPE;
  95.  
  96. #endif    // _QAHOOK
  97.