home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / temacd / devc++ / devcpp-4.9.9.2_setup.exe / exdisp.h < prev    next >
C/C++ Source or Header  |  2005-01-29  |  10KB  |  258 lines

  1. #ifndef _EXDISP_H
  2. #define _EXDISP_H
  3. #if __GNUC__ >=3
  4. #pragma GCC system_header
  5. #endif
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include <oaidl.h>
  10. #include <ocidl.h>
  11. #include <docobj.h>
  12.  
  13. EXTERN_C const CLSID CLSID_WebBrowser;
  14. EXTERN_C const IID DIID_DWebBrowserEvents;
  15.  
  16. typedef enum {
  17.     navOpenInNewWindow = 0x1,
  18.     navNoHistory = 0x2,
  19.     navNoReadFromCache = 0x4,
  20.     navNoWriteTocache = 0x8,
  21.     navAllowAutosearch = 0x10,
  22.     navBrowserBar = 0x20,
  23.     navHyperLink = 0x40
  24. } BrowserNavConstants;
  25.  
  26. EXTERN_C const IID IID_IWebBrowser;
  27. #undef INTERFACE
  28. #define INTERFACE IWebBrowser
  29. DECLARE_INTERFACE_(IWebBrowser,IDispatch)
  30. {
  31.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  32.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  33.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  34.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  35.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  36.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  37.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  38.  
  39.     STDMETHOD(GoBack)(THIS) PURE;
  40.     STDMETHOD(GoForward)(THIS) PURE;
  41.     STDMETHOD(GoHome)(THIS) PURE;
  42.     STDMETHOD(GoSearch)(THIS) PURE;
  43.     STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
  44.     STDMETHOD(Refresh)(THIS) PURE;
  45.     STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
  46.     STDMETHOD(Stop)(THIS) PURE;
  47.     STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
  48.     STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
  49.     STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
  50.     STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
  51.     STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
  52.     STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
  53.     STDMETHOD(get_Left)(THIS_ long*) PURE;
  54.     STDMETHOD(put_Left)(THIS_ long) PURE;
  55.     STDMETHOD(get_Top)(THIS_ long*) PURE;
  56.     STDMETHOD(put_Top)(THIS_ long) PURE;
  57.     STDMETHOD(get_Width)(THIS_ long*) PURE;
  58.     STDMETHOD(put_Width)(THIS_ long) PURE;
  59.     STDMETHOD(get_Height)(THIS_ long*) PURE;
  60.     STDMETHOD(put_Height)(THIS_ long) PURE;
  61.     STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
  62.     STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
  63.     STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
  64. };
  65.  
  66. EXTERN_C const IID IID_IWebBrowserApp;
  67. #undef INTERFACE
  68. #define INTERFACE IWebBrowserApp
  69. DECLARE_INTERFACE_(IWebBrowserApp,IWebBrowser)
  70. {
  71.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  72.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  73.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  74.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  75.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  76.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  77.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  78.  
  79.     STDMETHOD(GoBack)(THIS) PURE;
  80.     STDMETHOD(GoForward)(THIS) PURE;
  81.     STDMETHOD(GoHome)(THIS) PURE;
  82.     STDMETHOD(GoSearch)(THIS) PURE;
  83.     STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
  84.     STDMETHOD(Refresh)(THIS) PURE;
  85.     STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
  86.     STDMETHOD(Stop)(THIS) PURE;
  87.     STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
  88.     STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
  89.     STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
  90.     STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
  91.     STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
  92.     STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
  93.     STDMETHOD(get_Left)(THIS_ long*) PURE;
  94.     STDMETHOD(put_Left)(THIS_ long) PURE;
  95.     STDMETHOD(get_Top)(THIS_ long*) PURE;
  96.     STDMETHOD(put_Top)(THIS_ long) PURE;
  97.     STDMETHOD(get_Width)(THIS_ long*) PURE;
  98.     STDMETHOD(put_Width)(THIS_ long) PURE;
  99.     STDMETHOD(get_Height)(THIS_ long*) PURE;
  100.     STDMETHOD(put_Height)(THIS_ long) PURE;
  101.     STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
  102.     STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
  103.     STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
  104.  
  105.     STDMETHOD(Quit)(THIS) PURE;
  106.     STDMETHOD(ClientToWindow)(THIS_ int*,int*) PURE;
  107.     STDMETHOD(PutProperty)(THIS_ BSTR,VARIANT) PURE;
  108.     STDMETHOD(GetProperty)(THIS_ BSTR,VARIANT*) PURE;
  109.     STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
  110.     STDMETHOD(get_HWND)(THIS_ long*) PURE;
  111.     STDMETHOD(get_FullName)(THIS_ BSTR*) PURE;
  112.     STDMETHOD(get_Path)(THIS_ BSTR*) PURE;
  113.     STDMETHOD(get_Visible)(THIS_ VARIANT_BOOL*) PURE;
  114.     STDMETHOD(put_Visible)(THIS_ VARIANT_BOOL) PURE;
  115.     STDMETHOD(get_StatusBar)(THIS_ VARIANT_BOOL*) PURE;
  116.     STDMETHOD(put_StatusBar)(THIS_ VARIANT_BOOL) PURE;
  117.     STDMETHOD(get_StatusText)(THIS_ BSTR*) PURE;
  118.     STDMETHOD(put_StatusText)(THIS_ BSTR) PURE;
  119.     STDMETHOD(get_ToolBar)(THIS_ int*) PURE;
  120.     STDMETHOD(put_ToolBar)(THIS_ int) PURE;
  121.     STDMETHOD(get_MenuBar)(THIS_ VARIANT_BOOL*) PURE;
  122.     STDMETHOD(put_MenuBar)(THIS_ VARIANT_BOOL) PURE;
  123.     STDMETHOD(get_FullScreen)(THIS_ VARIANT_BOOL*) PURE;
  124.     STDMETHOD(put_FullScreen)(THIS_ VARIANT_BOOL) PURE;
  125. };
  126.  
  127. EXTERN_C const IID IID_IWebBrowser2;
  128. #undef INTERFACE
  129. #define INTERFACE IWebBrowser2
  130. DECLARE_INTERFACE_(IWebBrowser2,IWebBrowserApp)
  131. {
  132.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  133.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  134.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  135.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  136.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  137.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  138.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  139.  
  140.     STDMETHOD(GoBack)(THIS) PURE;
  141.     STDMETHOD(GoForward)(THIS) PURE;
  142.     STDMETHOD(GoHome)(THIS) PURE;
  143.     STDMETHOD(GoSearch)(THIS) PURE;
  144.     STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
  145.     STDMETHOD(Refresh)(THIS) PURE;
  146.     STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
  147.     STDMETHOD(Stop)(THIS) PURE;
  148.     STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
  149.     STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
  150.     STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
  151.     STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
  152.     STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
  153.     STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
  154.     STDMETHOD(get_Left)(THIS_ long*) PURE;
  155.     STDMETHOD(put_Left)(THIS_ long) PURE;
  156.     STDMETHOD(get_Top)(THIS_ long*) PURE;
  157.     STDMETHOD(put_Top)(THIS_ long) PURE;
  158.     STDMETHOD(get_Width)(THIS_ long*) PURE;
  159.     STDMETHOD(put_Width)(THIS_ long) PURE;
  160.     STDMETHOD(get_Height)(THIS_ long*) PURE;
  161.     STDMETHOD(put_Height)(THIS_ long) PURE;
  162.     STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
  163.     STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
  164.     STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
  165.  
  166.     STDMETHOD(Quit)(THIS) PURE;
  167.     STDMETHOD(ClientToWindow)(THIS_ int*,int*) PURE;
  168.     STDMETHOD(PutProperty)(THIS_ BSTR,VARIANT) PURE;
  169.     STDMETHOD(GetProperty)(THIS_ BSTR,VARIANT*) PURE;
  170.     STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
  171.     STDMETHOD(get_HWND)(THIS_ long*) PURE;
  172.     STDMETHOD(get_FullName)(THIS_ BSTR*) PURE;
  173.     STDMETHOD(get_Path)(THIS_ BSTR*) PURE;
  174.     STDMETHOD(get_Visible)(THIS_ VARIANT_BOOL*) PURE;
  175.     STDMETHOD(put_Visible)(THIS_ VARIANT_BOOL) PURE;
  176.     STDMETHOD(get_StatusBar)(THIS_ VARIANT_BOOL*) PURE;
  177.     STDMETHOD(put_StatusBar)(THIS_ VARIANT_BOOL) PURE;
  178.     STDMETHOD(get_StatusText)(THIS_ BSTR*) PURE;
  179.     STDMETHOD(put_StatusText)(THIS_ BSTR) PURE;
  180.     STDMETHOD(get_ToolBar)(THIS_ int*) PURE;
  181.     STDMETHOD(put_ToolBar)(THIS_ int) PURE;
  182.     STDMETHOD(get_MenuBar)(THIS_ VARIANT_BOOL*) PURE;
  183.     STDMETHOD(put_MenuBar)(THIS_ VARIANT_BOOL) PURE;
  184.     STDMETHOD(get_FullScreen)(THIS_ VARIANT_BOOL*) PURE;
  185.     STDMETHOD(put_FullScreen)(THIS_ VARIANT_BOOL) PURE;
  186.  
  187.     STDMETHOD(Navigate2)(THIS_ VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
  188.     STDMETHOD(QueryStatusWB)(THIS_ OLECMDID,OLECMDF*) PURE;
  189.     STDMETHOD(ExecWB)(THIS_ OLECMDID,OLECMDEXECOPT,VARIANT*,VARIANT*) PURE;
  190.     STDMETHOD(ShowBrowserBar)(THIS_ VARIANT*,VARIANT*,VARIANT*) PURE;
  191.     STDMETHOD(get_ReadyState)(THIS_ READYSTATE*) PURE;
  192.     STDMETHOD(get_Offline)(THIS_ VARIANT_BOOL*) PURE;
  193.     STDMETHOD(put_Offline)(THIS_ VARIANT_BOOL) PURE;
  194.     STDMETHOD(get_Silent)(THIS_ VARIANT_BOOL*) PURE;
  195.     STDMETHOD(put_Silent)(THIS_ VARIANT_BOOL) PURE;
  196.     STDMETHOD(get_RegistaerAsBrowser)(THIS_ VARIANT_BOOL*) PURE;
  197.     STDMETHOD(put_RegisterAsBrowser)(THIS_ VARIANT_BOOL) PURE;
  198.     STDMETHOD(get_RegistaerAsDropTarget)(THIS_ VARIANT_BOOL*) PURE;
  199.     STDMETHOD(put_RegisterAsDropTarget)(THIS_ VARIANT_BOOL) PURE;
  200.     STDMETHOD(get_TheaterMode)(THIS_ VARIANT_BOOL*) PURE;
  201.     STDMETHOD(put_TheaterMode)(THIS_ VARIANT_BOOL) PURE;
  202.     STDMETHOD(get_AddressBar)(THIS_ VARIANT_BOOL*) PURE;
  203.     STDMETHOD(put_AddressBar)(THIS_ VARIANT_BOOL) PURE;
  204.     STDMETHOD(get_Resizable)(THIS_ VARIANT_BOOL*) PURE;
  205.     STDMETHOD(put_Resizable)(THIS_ VARIANT_BOOL) PURE;
  206. };
  207.  
  208. #define STDDISP(m) STDMETHOD_(void,m)
  209.  
  210. EXTERN_C const IID DIID_DWebBrowserEvents2;
  211. #undef INTERFACE
  212. #define INTERFACE DWebBrowserEvents2
  213. DECLARE_INTERFACE_(DWebBrowserEvents2,IDispatch)
  214. {
  215.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  216.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  217.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  218.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  219.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  220.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  221.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  222.  
  223.     STDDISP(StatusTextChange)(THIS_ BSTR) PURE;
  224.     STDDISP(ProgressChange)(THIS_ long,long) PURE;
  225.     STDDISP(CommandStateChange)(THIS_ long,VARIANT_BOOL) PURE;
  226.     STDDISP(DownloadBegin)(THIS) PURE;
  227.     STDDISP(DownloadComplete)(THIS) PURE;
  228.     STDDISP(TitleChange)(THIS_ BSTR) PURE;
  229.     STDDISP(PropertyChange)(THIS_ BSTR) PURE;
  230.     STDDISP(BeforeNavigate2)(THIS_ IDispatch*,VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT_BOOL*) PURE;
  231.     STDDISP(NewWindow2)(THIS_ IDispatch**,VARIANT_BOOL*) PURE;
  232.     STDDISP(NavigateComplete)(THIS_ IDispatch*,VARIANT*) PURE;
  233.     STDDISP(DocumentComplete)(THIS_ IDispatch*,VARIANT*) PURE;
  234.     STDDISP(OnQuit)(THIS) PURE;
  235.     STDDISP(OnVisible)(THIS_ VARIANT_BOOL) PURE;
  236.     STDDISP(OnToolBar)(THIS_ VARIANT_BOOL) PURE;
  237.     STDDISP(OnMenuBar)(THIS_ VARIANT_BOOL) PURE;
  238.     STDDISP(OnStatusBar)(THIS_ VARIANT_BOOL) PURE;
  239.     STDDISP(OnFullScreen)(THIS_ VARIANT_BOOL) PURE;
  240.     STDDISP(OnTheaterMode)(THIS_ VARIANT_BOOL) PURE;
  241.     STDDISP(WindowSetResizable)(THIS_ VARIANT_BOOL) PURE;
  242.     STDDISP(WindowSetLeft)(THIS_ long) PURE;
  243.     STDDISP(WindowSetTop)(THIS_ long) PURE;
  244.     STDDISP(WindowSetWidth)(THIS_ long) PURE;
  245.     STDDISP(WindowSetHeight)(THIS_ long) PURE;
  246.     STDDISP(WindowClosing)(THIS_ VARIANT_BOOL,VARIANT_BOOL*) PURE;
  247.     STDDISP(ClientToHostWindow)(THIS_ long*,long*) PURE;
  248.     STDDISP(SetSecureLockIcon)(THIS_ long) PURE;
  249.     STDDISP(FileDownload)(THIS_ VARIANT_BOOL*) PURE;
  250. };
  251.  
  252. #undef STDDISP
  253.  
  254. #ifdef __cplusplus
  255. }
  256. #endif
  257. #endif
  258.