Back to index

lightning-sunbird  0.9+nobinonly
CPMozillaControl.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 #ifndef CPMOZILLACONTROL_H
00038 #define CPMOZILLACONTROL_H
00039 
00041 // CProxyDWebBrowserEvents
00042 template <class T>
00043 class CProxyDWebBrowserEvents : public IConnectionPointImpl<T, &DIID_DWebBrowserEvents, CComDynamicUnkArray>
00044 {
00045 public:
00046 //methods:
00047 //DWebBrowserEvents : IDispatch
00048 public:
00049     void Fire_BeforeNavigate(
00050         BSTR URL,
00051         long Flags,
00052         BSTR TargetFrameName,
00053         VARIANT * PostData,
00054         BSTR Headers,
00055         VARIANT_BOOL * Cancel)
00056     {
00057         VARIANTARG* pvars = new VARIANTARG[6];
00058         for (int i = 0; i < 6; i++)
00059             VariantInit(&pvars[i]);
00060         T* pT = (T*)this;
00061         pT->Lock();
00062         IUnknown** pp = m_vec.begin();
00063         while (pp < m_vec.end())
00064         {
00065             if (*pp != NULL)
00066             {
00067                 pvars[5].vt = VT_BSTR;
00068                 pvars[5].bstrVal= URL;
00069                 pvars[4].vt = VT_I4;
00070                 pvars[4].lVal= Flags;
00071                 pvars[3].vt = VT_BSTR;
00072                 pvars[3].bstrVal= TargetFrameName;
00073                 pvars[2].vt = VT_VARIANT | VT_BYREF;
00074                 pvars[2].byref= PostData;
00075                 pvars[1].vt = VT_BSTR;
00076                 pvars[1].bstrVal= Headers;
00077                 pvars[0].vt = VT_BOOL | VT_BYREF;
00078                 pvars[0].byref= Cancel;
00079                 DISPPARAMS disp = { pvars, NULL, 6, 0 };
00080                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00081                 pDispatch->Invoke(0x64, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00082             }
00083             pp++;
00084         }
00085         pT->Unlock();
00086         delete[] pvars;
00087     }
00088     void Fire_NavigateComplete(
00089         BSTR URL)
00090     {
00091         VARIANTARG* pvars = new VARIANTARG[1];
00092         for (int i = 0; i < 1; i++)
00093             VariantInit(&pvars[i]);
00094         T* pT = (T*)this;
00095         pT->Lock();
00096         IUnknown** pp = m_vec.begin();
00097         while (pp < m_vec.end())
00098         {
00099             if (*pp != NULL)
00100             {
00101                 pvars[0].vt = VT_BSTR;
00102                 pvars[0].bstrVal= URL;
00103                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00104                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00105                 pDispatch->Invoke(0x65, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00106             }
00107             pp++;
00108         }
00109         pT->Unlock();
00110         delete[] pvars;
00111     }
00112     void Fire_StatusTextChange(
00113         BSTR Text)
00114     {
00115         VARIANTARG* pvars = new VARIANTARG[1];
00116         for (int i = 0; i < 1; i++)
00117             VariantInit(&pvars[i]);
00118         T* pT = (T*)this;
00119         pT->Lock();
00120         IUnknown** pp = m_vec.begin();
00121         while (pp < m_vec.end())
00122         {
00123             if (*pp != NULL)
00124             {
00125                 pvars[0].vt = VT_BSTR;
00126                 pvars[0].bstrVal= Text;
00127                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00128                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00129                 pDispatch->Invoke(0x66, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00130             }
00131             pp++;
00132         }
00133         pT->Unlock();
00134         delete[] pvars;
00135     }
00136     void Fire_ProgressChange(
00137         long Progress,
00138         long ProgressMax)
00139     {
00140         VARIANTARG* pvars = new VARIANTARG[2];
00141         for (int i = 0; i < 2; i++)
00142             VariantInit(&pvars[i]);
00143         T* pT = (T*)this;
00144         pT->Lock();
00145         IUnknown** pp = m_vec.begin();
00146         while (pp < m_vec.end())
00147         {
00148             if (*pp != NULL)
00149             {
00150                 pvars[1].vt = VT_I4;
00151                 pvars[1].lVal= Progress;
00152                 pvars[0].vt = VT_I4;
00153                 pvars[0].lVal= ProgressMax;
00154                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00155                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00156                 pDispatch->Invoke(0x6c, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00157             }
00158             pp++;
00159         }
00160         pT->Unlock();
00161         delete[] pvars;
00162     }
00163     void Fire_DownloadComplete()
00164     {
00165         T* pT = (T*)this;
00166         pT->Lock();
00167         IUnknown** pp = m_vec.begin();
00168         while (pp < m_vec.end())
00169         {
00170             if (*pp != NULL)
00171             {
00172                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00173                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00174                 pDispatch->Invoke(0x68, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00175             }
00176             pp++;
00177         }
00178         pT->Unlock();
00179     }
00180     void Fire_CommandStateChange(
00181         long Command,
00182         VARIANT_BOOL Enable)
00183     {
00184         VARIANTARG* pvars = new VARIANTARG[2];
00185         for (int i = 0; i < 2; i++)
00186             VariantInit(&pvars[i]);
00187         T* pT = (T*)this;
00188         pT->Lock();
00189         IUnknown** pp = m_vec.begin();
00190         while (pp < m_vec.end())
00191         {
00192             if (*pp != NULL)
00193             {
00194                 pvars[1].vt = VT_I4;
00195                 pvars[1].lVal= Command;
00196                 pvars[0].vt = VT_BOOL;
00197                 pvars[0].boolVal= Enable;
00198                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00199                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00200                 pDispatch->Invoke(0x69, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00201             }
00202             pp++;
00203         }
00204         pT->Unlock();
00205         delete[] pvars;
00206     }
00207     void Fire_DownloadBegin()
00208     {
00209         T* pT = (T*)this;
00210         pT->Lock();
00211         IUnknown** pp = m_vec.begin();
00212         while (pp < m_vec.end())
00213         {
00214             if (*pp != NULL)
00215             {
00216                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00217                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00218                 pDispatch->Invoke(0x6a, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00219             }
00220             pp++;
00221         }
00222         pT->Unlock();
00223     }
00224     void Fire_NewWindow(
00225         BSTR URL,
00226         long Flags,
00227         BSTR TargetFrameName,
00228         VARIANT * PostData,
00229         BSTR Headers,
00230         VARIANT_BOOL * Processed)
00231     {
00232         VARIANTARG* pvars = new VARIANTARG[6];
00233         for (int i = 0; i < 6; i++)
00234             VariantInit(&pvars[i]);
00235         T* pT = (T*)this;
00236         pT->Lock();
00237         IUnknown** pp = m_vec.begin();
00238         while (pp < m_vec.end())
00239         {
00240             if (*pp != NULL)
00241             {
00242                 pvars[5].vt = VT_BSTR;
00243                 pvars[5].bstrVal= URL;
00244                 pvars[4].vt = VT_I4;
00245                 pvars[4].lVal= Flags;
00246                 pvars[3].vt = VT_BSTR;
00247                 pvars[3].bstrVal= TargetFrameName;
00248                 pvars[2].vt = VT_VARIANT | VT_BYREF;
00249                 pvars[2].byref= PostData;
00250                 pvars[1].vt = VT_BSTR;
00251                 pvars[1].bstrVal= Headers;
00252                 pvars[0].vt = VT_BOOL | VT_BYREF;
00253                 pvars[0].byref= Processed;
00254                 DISPPARAMS disp = { pvars, NULL, 6, 0 };
00255                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00256                 pDispatch->Invoke(0x6b, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00257             }
00258             pp++;
00259         }
00260         pT->Unlock();
00261         delete[] pvars;
00262     }
00263     void Fire_TitleChange(
00264         BSTR Text)
00265     {
00266         VARIANTARG* pvars = new VARIANTARG[1];
00267         for (int i = 0; i < 1; i++)
00268             VariantInit(&pvars[i]);
00269         T* pT = (T*)this;
00270         pT->Lock();
00271         IUnknown** pp = m_vec.begin();
00272         while (pp < m_vec.end())
00273         {
00274             if (*pp != NULL)
00275             {
00276                 pvars[0].vt = VT_BSTR;
00277                 pvars[0].bstrVal= Text;
00278                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00279                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00280                 pDispatch->Invoke(0x71, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00281             }
00282             pp++;
00283         }
00284         pT->Unlock();
00285         delete[] pvars;
00286     }
00287     void Fire_FrameBeforeNavigate(
00288         BSTR URL,
00289         long Flags,
00290         BSTR TargetFrameName,
00291         VARIANT * PostData,
00292         BSTR Headers,
00293         VARIANT_BOOL * Cancel)
00294     {
00295         VARIANTARG* pvars = new VARIANTARG[6];
00296         for (int i = 0; i < 6; i++)
00297             VariantInit(&pvars[i]);
00298         T* pT = (T*)this;
00299         pT->Lock();
00300         IUnknown** pp = m_vec.begin();
00301         while (pp < m_vec.end())
00302         {
00303             if (*pp != NULL)
00304             {
00305                 pvars[5].vt = VT_BSTR;
00306                 pvars[5].bstrVal= URL;
00307                 pvars[4].vt = VT_I4;
00308                 pvars[4].lVal= Flags;
00309                 pvars[3].vt = VT_BSTR;
00310                 pvars[3].bstrVal= TargetFrameName;
00311                 pvars[2].vt = VT_VARIANT | VT_BYREF;
00312                 pvars[2].byref= PostData;
00313                 pvars[1].vt = VT_BSTR;
00314                 pvars[1].bstrVal= Headers;
00315                 pvars[0].vt = VT_BOOL | VT_BYREF;
00316                 pvars[0].byref= Cancel;
00317                 DISPPARAMS disp = { pvars, NULL, 6, 0 };
00318                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00319                 pDispatch->Invoke(0xc8, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00320             }
00321             pp++;
00322         }
00323         pT->Unlock();
00324         delete[] pvars;
00325     }
00326     void Fire_FrameNavigateComplete(
00327         BSTR URL)
00328     {
00329         VARIANTARG* pvars = new VARIANTARG[1];
00330         for (int i = 0; i < 1; i++)
00331             VariantInit(&pvars[i]);
00332         T* pT = (T*)this;
00333         pT->Lock();
00334         IUnknown** pp = m_vec.begin();
00335         while (pp < m_vec.end())
00336         {
00337             if (*pp != NULL)
00338             {
00339                 pvars[0].vt = VT_BSTR;
00340                 pvars[0].bstrVal= URL;
00341                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00342                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00343                 pDispatch->Invoke(0xc9, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00344             }
00345             pp++;
00346         }
00347         pT->Unlock();
00348         delete[] pvars;
00349     }
00350     void Fire_FrameNewWindow(
00351         BSTR URL,
00352         long Flags,
00353         BSTR TargetFrameName,
00354         VARIANT * PostData,
00355         BSTR Headers,
00356         VARIANT_BOOL * Processed)
00357     {
00358         VARIANTARG* pvars = new VARIANTARG[6];
00359         for (int i = 0; i < 6; i++)
00360             VariantInit(&pvars[i]);
00361         T* pT = (T*)this;
00362         pT->Lock();
00363         IUnknown** pp = m_vec.begin();
00364         while (pp < m_vec.end())
00365         {
00366             if (*pp != NULL)
00367             {
00368                 pvars[5].vt = VT_BSTR;
00369                 pvars[5].bstrVal= URL;
00370                 pvars[4].vt = VT_I4;
00371                 pvars[4].lVal= Flags;
00372                 pvars[3].vt = VT_BSTR;
00373                 pvars[3].bstrVal= TargetFrameName;
00374                 pvars[2].vt = VT_VARIANT | VT_BYREF;
00375                 pvars[2].byref= PostData;
00376                 pvars[1].vt = VT_BSTR;
00377                 pvars[1].bstrVal= Headers;
00378                 pvars[0].vt = VT_BOOL | VT_BYREF;
00379                 pvars[0].byref= Processed;
00380                 DISPPARAMS disp = { pvars, NULL, 6, 0 };
00381                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00382                 pDispatch->Invoke(0xcc, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00383             }
00384             pp++;
00385         }
00386         pT->Unlock();
00387         delete[] pvars;
00388     }
00389     void Fire_Quit(
00390         VARIANT_BOOL * Cancel)
00391     {
00392         VARIANTARG* pvars = new VARIANTARG[1];
00393         for (int i = 0; i < 1; i++)
00394             VariantInit(&pvars[i]);
00395         T* pT = (T*)this;
00396         pT->Lock();
00397         IUnknown** pp = m_vec.begin();
00398         while (pp < m_vec.end())
00399         {
00400             if (*pp != NULL)
00401             {
00402                 pvars[0].vt = VT_BOOL | VT_BYREF;
00403                 pvars[0].byref= Cancel;
00404                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00405                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00406                 pDispatch->Invoke(0x67, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00407             }
00408             pp++;
00409         }
00410         pT->Unlock();
00411         delete[] pvars;
00412     }
00413     void Fire_WindowMove()
00414     {
00415         T* pT = (T*)this;
00416         pT->Lock();
00417         IUnknown** pp = m_vec.begin();
00418         while (pp < m_vec.end())
00419         {
00420             if (*pp != NULL)
00421             {
00422                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00423                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00424                 pDispatch->Invoke(0x6d, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00425             }
00426             pp++;
00427         }
00428         pT->Unlock();
00429     }
00430     void Fire_WindowResize()
00431     {
00432         T* pT = (T*)this;
00433         pT->Lock();
00434         IUnknown** pp = m_vec.begin();
00435         while (pp < m_vec.end())
00436         {
00437             if (*pp != NULL)
00438             {
00439                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00440                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00441                 pDispatch->Invoke(0x6e, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00442             }
00443             pp++;
00444         }
00445         pT->Unlock();
00446     }
00447     void Fire_WindowActivate()
00448     {
00449         T* pT = (T*)this;
00450         pT->Lock();
00451         IUnknown** pp = m_vec.begin();
00452         while (pp < m_vec.end())
00453         {
00454             if (*pp != NULL)
00455             {
00456                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00457                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00458                 pDispatch->Invoke(0x6f, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00459             }
00460             pp++;
00461         }
00462         pT->Unlock();
00463     }
00464     void Fire_PropertyChange(
00465         BSTR Property)
00466     {
00467         VARIANTARG* pvars = new VARIANTARG[1];
00468         for (int i = 0; i < 1; i++)
00469             VariantInit(&pvars[i]);
00470         T* pT = (T*)this;
00471         pT->Lock();
00472         IUnknown** pp = m_vec.begin();
00473         while (pp < m_vec.end())
00474         {
00475             if (*pp != NULL)
00476             {
00477                 pvars[0].vt = VT_BSTR;
00478                 pvars[0].bstrVal= Property;
00479                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00480                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00481                 pDispatch->Invoke(0x70, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00482             }
00483             pp++;
00484         }
00485         pT->Unlock();
00486         delete[] pvars;
00487     }
00488 
00489 };
00490 
00491 
00493 // CProxyDWebBrowserEvents2
00494 template <class T>
00495 class CProxyDWebBrowserEvents2 : public IConnectionPointImpl<T, &DIID_DWebBrowserEvents2, CComDynamicUnkArray>
00496 {
00497 public:
00498 //methods:
00499 //DWebBrowserEvents2 : IDispatch
00500 public:
00501     void Fire_StatusTextChange(
00502         BSTR Text)
00503     {
00504         VARIANTARG* pvars = new VARIANTARG[1];
00505         for (int i = 0; i < 1; i++)
00506             VariantInit(&pvars[i]);
00507         T* pT = (T*)this;
00508         pT->Lock();
00509         IUnknown** pp = m_vec.begin();
00510         while (pp < m_vec.end())
00511         {
00512             if (*pp != NULL)
00513             {
00514                 pvars[0].vt = VT_BSTR;
00515                 pvars[0].bstrVal= Text;
00516                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00517                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00518                 pDispatch->Invoke(0x66, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00519             }
00520             pp++;
00521         }
00522         pT->Unlock();
00523         delete[] pvars;
00524     }
00525     void Fire_ProgressChange(
00526         long Progress,
00527         long ProgressMax)
00528     {
00529         VARIANTARG* pvars = new VARIANTARG[2];
00530         for (int i = 0; i < 2; i++)
00531             VariantInit(&pvars[i]);
00532         T* pT = (T*)this;
00533         pT->Lock();
00534         IUnknown** pp = m_vec.begin();
00535         while (pp < m_vec.end())
00536         {
00537             if (*pp != NULL)
00538             {
00539                 pvars[1].vt = VT_I4;
00540                 pvars[1].lVal= Progress;
00541                 pvars[0].vt = VT_I4;
00542                 pvars[0].lVal= ProgressMax;
00543                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00544                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00545                 pDispatch->Invoke(0x6c, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00546             }
00547             pp++;
00548         }
00549         pT->Unlock();
00550         delete[] pvars;
00551     }
00552     void Fire_CommandStateChange(
00553         long Command,
00554         VARIANT_BOOL Enable)
00555     {
00556         VARIANTARG* pvars = new VARIANTARG[2];
00557         for (int i = 0; i < 2; i++)
00558             VariantInit(&pvars[i]);
00559         T* pT = (T*)this;
00560         pT->Lock();
00561         IUnknown** pp = m_vec.begin();
00562         while (pp < m_vec.end())
00563         {
00564             if (*pp != NULL)
00565             {
00566                 pvars[1].vt = VT_I4;
00567                 pvars[1].lVal= Command;
00568                 pvars[0].vt = VT_BOOL;
00569                 pvars[0].boolVal= Enable;
00570                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00571                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00572                 pDispatch->Invoke(0x69, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00573             }
00574             pp++;
00575         }
00576         pT->Unlock();
00577         delete[] pvars;
00578     }
00579     void Fire_DownloadBegin()
00580     {
00581         T* pT = (T*)this;
00582         pT->Lock();
00583         IUnknown** pp = m_vec.begin();
00584         while (pp < m_vec.end())
00585         {
00586             if (*pp != NULL)
00587             {
00588                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00589                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00590                 pDispatch->Invoke(0x6a, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00591             }
00592             pp++;
00593         }
00594         pT->Unlock();
00595     }
00596     void Fire_DownloadComplete()
00597     {
00598         T* pT = (T*)this;
00599         pT->Lock();
00600         IUnknown** pp = m_vec.begin();
00601         while (pp < m_vec.end())
00602         {
00603             if (*pp != NULL)
00604             {
00605                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00606                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00607                 pDispatch->Invoke(0x68, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00608             }
00609             pp++;
00610         }
00611         pT->Unlock();
00612     }
00613     void Fire_TitleChange(
00614         BSTR Text)
00615     {
00616         VARIANTARG* pvars = new VARIANTARG[1];
00617         for (int i = 0; i < 1; i++)
00618             VariantInit(&pvars[i]);
00619         T* pT = (T*)this;
00620         pT->Lock();
00621         IUnknown** pp = m_vec.begin();
00622         while (pp < m_vec.end())
00623         {
00624             if (*pp != NULL)
00625             {
00626                 pvars[0].vt = VT_BSTR;
00627                 pvars[0].bstrVal= Text;
00628                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00629                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00630                 pDispatch->Invoke(0x71, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00631             }
00632             pp++;
00633         }
00634         pT->Unlock();
00635         delete[] pvars;
00636     }
00637     void Fire_PropertyChange(
00638         BSTR szProperty)
00639     {
00640         VARIANTARG* pvars = new VARIANTARG[1];
00641         for (int i = 0; i < 1; i++)
00642             VariantInit(&pvars[i]);
00643         T* pT = (T*)this;
00644         pT->Lock();
00645         IUnknown** pp = m_vec.begin();
00646         while (pp < m_vec.end())
00647         {
00648             if (*pp != NULL)
00649             {
00650                 pvars[0].vt = VT_BSTR;
00651                 pvars[0].bstrVal= szProperty;
00652                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00653                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00654                 pDispatch->Invoke(0x70, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00655             }
00656             pp++;
00657         }
00658         pT->Unlock();
00659         delete[] pvars;
00660     }
00661     void Fire_BeforeNavigate2(
00662         IDispatch * pDisp,
00663         VARIANT * URL,
00664         VARIANT * Flags,
00665         VARIANT * TargetFrameName,
00666         VARIANT * PostData,
00667         VARIANT * Headers,
00668         VARIANT_BOOL * Cancel)
00669     {
00670         VARIANTARG* pvars = new VARIANTARG[7];
00671         for (int i = 0; i < 7; i++)
00672             VariantInit(&pvars[i]);
00673         T* pT = (T*)this;
00674         pT->Lock();
00675         IUnknown** pp = m_vec.begin();
00676         while (pp < m_vec.end())
00677         {
00678             if (*pp != NULL)
00679             {
00680                 pvars[6].vt = VT_DISPATCH;
00681                 pvars[6].pdispVal= pDisp;
00682                 pvars[5].vt = VT_VARIANT | VT_BYREF;
00683                 pvars[5].byref= URL;
00684                 pvars[4].vt = VT_VARIANT | VT_BYREF;
00685                 pvars[4].byref= Flags;
00686                 pvars[3].vt = VT_VARIANT | VT_BYREF;
00687                 pvars[3].byref= TargetFrameName;
00688                 pvars[2].vt = VT_VARIANT | VT_BYREF;
00689                 pvars[2].byref= PostData;
00690                 pvars[1].vt = VT_VARIANT | VT_BYREF;
00691                 pvars[1].byref= Headers;
00692                 pvars[0].vt = VT_BOOL | VT_BYREF;
00693                 pvars[0].byref= Cancel;
00694                 DISPPARAMS disp = { pvars, NULL, 7, 0 };
00695                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00696                 pDispatch->Invoke(0xfa, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00697             }
00698             pp++;
00699         }
00700         pT->Unlock();
00701         delete[] pvars;
00702     }
00703     void Fire_NewWindow2(
00704         IDispatch * * ppDisp,
00705         VARIANT_BOOL * Cancel)
00706     {
00707         VARIANTARG* pvars = new VARIANTARG[2];
00708         for (int i = 0; i < 2; i++)
00709             VariantInit(&pvars[i]);
00710         T* pT = (T*)this;
00711         pT->Lock();
00712         IUnknown** pp = m_vec.begin();
00713         while (pp < m_vec.end())
00714         {
00715             if (*pp != NULL)
00716             {
00717                 pvars[1].vt = VT_DISPATCH | VT_BYREF;
00718                 pvars[1].byref= ppDisp;
00719                 pvars[0].vt = VT_BOOL | VT_BYREF;
00720                 pvars[0].byref= Cancel;
00721                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00722                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00723                 pDispatch->Invoke(0xfb, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00724             }
00725             pp++;
00726         }
00727         pT->Unlock();
00728         delete[] pvars;
00729     }
00730     void Fire_NavigateComplete2(
00731         IDispatch * pDisp,
00732         VARIANT * URL)
00733     {
00734         VARIANTARG* pvars = new VARIANTARG[2];
00735         for (int i = 0; i < 2; i++)
00736             VariantInit(&pvars[i]);
00737         T* pT = (T*)this;
00738         pT->Lock();
00739         IUnknown** pp = m_vec.begin();
00740         while (pp < m_vec.end())
00741         {
00742             if (*pp != NULL)
00743             {
00744                 pvars[1].vt = VT_DISPATCH;
00745                 pvars[1].pdispVal= pDisp;
00746                 pvars[0].vt = VT_VARIANT | VT_BYREF;
00747                 pvars[0].byref= URL;
00748                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00749                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00750                 pDispatch->Invoke(0xfc, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00751             }
00752             pp++;
00753         }
00754         pT->Unlock();
00755         delete[] pvars;
00756     }
00757     void Fire_DocumentComplete(
00758         IDispatch * pDisp,
00759         VARIANT * URL)
00760     {
00761         VARIANTARG* pvars = new VARIANTARG[2];
00762         for (int i = 0; i < 2; i++)
00763             VariantInit(&pvars[i]);
00764         T* pT = (T*)this;
00765         pT->Lock();
00766         IUnknown** pp = m_vec.begin();
00767         while (pp < m_vec.end())
00768         {
00769             if (*pp != NULL)
00770             {
00771                 pvars[1].vt = VT_DISPATCH;
00772                 pvars[1].pdispVal= pDisp;
00773                 pvars[0].vt = VT_VARIANT | VT_BYREF;
00774                 pvars[0].byref= URL;
00775                 DISPPARAMS disp = { pvars, NULL, 2, 0 };
00776                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00777                 pDispatch->Invoke(0x103, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00778             }
00779             pp++;
00780         }
00781         pT->Unlock();
00782         delete[] pvars;
00783     }
00784     void Fire_OnQuit()
00785     {
00786         T* pT = (T*)this;
00787         pT->Lock();
00788         IUnknown** pp = m_vec.begin();
00789         while (pp < m_vec.end())
00790         {
00791             if (*pp != NULL)
00792             {
00793                 DISPPARAMS disp = { NULL, NULL, 0, 0 };
00794                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00795                 pDispatch->Invoke(0xfd, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00796             }
00797             pp++;
00798         }
00799         pT->Unlock();
00800     }
00801     void Fire_OnVisible(
00802         VARIANT_BOOL Visible)
00803     {
00804         VARIANTARG* pvars = new VARIANTARG[1];
00805         for (int i = 0; i < 1; i++)
00806             VariantInit(&pvars[i]);
00807         T* pT = (T*)this;
00808         pT->Lock();
00809         IUnknown** pp = m_vec.begin();
00810         while (pp < m_vec.end())
00811         {
00812             if (*pp != NULL)
00813             {
00814                 pvars[0].vt = VT_BOOL;
00815                 pvars[0].boolVal= Visible;
00816                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00817                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00818                 pDispatch->Invoke(0xfe, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00819             }
00820             pp++;
00821         }
00822         pT->Unlock();
00823         delete[] pvars;
00824     }
00825     void Fire_OnToolBar(
00826         VARIANT_BOOL ToolBar)
00827     {
00828         VARIANTARG* pvars = new VARIANTARG[1];
00829         for (int i = 0; i < 1; i++)
00830             VariantInit(&pvars[i]);
00831         T* pT = (T*)this;
00832         pT->Lock();
00833         IUnknown** pp = m_vec.begin();
00834         while (pp < m_vec.end())
00835         {
00836             if (*pp != NULL)
00837             {
00838                 pvars[0].vt = VT_BOOL;
00839                 pvars[0].boolVal= ToolBar;
00840                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00841                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00842                 pDispatch->Invoke(0xff, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00843             }
00844             pp++;
00845         }
00846         pT->Unlock();
00847         delete[] pvars;
00848     }
00849     void Fire_OnMenuBar(
00850         VARIANT_BOOL MenuBar)
00851     {
00852         VARIANTARG* pvars = new VARIANTARG[1];
00853         for (int i = 0; i < 1; i++)
00854             VariantInit(&pvars[i]);
00855         T* pT = (T*)this;
00856         pT->Lock();
00857         IUnknown** pp = m_vec.begin();
00858         while (pp < m_vec.end())
00859         {
00860             if (*pp != NULL)
00861             {
00862                 pvars[0].vt = VT_BOOL;
00863                 pvars[0].boolVal= MenuBar;
00864                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00865                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00866                 pDispatch->Invoke(0x100, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00867             }
00868             pp++;
00869         }
00870         pT->Unlock();
00871         delete[] pvars;
00872     }
00873     void Fire_OnStatusBar(
00874         VARIANT_BOOL StatusBar)
00875     {
00876         VARIANTARG* pvars = new VARIANTARG[1];
00877         for (int i = 0; i < 1; i++)
00878             VariantInit(&pvars[i]);
00879         T* pT = (T*)this;
00880         pT->Lock();
00881         IUnknown** pp = m_vec.begin();
00882         while (pp < m_vec.end())
00883         {
00884             if (*pp != NULL)
00885             {
00886                 pvars[0].vt = VT_BOOL;
00887                 pvars[0].boolVal= StatusBar;
00888                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00889                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00890                 pDispatch->Invoke(0x101, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00891             }
00892             pp++;
00893         }
00894         pT->Unlock();
00895         delete[] pvars;
00896     }
00897     void Fire_OnFullScreen(
00898         VARIANT_BOOL FullScreen)
00899     {
00900         VARIANTARG* pvars = new VARIANTARG[1];
00901         for (int i = 0; i < 1; i++)
00902             VariantInit(&pvars[i]);
00903         T* pT = (T*)this;
00904         pT->Lock();
00905         IUnknown** pp = m_vec.begin();
00906         while (pp < m_vec.end())
00907         {
00908             if (*pp != NULL)
00909             {
00910                 pvars[0].vt = VT_BOOL;
00911                 pvars[0].boolVal= FullScreen;
00912                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00913                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00914                 pDispatch->Invoke(0x102, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00915             }
00916             pp++;
00917         }
00918         pT->Unlock();
00919         delete[] pvars;
00920     }
00921     void Fire_OnTheaterMode(
00922         VARIANT_BOOL TheaterMode)
00923     {
00924         VARIANTARG* pvars = new VARIANTARG[1];
00925         for (int i = 0; i < 1; i++)
00926             VariantInit(&pvars[i]);
00927         T* pT = (T*)this;
00928         pT->Lock();
00929         IUnknown** pp = m_vec.begin();
00930         while (pp < m_vec.end())
00931         {
00932             if (*pp != NULL)
00933             {
00934                 pvars[0].vt = VT_BOOL;
00935                 pvars[0].boolVal= TheaterMode;
00936                 DISPPARAMS disp = { pvars, NULL, 1, 0 };
00937                 IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp);
00938                 pDispatch->Invoke(0x104, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
00939             }
00940             pp++;
00941         }
00942         pT->Unlock();
00943         delete[] pvars;
00944     }
00945 
00946 };
00947 
00948 
00949 #endif