ReactOS 0.4.15-dev-8102-g108db8f
events.c File Reference
#include "precomp.h"
#include <docobj.h>
Include dependency graph for events.c:

Go to the source code of this file.

Classes

struct  xy_test_t
 

Macros

#define DEFINE_EXPECT(func)    static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
#define SET_EXPECT(func)    do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
 
#define CHECK_EXPECT2(func)
 
#define CHECK_EXPECT(func)
 
#define CHECK_CALLED(func)
 
#define test_disp(u, id)   _test_disp(__LINE__,u,id)
 
#define get_doc3_iface(u)   _get_doc3_iface(__LINE__,u)
 
#define get_elem_iface(u)   _get_elem_iface(__LINE__,u)
 
#define get_elem2_iface(u)   _get_elem2_iface(__LINE__,u)
 
#define get_elem3_iface(u)   _get_elem3_iface(__LINE__,u)
 
#define get_iframe_iface(u)   _get_iframe_iface(__LINE__,u)
 
#define doc_get_body(d)   _doc_get_body(__LINE__,d)
 
#define get_elem_id(d, i)   _get_elem_id(__LINE__,d,i)
 
#define test_elem_tag(u, n)   _test_elem_tag(__LINE__,u,n)
 
#define get_event_obj()   _get_event_obj(__LINE__)
 
#define elem_fire_event(a, b, c)   _elem_fire_event(__LINE__,a,b,c)
 
#define test_event_args(a, b, c, d, e, f, g)   _test_event_args(__LINE__,a,b,c,d,e,f,g)
 
#define test_attached_event_args(a, b, c, d, e)   _test_attached_event_args(__LINE__,a,b,c,d,e)
 
#define get_event_src()   _get_event_src(__LINE__)
 
#define test_event_src(t)   _test_event_src(__LINE__,t)
 
#define test_event_cancelbubble(a, b)   _test_event_cancelbubble(__LINE__,a,b)
 
#define test_event_obj(t, x)   _test_event_obj(__LINE__,t,x)
 
#define elem_attach_event(a, b, c)   _elem_attach_event(__LINE__,a,b,c)
 
#define elem_detach_event(a, b, c)   _elem_detach_event(__LINE__,a,b,c)
 
#define doc_attach_event(a, b, c)   _doc_attach_event(__LINE__,a,b,c)
 
#define doc_detach_event(a, b, c)   _doc_detach_event(__LINE__,a,b,c)
 
#define EVENT_HANDLER_FUNC_OBJ(event)
 
#define CONNECTION_POINT_OBJ(cpname, diid)
 
#define test_cp_args(a, b, c, d, e, f)   _test_cp_args(__LINE__,a,b,c,d,e,f)
 
#define test_cp_eventarg(a, b, c, d, e, f)   _test_cp_eventarg(__LINE__,a,b,c,d,e,f)
 

Typedefs

typedef void(* testfunc_t) (IHTMLDocument2 *)
 

Functions

 DEFINE_EXPECT (document_onclick)
 
 DEFINE_EXPECT (body_onclick)
 
 DEFINE_EXPECT (doc_onclick_attached)
 
 DEFINE_EXPECT (div_onclick)
 
 DEFINE_EXPECT (div_onclick_attached)
 
 DEFINE_EXPECT (timeout)
 
 DEFINE_EXPECT (doccp_onclick)
 
 DEFINE_EXPECT (doccp_onclick_cancel)
 
 DEFINE_EXPECT (div_onclick_disp)
 
 DEFINE_EXPECT (invoke_onclick)
 
 DEFINE_EXPECT (iframe_onreadystatechange_loading)
 
 DEFINE_EXPECT (iframe_onreadystatechange_interactive)
 
 DEFINE_EXPECT (iframe_onreadystatechange_complete)
 
 DEFINE_EXPECT (iframedoc_onreadystatechange)
 
 DEFINE_EXPECT (img_onload)
 
 DEFINE_EXPECT (img_onerror)
 
 DEFINE_EXPECT (input_onfocus)
 
 DEFINE_EXPECT (input_onblur)
 
 DEFINE_EXPECT (form_onsubmit)
 
 DEFINE_EXPECT (form_onclick)
 
 DEFINE_EXPECT (submit_onclick)
 
 DEFINE_EXPECT (submit_onclick_cancel)
 
 DEFINE_EXPECT (submit_onclick_attached)
 
 DEFINE_EXPECT (submit_onclick_attached_check_cancel)
 
 DEFINE_EXPECT (submit_onclick_setret)
 
 DEFINE_EXPECT (elem2_cp_onclick)
 
 DEFINE_EXPECT (iframe_onload)
 
static int strcmp_wa (LPCWSTR strw, const char *stra)
 
static BSTR a2bstr (const char *str)
 
static BOOL iface_cmp (IUnknown *iface1, IUnknown *iface2)
 
static void _test_disp (unsigned line, IUnknown *unk, const IID *diid)
 
static IHTMLDocument3 * _get_doc3_iface (unsigned line, IUnknown *unk)
 
static IHTMLElement * _get_elem_iface (unsigned line, IUnknown *unk)
 
static IHTMLElement2 * _get_elem2_iface (unsigned line, IUnknown *unk)
 
static IHTMLElement3 * _get_elem3_iface (unsigned line, IUnknown *unk)
 
static IHTMLIFrameElement * _get_iframe_iface (unsigned line, IUnknown *unk)
 
static IHTMLElement * _doc_get_body (unsigned line, IHTMLDocument2 *doc)
 
static IHTMLElement * _get_elem_id (unsigned line, IHTMLDocument2 *doc, const char *id)
 
static void _test_elem_tag (unsigned line, IUnknown *unk, const char *extag)
 
static IHTMLEventObj * _get_event_obj (unsigned line)
 
static void _elem_fire_event (unsigned line, IUnknown *unk, const char *event, VARIANT *evobj)
 
static void _test_event_args (unsigned line, const IID *dispiid, DISPID id, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
static void _test_attached_event_args (unsigned line, DISPID id, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei)
 
static IHTMLElement * _get_event_src (unsigned line)
 
static void _test_event_src (unsigned line, const char *src_tag)
 
static void _test_event_altkey (unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
 
static void _test_event_ctrlkey (unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
 
static void _test_event_shiftkey (unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
 
static void _test_event_cancelbubble (unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
 
static void _test_event_fromelem (unsigned line, IHTMLEventObj *event, const char *from_tag)
 
static void _test_event_toelem (unsigned line, IHTMLEventObj *event, const char *to_tag)
 
static void _test_event_keycode (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_button (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_reason (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_x (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_y (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_clientx (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_clienty (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_offsetx (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_offsety (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_screenx (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_screeny (unsigned line, IHTMLEventObj *event, LONG exl)
 
static void _test_event_type (unsigned line, IHTMLEventObj *event, const char *exstr)
 
static void _test_event_qualifier (unsigned line, IHTMLEventObj *event, const char *exstr)
 
static void _test_event_srcfilter (unsigned line, IHTMLEventObj *event)
 
static void _test_event_obj (unsigned line, const char *type, const xy_test_t *xy)
 
static void _elem_attach_event (unsigned line, IUnknown *unk, const char *namea, IDispatch *disp)
 
static void _elem_detach_event (unsigned line, IUnknown *unk, const char *namea, IDispatch *disp)
 
static void _doc_attach_event (unsigned line, IHTMLDocument2 *doc, const char *namea, IDispatch *disp)
 
static void _doc_detach_event (unsigned line, IHTMLDocument2 *doc, const char *namea, IDispatch *disp)
 
static HRESULT WINAPI DispatchEx_QueryInterface (IDispatchEx *iface, REFIID riid, void **ppv)
 
static HRESULT WINAPI Dispatch_QueryInterface (IDispatchEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI DispatchEx_AddRef (IDispatchEx *iface)
 
static ULONG WINAPI DispatchEx_Release (IDispatchEx *iface)
 
static HRESULT WINAPI DispatchEx_GetTypeInfoCount (IDispatchEx *iface, UINT *pctinfo)
 
static HRESULT WINAPI DispatchEx_GetTypeInfo (IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI DispatchEx_GetIDsOfNames (IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI DispatchEx_Invoke (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI DispatchEx_GetDispID (IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
 
static HRESULT WINAPI DispatchEx_InvokeEx (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
static HRESULT WINAPI DispatchEx_DeleteMemberByName (IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
 
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID (IDispatchEx *iface, DISPID id)
 
static HRESULT WINAPI DispatchEx_GetMemberProperties (IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
 
static HRESULT WINAPI DispatchEx_GetMemberName (IDispatchEx *iface, DISPID id, BSTR *pbstrName)
 
static HRESULT WINAPI DispatchEx_GetNextDispID (IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
 
static HRESULT WINAPI DispatchEx_GetNameSpaceParent (IDispatchEx *iface, IUnknown **ppunk)
 
static HRESULT WINAPI document_onclick (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (document_onclick)
 
static HRESULT WINAPI div_onclick (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (div_onclick)
 
static HRESULT WINAPI div_onclick_attached (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (div_onclick_attached)
 
static HRESULT WINAPI doc_onclick_attached (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (doc_onclick_attached)
 
static HRESULT WINAPI body_onclick (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (body_onclick)
 
static HRESULT WINAPI img_onload (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (img_onload)
 
static HRESULT WINAPI img_onerror (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (img_onerror)
 
static HRESULT WINAPI input_onfocus (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (input_onfocus)
 
static HRESULT WINAPI input_onblur (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (input_onblur)
 
static HRESULT WINAPI form_onsubmit (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (form_onsubmit)
 
static HRESULT WINAPI form_onclick (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (form_onclick)
 
static HRESULT WINAPI submit_onclick (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (submit_onclick)
 
static HRESULT WINAPI iframe_onload (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (iframe_onload)
 
static HRESULT WINAPI submit_onclick_attached (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (submit_onclick_attached)
 
static HRESULT WINAPI submit_onclick_attached_check_cancel (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (submit_onclick_attached_check_cancel)
 
static HRESULT WINAPI submit_onclick_setret (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (submit_onclick_setret)
 
static HRESULT WINAPI submit_onclick_cancel (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (submit_onclick_cancel)
 
static HRESULT WINAPI iframedoc_onreadystatechange (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (iframedoc_onreadystatechange)
 
static HRESULT WINAPI iframe_onreadystatechange (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (iframe_onreadystatechange)
 
static HRESULT WINAPI nocall (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
 EVENT_HANDLER_FUNC_OBJ (nocall)
 
static void _test_cp_args (unsigned line, REFIID riid, WORD flags, DISPPARAMS *dp, VARIANT *vres, EXCEPINFO *ei, UINT *argerr)
 
static void _test_cp_eventarg (unsigned line, REFIID riid, WORD flags, DISPPARAMS *dp, VARIANT *vres, EXCEPINFO *ei, UINT *argerr)
 
static HRESULT WINAPI doccp (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr)
 
 CONNECTION_POINT_OBJ (doccp, DIID_HTMLDocumentEvents)
 
static HRESULT WINAPI doccp_onclick_cancel (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr)
 
 CONNECTION_POINT_OBJ (doccp_onclick_cancel, DIID_HTMLDocumentEvents)
 
static HRESULT WINAPI elem2_cp (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr)
 
 CONNECTION_POINT_OBJ (elem2_cp, DIID_HTMLElementEvents2)
 
static HRESULT WINAPI timeoutFunc_Invoke (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI div_onclick_disp_Invoke (IDispatchEx *iface, DISPID id, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, UINT *puArgErr)
 
static void pump_msgs (BOOL *b)
 
static IConnectionPointget_cp (IUnknown *unk, REFIID riid)
 
static DWORD register_cp (IUnknown *unk, REFIID riid, IUnknown *sink)
 
static void unregister_cp (IUnknown *unk, REFIID riid, DWORD cookie)
 
static HRESULT WINAPI EventDispatch_QueryInterface (IDispatch *iface, REFIID riid, void **ppv)
 
static DWORD WINAPI EventDispatch_AddRef (IDispatch *iface)
 
static DWORD WINAPI EventDispatch_Release (IDispatch *iface)
 
static HRESULT WINAPI EventDispatch_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI EventDispatch_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI EventDispatch_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI EventDispatch_Invoke (IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static void test_onclick (IHTMLDocument2 *doc)
 
static void test_onreadystatechange (IHTMLDocument2 *doc)
 
static void test_imgload (IHTMLDocument2 *doc)
 
static void test_focus (IHTMLDocument2 *doc)
 
static void test_submit (IHTMLDocument2 *doc)
 
static void test_timeout (IHTMLDocument2 *doc)
 
static IHTMLElement * find_element_by_id (IHTMLDocument2 *doc, const char *id)
 
static IHTMLDocument2 * get_iframe_doc (IHTMLIFrameElement *iframe)
 
static void test_iframe_connections (IHTMLDocument2 *doc)
 
static HRESULT QueryInterface (REFIID, void **)
 
static HRESULT WINAPI InPlaceFrame_QueryInterface (IOleInPlaceFrame *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InPlaceFrame_AddRef (IOleInPlaceFrame *iface)
 
static ULONG WINAPI InPlaceFrame_Release (IOleInPlaceFrame *iface)
 
static HRESULT WINAPI InPlaceFrame_GetWindow (IOleInPlaceFrame *iface, HWND *phwnd)
 
static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp (IOleInPlaceFrame *iface, BOOL fEnterMode)
 
static HRESULT WINAPI InPlaceFrame_GetBorder (IOleInPlaceFrame *iface, LPRECT lprectBorder)
 
static HRESULT WINAPI InPlaceFrame_RequestBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI InPlaceFrame_SetBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI InPlaceUIWindow_SetActiveObject (IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
 
static HRESULT WINAPI InPlaceFrame_SetActiveObject (IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
 
static HRESULT WINAPI InPlaceFrame_InsertMenus (IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
static HRESULT WINAPI InPlaceFrame_SetMenu (IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
 
static HRESULT WINAPI InPlaceFrame_RemoveMenus (IOleInPlaceFrame *iface, HMENU hmenuShared)
 
static HRESULT WINAPI InPlaceFrame_SetStatusText (IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
 
static HRESULT WINAPI InPlaceFrame_EnableModeless (IOleInPlaceFrame *iface, BOOL fEnable)
 
static HRESULT WINAPI InPlaceFrame_TranslateAccelerator (IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
 
static HRESULT WINAPI InPlaceSite_QueryInterface (IOleInPlaceSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InPlaceSite_AddRef (IOleInPlaceSite *iface)
 
static ULONG WINAPI InPlaceSite_Release (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_GetWindow (IOleInPlaceSite *iface, HWND *phwnd)
 
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp (IOleInPlaceSite *iface, BOOL fEnterMode)
 
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnUIActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_GetWindowContext (IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
static HRESULT WINAPI InPlaceSite_Scroll (IOleInPlaceSite *iface, SIZE scrollExtant)
 
static HRESULT WINAPI InPlaceSite_OnUIDeactivate (IOleInPlaceSite *iface, BOOL fUndoable)
 
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_DiscardUndoState (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnPosRectChange (IOleInPlaceSite *iface, LPCRECT lprcPosRect)
 
static HRESULT WINAPI ClientSite_QueryInterface (IOleClientSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClientSite_AddRef (IOleClientSite *iface)
 
static ULONG WINAPI ClientSite_Release (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_SaveObject (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_GetMoniker (IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmon)
 
static HRESULT WINAPI ClientSite_GetContainer (IOleClientSite *iface, IOleContainer **ppContainer)
 
static HRESULT WINAPI ClientSite_ShowObject (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_OnShowWindow (IOleClientSite *iface, BOOL fShow)
 
static HRESULT WINAPI ClientSite_RequestNewObjectLayout (IOleClientSite *iface)
 
static HRESULT WINAPI DocumentSite_QueryInterface (IOleDocumentSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI DocumentSite_AddRef (IOleDocumentSite *iface)
 
static ULONG WINAPI DocumentSite_Release (IOleDocumentSite *iface)
 
static HRESULT WINAPI DocumentSite_ActivateMe (IOleDocumentSite *iface, IOleDocumentView *pViewToActivate)
 
static HRESULT WINAPI PropertyNotifySink_QueryInterface (IPropertyNotifySink *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PropertyNotifySink_AddRef (IPropertyNotifySink *iface)
 
static ULONG WINAPI PropertyNotifySink_Release (IPropertyNotifySink *iface)
 
static HRESULT WINAPI PropertyNotifySink_OnChanged (IPropertyNotifySink *iface, DISPID dispID)
 
static HRESULT WINAPI PropertyNotifySink_OnRequestEdit (IPropertyNotifySink *iface, DISPID dispID)
 
static void doc_load_string (IHTMLDocument2 *doc, const char *str)
 
static void do_advise (IUnknown *unk, REFIID riid, IUnknown *unk_advise)
 
static void set_client_site (IHTMLDocument2 *doc, BOOL set)
 
static IHTMLDocument2 * create_document (void)
 
static void run_test (const char *str, testfunc_t test)
 
static LRESULT WINAPI wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static HWND create_container_window (void)
 
static void test_empty_document (void)
 
static BOOL check_ie (void)
 
 START_TEST (events)
 

Variables

static HWND container_hwnd = NULL
 
static IHTMLWindow2window
 
static IOleDocumentViewview
 
static BOOL is_ie9plus
 
static const xy_test_t no_xy = {-10,-10,-10,-10}
 
static const char empty_doc_str []
 
static const char click_doc_str []
 
static const char readystate_doc_str []
 
static const char img_doc_str []
 
static const char input_doc_str []
 
static const char iframe_doc_str []
 
static const char form_doc_str []
 
static VARIANT onclick_retval
 
static VARIANT onclick_event_retval
 
static const IDispatchExVtbl timeoutFuncVtbl
 
static IDispatchEx timeoutFunc = { &timeoutFuncVtbl }
 
static const IDispatchExVtbl div_onclick_dispVtbl
 
static IDispatchEx div_onclick_disp = { &div_onclick_dispVtbl }
 
static const IDispatchVtbl EventDispatchVtbl
 
static IDispatch EventDispatch = { &EventDispatchVtbl }
 
static const IOleInPlaceFrameVtbl InPlaceFrameVtbl
 
static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }
 
static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl
 
static IOleInPlaceFrame InPlaceUIWindow = { &InPlaceUIWindowVtbl }
 
static const IOleInPlaceSiteVtbl InPlaceSiteVtbl
 
static IOleInPlaceSite InPlaceSite = { &InPlaceSiteVtbl }
 
static const IOleClientSiteVtbl ClientSiteVtbl
 
static IOleClientSite ClientSite = { &ClientSiteVtbl }
 
static const IOleDocumentSiteVtbl DocumentSiteVtbl
 
static IOleDocumentSite DocumentSite = { &DocumentSiteVtbl }
 
static IHTMLDocument2 * notif_doc
 
static BOOL doc_complete
 
static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
 
static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }
 

Macro Definition Documentation

◆ CHECK_CALLED

#define CHECK_CALLED (   func)
Value:
do { \
ok(called_ ## func, "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define FALSE
Definition: types.h:117
GLenum func
Definition: glext.h:6028
#define expect_(expected, got, precision)
Definition: font.c:29

Definition at line 42 of file events.c.

◆ CHECK_EXPECT

#define CHECK_EXPECT (   func)
Value:
do { \
CHECK_EXPECT2(func); \
expect_ ## func = FALSE; \
}while(0)

Definition at line 36 of file events.c.

◆ CHECK_EXPECT2

#define CHECK_EXPECT2 (   func)
Value:
do { \
trace(#func "\n"); \
ok(expect_ ##func, "unexpected call " #func "\n"); \
called_ ## func = TRUE; \
}while(0)
#define TRUE
Definition: types.h:120

Definition at line 29 of file events.c.

◆ CONNECTION_POINT_OBJ

#define CONNECTION_POINT_OBJ (   cpname,
  diid 
)

Definition at line 1204 of file events.c.

◆ DEFINE_EXPECT

#define DEFINE_EXPECT (   func)     static BOOL expect_ ## func = FALSE, called_ ## func = FALSE

Definition at line 23 of file events.c.

◆ doc_attach_event

#define doc_attach_event (   a,
  b,
  c 
)    _doc_attach_event(__LINE__,a,b,c)

Definition at line 681 of file events.c.

◆ doc_detach_event

#define doc_detach_event (   a,
  b,
  c 
)    _doc_detach_event(__LINE__,a,b,c)

Definition at line 697 of file events.c.

◆ doc_get_body

#define doc_get_body (   d)    _doc_get_body(__LINE__,d)

Definition at line 246 of file events.c.

◆ elem_attach_event

#define elem_attach_event (   a,
  b,
  c 
)    _elem_attach_event(__LINE__,a,b,c)

Definition at line 651 of file events.c.

◆ elem_detach_event

#define elem_detach_event (   a,
  b,
  c 
)    _elem_detach_event(__LINE__,a,b,c)

Definition at line 667 of file events.c.

◆ elem_fire_event

#define elem_fire_event (   a,
  b,
  c 
)    _elem_fire_event(__LINE__,a,b,c)

Definition at line 305 of file events.c.

◆ EVENT_HANDLER_FUNC_OBJ

#define EVENT_HANDLER_FUNC_OBJ (   event)
Value:
static IDispatchExVtbl event ## FuncVtbl = { \
event, \
}; \
static IDispatchEx event ## _obj = { &event ## FuncVtbl };
struct _cl_event * event
Definition: glext.h:7739
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: events.c:808
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
Definition: events.c:749
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: events.c:767
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: events.c:802
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: events.c:826
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: events.c:783
static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: events.c:775
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: events.c:814
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: events.c:820
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: events.c:711
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
Definition: events.c:744
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: events.c:760
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: events.c:796
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: events.c:754

Definition at line 832 of file events.c.

◆ get_doc3_iface

#define get_doc3_iface (   u)    _get_doc3_iface(__LINE__,u)

Definition at line 186 of file events.c.

◆ get_elem2_iface

#define get_elem2_iface (   u)    _get_elem2_iface(__LINE__,u)

Definition at line 210 of file events.c.

◆ get_elem3_iface

#define get_elem3_iface (   u)    _get_elem3_iface(__LINE__,u)

Definition at line 222 of file events.c.

◆ get_elem_id

#define get_elem_id (   d,
  i 
)    _get_elem_id(__LINE__,d,i)

Definition at line 259 of file events.c.

◆ get_elem_iface

#define get_elem_iface (   u)    _get_elem_iface(__LINE__,u)

Definition at line 198 of file events.c.

◆ get_event_obj

#define get_event_obj ( )    _get_event_obj(__LINE__)

Definition at line 291 of file events.c.

◆ get_event_src

#define get_event_src ( )    _get_event_src(__LINE__)

Definition at line 365 of file events.c.

◆ get_iframe_iface

#define get_iframe_iface (   u)    _get_iframe_iface(__LINE__,u)

Definition at line 234 of file events.c.

◆ SET_EXPECT

#define SET_EXPECT (   func)     do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)

Definition at line 26 of file events.c.

◆ test_attached_event_args

#define test_attached_event_args (   a,
  b,
  c,
  d,
  e 
)    _test_attached_event_args(__LINE__,a,b,c,d,e)

Definition at line 341 of file events.c.

◆ test_cp_args

#define test_cp_args (   a,
  b,
  c,
  d,
  e,
  f 
)    _test_cp_args(__LINE__,a,b,c,d,e,f)

Definition at line 1237 of file events.c.

◆ test_cp_eventarg

#define test_cp_eventarg (   a,
  b,
  c,
  d,
  e,
  f 
)    _test_cp_eventarg(__LINE__,a,b,c,d,e,f)

Definition at line 1253 of file events.c.

◆ test_disp

#define test_disp (   u,
  id 
)    _test_disp(__LINE__,u,id)

Definition at line 150 of file events.c.

◆ test_elem_tag

#define test_elem_tag (   u,
  n 
)    _test_elem_tag(__LINE__,u,n)

Definition at line 276 of file events.c.

◆ test_event_args

#define test_event_args (   a,
  b,
  c,
  d,
  e,
  f,
  g 
)    _test_event_args(__LINE__,a,b,c,d,e,f,g)

Definition at line 321 of file events.c.

◆ test_event_cancelbubble

#define test_event_cancelbubble (   a,
  b 
)    _test_event_cancelbubble(__LINE__,a,b)

Definition at line 423 of file events.c.

◆ test_event_obj

#define test_event_obj (   t,
  x 
)    _test_event_obj(__LINE__,t,x)

Definition at line 615 of file events.c.

◆ test_event_src

#define test_event_src (   t)    _test_event_src(__LINE__,t)

Definition at line 379 of file events.c.

Typedef Documentation

◆ testfunc_t

typedef void(* testfunc_t) (IHTMLDocument2 *)

Definition at line 2746 of file events.c.

Function Documentation

◆ _doc_attach_event()

static void _doc_attach_event ( unsigned  line,
IHTMLDocument2 *  doc,
const char namea,
IDispatch disp 
)
static

Definition at line 682 of file events.c.

683{
684 IHTMLDocument3 *doc3 = _get_doc3_iface(line, (IUnknown*)doc);
686 BSTR name;
688
689 name = a2bstr(namea);
690 hres = IHTMLDocument3_attachEvent(doc3, name, disp, &res);
691 IHTMLDocument3_Release(doc3);
693 ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08x\n", hres);
694 ok_(__FILE__,line)(res == VARIANT_TRUE, "attachEvent returned %x\n", res);
695}
#define ok_(x1, x2)
Definition: atltest.h:61
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
GLuint res
Definition: glext.h:9613
#define S_OK
Definition: intsafe.h:52
HRESULT hres
Definition: protocol.c:465
static IHTMLDocument3 * _get_doc3_iface(unsigned line, IUnknown *unk)
Definition: events.c:187
static BSTR a2bstr(const char *str)
Definition: events.c:123
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
Definition: parser.c:49
Definition: name.c:39

◆ _doc_detach_event()

static void _doc_detach_event ( unsigned  line,
IHTMLDocument2 *  doc,
const char namea,
IDispatch disp 
)
static

Definition at line 698 of file events.c.

699{
700 IHTMLDocument3 *doc3 = _get_doc3_iface(line, (IUnknown*)doc);
701 BSTR name;
703
704 name = a2bstr(namea);
705 hres = IHTMLDocument3_detachEvent(doc3, name, disp);
706 IHTMLDocument3_Release(doc3);
708 ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08x\n", hres);
709}

◆ _doc_get_body()

static IHTMLElement * _doc_get_body ( unsigned  line,
IHTMLDocument2 *  doc 
)
static

Definition at line 247 of file events.c.

248{
249 IHTMLElement *body = NULL;
251
252 hres = IHTMLDocument2_get_body(doc, &body);
253 ok_(__FILE__,line) (hres == S_OK, "get_body failed: %08x\n", hres);
254 ok_(__FILE__,line) (body != NULL, "body == NULL\n");
255
256 return body;
257}
#define NULL
Definition: types.h:112
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100

◆ _elem_attach_event()

static void _elem_attach_event ( unsigned  line,
IUnknown unk,
const char namea,
IDispatch disp 
)
static

Definition at line 652 of file events.c.

653{
654 IHTMLElement2 *elem = _get_elem2_iface(line, unk);
656 BSTR name;
658
659 name = a2bstr(namea);
660 hres = IHTMLElement2_attachEvent(elem, name, disp, &res);
661 IHTMLElement2_Release(elem);
663 ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08x\n", hres);
664 ok_(__FILE__,line)(res == VARIANT_TRUE, "attachEvent returned %x\n", res);
665}
static IHTMLElement2 * _get_elem2_iface(unsigned line, IUnknown *unk)
Definition: events.c:211
static size_t elem
Definition: string.c:68

◆ _elem_detach_event()

static void _elem_detach_event ( unsigned  line,
IUnknown unk,
const char namea,
IDispatch disp 
)
static

Definition at line 668 of file events.c.

669{
670 IHTMLElement2 *elem = _get_elem2_iface(line, unk);
671 BSTR name;
673
674 name = a2bstr(namea);
675 hres = IHTMLElement2_detachEvent(elem, name, disp);
676 IHTMLElement2_Release(elem);
678 ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08x\n", hres);
679}

◆ _elem_fire_event()

static void _elem_fire_event ( unsigned  line,
IUnknown unk,
const char event,
VARIANT evobj 
)
static

Definition at line 306 of file events.c.

307{
308 IHTMLElement3 *elem3 = _get_elem3_iface(line, unk);
310 BSTR str;
312
313 b = 100;
314 str = a2bstr(event);
315 hres = IHTMLElement3_fireEvent(elem3, str, evobj, &b);
317 ok_(__FILE__,line)(hres == S_OK, "fireEvent failed: %08x\n", hres);
318 ok_(__FILE__,line)(b == VARIANT_TRUE, "fireEvent returned %x\n", b);
319}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define b
Definition: ke_i.h:79
static IHTMLElement3 * _get_elem3_iface(unsigned line, IUnknown *unk)
Definition: events.c:223
const WCHAR * str

◆ _get_doc3_iface()

static IHTMLDocument3 * _get_doc3_iface ( unsigned  line,
IUnknown unk 
)
static

Definition at line 187 of file events.c.

188{
189 IHTMLDocument3 *doc3;
191
192 hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument3, (void**)&doc3);
193 ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres);
194
195 return doc3;
196}

Referenced by _doc_attach_event(), _doc_detach_event(), and _get_elem_id().

◆ _get_elem2_iface()

static IHTMLElement2 * _get_elem2_iface ( unsigned  line,
IUnknown unk 
)
static

Definition at line 211 of file events.c.

212{
213 IHTMLElement2 *elem2;
215
216 hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement2, (void**)&elem2);
217 ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres);
218
219 return elem2;
220}

Referenced by _elem_attach_event(), and _elem_detach_event().

◆ _get_elem3_iface()

static IHTMLElement3 * _get_elem3_iface ( unsigned  line,
IUnknown unk 
)
static

Definition at line 223 of file events.c.

224{
225 IHTMLElement3 *elem3;
227
228 hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement3, (void**)&elem3);
229 ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3 iface: %08x\n", hres);
230
231 return elem3;
232}

Referenced by _elem_fire_event().

◆ _get_elem_id()

static IHTMLElement * _get_elem_id ( unsigned  line,
IHTMLDocument2 *  doc,
const char id 
)
static

Definition at line 260 of file events.c.

261{
262 IHTMLDocument3 *doc3 = _get_doc3_iface(line, (IUnknown*)doc);
263 IHTMLElement *elem;
264 BSTR str;
266
267 str = a2bstr(id);
268 hres = IHTMLDocument3_getElementById(doc3, str, &elem);
270 IHTMLDocument3_Release(doc3);
271 ok_(__FILE__,line) (hres == S_OK, "getElementById failed: %08x\n", hres);
272
273 return elem;
274}

◆ _get_elem_iface()

static IHTMLElement * _get_elem_iface ( unsigned  line,
IUnknown unk 
)
static

Definition at line 199 of file events.c.

200{
201 IHTMLElement *elem;
203
204 hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement, (void**)&elem);
205 ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement iface: %08x\n", hres);
206
207 return elem;
208}

Referenced by _test_elem_tag().

◆ _get_event_obj()

static IHTMLEventObj * _get_event_obj ( unsigned  line)
static

Definition at line 292 of file events.c.

293{
294 IHTMLEventObj *event = NULL;
296
297 hres = IHTMLWindow2_get_event(window, &event);
298 ok_(__FILE__,line) (hres == S_OK, "get_event failed: %08x\n", hres);
299 ok_(__FILE__,line) (event != NULL, "event = NULL\n");
300 _test_disp(line, (IUnknown*)event, &DIID_DispCEventObj);
301
302 return event;
303}
static IHTMLWindow2 * window
Definition: events.c:77
static void _test_disp(unsigned line, IUnknown *unk, const IID *diid)
Definition: events.c:151

Referenced by _get_event_src(), _test_attached_event_args(), _test_cp_eventarg(), and _test_event_obj().

◆ _get_event_src()

static IHTMLElement * _get_event_src ( unsigned  line)
static

Definition at line 366 of file events.c.

367{
368 IHTMLEventObj *event = _get_event_obj(line);
369 IHTMLElement *src_elem = NULL;
371
372 hres = IHTMLEventObj_get_srcElement(event, &src_elem);
373 IHTMLEventObj_Release(event);
374 ok_(__FILE__,line) (hres == S_OK, "get_srcElement failed: %08x\n", hres);
375
376 return src_elem;
377}
static IHTMLEventObj * _get_event_obj(unsigned line)
Definition: events.c:292

Referenced by _test_event_src().

◆ _get_iframe_iface()

static IHTMLIFrameElement * _get_iframe_iface ( unsigned  line,
IUnknown unk 
)
static

Definition at line 235 of file events.c.

236{
237 IHTMLIFrameElement *iframe;
239
240 hres = IUnknown_QueryInterface(unk, &IID_IHTMLIFrameElement, (void**)&iframe);
241 ok_(__FILE__,line)(hres == S_OK, "QueryInterface(IID_IHTMLIFrameElement) failed: %08x\n", hres);
242
243 return iframe;
244}

◆ _test_attached_event_args()

static void _test_attached_event_args ( unsigned  line,
DISPID  id,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei 
)
static

Definition at line 342 of file events.c.

344{
345 IHTMLEventObj *event;
346
347 ok(id == DISPID_VALUE, "id = %d\n", id);
348 ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
349 ok(pdp != NULL, "pDispParams == NULL\n");
350 ok(pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs);
351 ok(!pdp->cNamedArgs, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
352 ok(!pdp->rgdispidNamedArgs, "pdp->rgdispidNamedArgs = %p\n", pdp->rgdispidNamedArgs);
353 ok(pdp->rgvarg != NULL, "rgvarg = NULL\n");
354 ok(pvarRes != NULL, "pvarRes = NULL\n");
355 ok(pei != NULL, "pei = NULL\n");
356 ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pVarRes) = %d\n", V_VT(pvarRes));
357 ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(pdp->rgvarg) = %d\n", V_VT(pdp->rgvarg));
358 ok(V_DISPATCH(pdp->rgvarg) != NULL, "V_DISPATCH(pdp->rgvarg) = %p\n", V_DISPATCH(pdp->rgvarg));
359
360 event = _get_event_obj(line);
361 ok(iface_cmp((IUnknown*)event, (IUnknown*)V_DISPATCH(pdp->rgvarg)), "event != arg0\n");
362 IHTMLEventObj_Release(event);
363}
#define ok(value,...)
Definition: atltest.h:57
@ VT_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
Definition: events.c:135
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_VT(A)
Definition: oleauto.h:211
#define V_DISPATCH(A)
Definition: oleauto.h:239
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ _test_cp_args()

static void _test_cp_args ( unsigned  line,
REFIID  riid,
WORD  flags,
DISPPARAMS *  dp,
VARIANT vres,
EXCEPINFO *  ei,
UINT argerr 
)
static

Definition at line 1238 of file events.c.

1239{
1240 ok_(__FILE__,line)(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", wine_dbgstr_guid(riid));
1241 ok_(__FILE__,line)(flags == DISPATCH_METHOD, "flags = %x\n", flags);
1242 ok_(__FILE__,line)(dp != NULL, "dp == NULL\n");
1243 ok_(__FILE__,line)(!dp->cArgs, "dp->cArgs = %d\n", dp->cArgs);
1244 ok_(__FILE__,line)(!dp->rgvarg, "dp->rgvarg = %p\n", dp->rgvarg);
1245 ok_(__FILE__,line)(!dp->cNamedArgs, "dp->cNamedArgs = %d\n", dp->cNamedArgs);
1246 ok_(__FILE__,line)(!dp->rgdispidNamedArgs, "dp->rgdispidNamedArgs = %p\n", dp->rgdispidNamedArgs);
1247 ok_(__FILE__,line)(vres != NULL, "vres == NULL\n");
1248 ok_(__FILE__,line)(V_VT(vres) == VT_EMPTY, "V_VT(vres) = %d\n", V_VT(vres));
1249 ok_(__FILE__,line)(ei != NULL, "ei == NULL\n");
1250 ok_(__FILE__,line)(argerr != NULL, "argerr == NULL\n");
1251}
GLbitfield flags
Definition: glext.h:7161
REFIID riid
Definition: atlbase.h:39
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IID_NULL
Definition: guiddef.h:98
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197

◆ _test_cp_eventarg()

static void _test_cp_eventarg ( unsigned  line,
REFIID  riid,
WORD  flags,
DISPPARAMS *  dp,
VARIANT vres,
EXCEPINFO *  ei,
UINT argerr 
)
static

Definition at line 1254 of file events.c.

1255{
1256 IHTMLEventObj *event;
1257
1258 ok_(__FILE__,line)(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", wine_dbgstr_guid(riid));
1259 ok_(__FILE__,line)(flags == DISPATCH_METHOD, "flags = %x\n", flags);
1260 ok_(__FILE__,line)(dp != NULL, "dp == NULL\n");
1261 ok_(__FILE__,line)(dp->cArgs == 1, "dp->cArgs = %d\n", dp->cArgs);
1262 ok_(__FILE__,line)(dp->rgvarg != NULL, "dp->rgvarg = %p\n", dp->rgvarg);
1263 ok_(__FILE__,line)(!dp->cNamedArgs, "dp->cNamedArgs = %d\n", dp->cNamedArgs);
1264 ok_(__FILE__,line)(!dp->rgdispidNamedArgs, "dp->rgdispidNamedArgs = %p\n", dp->rgdispidNamedArgs);
1265 ok_(__FILE__,line)(vres != NULL, "vres == NULL\n");
1266 ok_(__FILE__,line)(V_VT(vres) == VT_EMPTY, "V_VT(vres) = %d\n", V_VT(vres));
1267 ok_(__FILE__,line)(ei != NULL, "ei == NULL\n");
1268 ok_(__FILE__,line)(argerr != NULL, "argerr == NULL\n");
1269
1270 ok(V_VT(dp->rgvarg) == VT_DISPATCH, "V_VT(dp->rgvarg) = %d\n", V_VT(dp->rgvarg));
1271 ok(V_DISPATCH(dp->rgvarg) != NULL, "V_DISPATCH(dp->rgvarg) = %p\n", V_DISPATCH(dp->rgvarg));
1272
1273 event = _get_event_obj(line);
1274 ok(iface_cmp((IUnknown*)event, (IUnknown*)V_DISPATCH(dp->rgvarg)), "event != arg0\n");
1275 IHTMLEventObj_Release(event);
1276}

◆ _test_disp()

static void _test_disp ( unsigned  line,
IUnknown unk,
const IID diid 
)
static

Definition at line 151 of file events.c.

152{
153 IDispatchEx *dispex;
155 UINT ticnt;
157
158 hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex);
159 ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres);
160 if(FAILED(hres))
161 return;
162
163 ticnt = 0xdeadbeef;
164 hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
165 ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres);
166 ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt);
167
168 hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo);
169 ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres);
170
171 if(SUCCEEDED(hres)) {
172 TYPEATTR *type_attr;
173
174 hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr);
175 ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres);
176 ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid), "unexpected guid %s\n",
177 wine_dbgstr_guid(&type_attr->guid));
178
179 ITypeInfo_ReleaseTypeAttr(typeinfo, type_attr);
180 ITypeInfo_Release(typeinfo);
181 }
182
183 IDispatchEx_Release(dispex);
184}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
unsigned int UINT
Definition: ndis.h:50

Referenced by _get_event_obj(), and _test_event_args().

◆ _test_elem_tag()

static void _test_elem_tag ( unsigned  line,
IUnknown unk,
const char extag 
)
static

Definition at line 277 of file events.c.

278{
279 IHTMLElement *elem = _get_elem_iface(line, unk);
280 BSTR tag;
282
283 hres = IHTMLElement_get_tagName(elem, &tag);
284 IHTMLElement_Release(elem);
285 ok_(__FILE__, line) (hres == S_OK, "get_tagName failed: %08x\n", hres);
286 ok_(__FILE__, line) (!strcmp_wa(tag, extag), "got tag: %s, expected %s\n", wine_dbgstr_w(tag), extag);
287
289}
#define wine_dbgstr_w
Definition: kernel32.h:34
static IHTMLElement * _get_elem_iface(unsigned line, IUnknown *unk)
Definition: events.c:199
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: events.c:116
Definition: ecma_167.h:138

Referenced by _test_event_fromelem(), _test_event_src(), and _test_event_toelem().

◆ _test_event_altkey()

static void _test_event_altkey ( unsigned  line,
IHTMLEventObj *  event,
VARIANT_BOOL  exval 
)
static

Definition at line 393 of file events.c.

394{
397
398 hres = IHTMLEventObj_get_altKey(event, &b);
399 ok_(__FILE__,line)(hres == S_OK, "get_altKey failed: %08x\n", hres);
400 ok_(__FILE__,line)(b == exval, "altKey = %x, expected %x\n", b, exval);
401}

Referenced by _test_event_obj().

◆ _test_event_args()

static void _test_event_args ( unsigned  line,
const IID dispiid,
DISPID  id,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 322 of file events.c.

324{
325 ok_(__FILE__,line) (id == DISPID_VALUE, "id = %d\n", id);
326 ok_(__FILE__,line) (wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
327 ok_(__FILE__,line) (pdp != NULL, "pdp == NULL\n");
328 ok_(__FILE__,line) (pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs);
329 ok_(__FILE__,line) (pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
330 ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n",
331 pdp->rgdispidNamedArgs[0]);
332 ok_(__FILE__,line) (V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg));
333 ok_(__FILE__,line) (pvarRes != NULL, "pvarRes == NULL\n");
334 ok_(__FILE__,line) (pei != NULL, "pei == NULL");
335 ok_(__FILE__,line) (!pspCaller, "pspCaller != NULL\n");
336
337 if(dispiid)
338 _test_disp(line, (IUnknown*)V_DISPATCH(pdp->rgvarg), dispiid);
339}
GLuint id
Definition: glext.h:5910
#define DISPID_THIS
Definition: olectl.h:395

◆ _test_event_button()

static void _test_event_button ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 474 of file events.c.

475{
476 LONG l;
478
479 hres = IHTMLEventObj_get_button(event, &l);
480 ok_(__FILE__,line)(hres == S_OK, "get_button failed: %08x\n", hres);
481 ok_(__FILE__,line)(l == exl, "button = %x, expected %x\n", l, exl);
482}
r l[0]
Definition: byte_order.h:168
long LONG
Definition: pedump.c:60

Referenced by _test_event_obj().

◆ _test_event_cancelbubble()

static void _test_event_cancelbubble ( unsigned  line,
IHTMLEventObj *  event,
VARIANT_BOOL  exval 
)
static

Definition at line 424 of file events.c.

425{
428
429 hres = IHTMLEventObj_get_cancelBubble(event, &b);
430 ok_(__FILE__,line)(hres == S_OK, "get_cancelBubble failed: %08x\n", hres);
431 ok_(__FILE__,line)(b == exval, "cancelBubble = %x, expected %x\n", b, exval);
432}

Referenced by _test_event_obj().

◆ _test_event_clientx()

static void _test_event_clientx ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 516 of file events.c.

517{
518 LONG l;
520
521 hres = IHTMLEventObj_get_clientX(event, &l);
522 ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08x\n", hres);
523 if(exl != -10) /* don't test the exact value */
524 ok_(__FILE__,line)(l == exl, "clientX = %d, expected %d\n", l, exl);
525}

Referenced by _test_event_obj().

◆ _test_event_clienty()

static void _test_event_clienty ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 527 of file events.c.

528{
529 LONG l;
531
532 hres = IHTMLEventObj_get_clientY(event, &l);
533 ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08x\n", hres);
534 if(exl != -10) /* don't test the exact value */
535 ok_(__FILE__,line)(l == exl, "clientY = %d, expected %d\n", l, exl);
536}

Referenced by _test_event_obj().

◆ _test_event_ctrlkey()

static void _test_event_ctrlkey ( unsigned  line,
IHTMLEventObj *  event,
VARIANT_BOOL  exval 
)
static

Definition at line 403 of file events.c.

404{
407
408 hres = IHTMLEventObj_get_ctrlKey(event, &b);
409 ok_(__FILE__,line)(hres == S_OK, "get_ctrlKey failed: %08x\n", hres);
410 ok_(__FILE__,line)(b == exval, "ctrlKey = %x, expected %x\n", b, exval);
411}

Referenced by _test_event_obj().

◆ _test_event_fromelem()

static void _test_event_fromelem ( unsigned  line,
IHTMLEventObj *  event,
const char from_tag 
)
static

Definition at line 434 of file events.c.

435{
436 IHTMLElement *elem;
438
439 hres = IHTMLEventObj_get_fromElement(event, &elem);
440 ok_(__FILE__,line)(hres == S_OK, "get_fromElement failed: %08x\n", hres);
441 if(from_tag)
442 _test_elem_tag(line, (IUnknown*)elem, from_tag);
443 else
444 ok_(__FILE__,line)(elem == NULL, "fromElement != NULL\n");
445 if(elem)
446 IHTMLElement_Release(elem);
447}
static void _test_elem_tag(unsigned line, IUnknown *unk, const char *extag)
Definition: events.c:277

Referenced by _test_event_obj().

◆ _test_event_keycode()

static void _test_event_keycode ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 464 of file events.c.

465{
466 LONG l;
468
469 hres = IHTMLEventObj_get_keyCode(event, &l);
470 ok_(__FILE__,line)(hres == S_OK, "get_keyCode failed: %08x\n", hres);
471 ok_(__FILE__,line)(l == exl, "keyCode = %x, expected %x\n", l, exl);
472}

Referenced by _test_event_obj().

◆ _test_event_obj()

static void _test_event_obj ( unsigned  line,
const char type,
const xy_test_t xy 
)
static

Definition at line 616 of file events.c.

617{
618 IHTMLEventObj *event = _get_event_obj(line);
619 VARIANT v;
621
622 _test_event_altkey(line, event, VARIANT_FALSE);
623 _test_event_ctrlkey(line, event, VARIANT_FALSE);
624 _test_event_shiftkey(line, event, VARIANT_FALSE);
625 _test_event_cancelbubble(line, event, VARIANT_FALSE);
634 _test_event_x(line, event, xy->x);
635 _test_event_y(line, event, xy->y);
642
643 V_VT(&v) = VT_NULL;
644 hres = IHTMLEventObj_get_returnValue(event, &v);
645 ok_(__FILE__,line)(hres == S_OK, "get_returnValue failed: %08x\n", hres);
646 ok_(__FILE__,line)(V_VT(&v) == VT_EMPTY, "V_VT(returnValue) = %d\n", V_VT(&v));
647
648 IHTMLEventObj_Release(event);
649}
@ VT_NULL
Definition: compat.h:2296
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:560
static void _test_event_x(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:494
static void _test_event_button(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:474
static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:516
static void _test_event_cancelbubble(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
Definition: events.c:424
static void _test_event_type(unsigned line, IHTMLEventObj *event, const char *exstr)
Definition: events.c:582
static void _test_event_offsety(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:549
static void _test_event_toelem(unsigned line, IHTMLEventObj *event, const char *to_tag)
Definition: events.c:449
static void _test_event_ctrlkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
Definition: events.c:403
static void _test_event_reason(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:484
static void _test_event_keycode(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:464
static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:538
static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:527
static void _test_event_y(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:505
static void _test_event_srcfilter(unsigned line, IHTMLEventObj *event)
Definition: events.c:605
static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl)
Definition: events.c:571
static void _test_event_altkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
Definition: events.c:393
static void _test_event_shiftkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval)
Definition: events.c:413
static void _test_event_fromelem(unsigned line, IHTMLEventObj *event, const char *from_tag)
Definition: events.c:434
static void _test_event_qualifier(unsigned line, IHTMLEventObj *event, const char *exstr)
Definition: events.c:592
LONG offset_y
Definition: events.c:85
LONG offset_x
Definition: events.c:84
LONG x
Definition: events.c:82
LONG y
Definition: events.c:83

◆ _test_event_offsetx()

static void _test_event_offsetx ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 538 of file events.c.

539{
540 LONG l;
542
543 hres = IHTMLEventObj_get_offsetX(event, &l);
544 ok_(__FILE__,line)(hres == S_OK, "get_offsetX failed: %08x\n", hres);
545 if(exl != -10) /* don't test the exact value */
546 ok_(__FILE__,line)(l == exl, "offsetX = %d, expected %d\n", l, exl);
547}

Referenced by _test_event_obj().

◆ _test_event_offsety()

static void _test_event_offsety ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 549 of file events.c.

550{
551 LONG l;
553
554 hres = IHTMLEventObj_get_offsetY(event, &l);
555 ok_(__FILE__,line)(hres == S_OK, "get_offsetY failed: %08x\n", hres);
556 if(exl != -10) /* don't test the exact value */
557 ok_(__FILE__,line)(l == exl, "offsetY = %d, expected %d\n", l, exl);
558}

Referenced by _test_event_obj().

◆ _test_event_qualifier()

static void _test_event_qualifier ( unsigned  line,
IHTMLEventObj *  event,
const char exstr 
)
static

Definition at line 592 of file events.c.

593{
594 BSTR str;
596
597 hres = IHTMLEventObj_get_qualifier(event, &str);
598 ok_(__FILE__,line)(hres == S_OK, "get_qualifier failed: %08x\n", hres);
599 if(exstr)
600 ok_(__FILE__,line)(!strcmp_wa(str, exstr), "qualifier = %s, expected %s\n", wine_dbgstr_w(str), exstr);
601 else
602 ok_(__FILE__,line)(!str, "qualifier != NULL\n");
603}

Referenced by _test_event_obj().

◆ _test_event_reason()

static void _test_event_reason ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 484 of file events.c.

485{
486 LONG l;
488
489 hres = IHTMLEventObj_get_reason(event, &l);
490 ok_(__FILE__,line)(hres == S_OK, "get_reason failed: %08x\n", hres);
491 ok_(__FILE__,line)(l == exl, "reason = %x, expected %x\n", l, exl);
492}

Referenced by _test_event_obj().

◆ _test_event_screenx()

static void _test_event_screenx ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 560 of file events.c.

561{
562 LONG l;
564
565 hres = IHTMLEventObj_get_screenX(event, &l);
566 ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08x\n", hres);
567 if(exl != -10) /* don't test the exact value */
568 ok_(__FILE__,line)(l == exl, "screenX = %d, expected %d\n", l, exl);
569}

Referenced by _test_event_obj().

◆ _test_event_screeny()

static void _test_event_screeny ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 571 of file events.c.

572{
573 LONG l;
575
576 hres = IHTMLEventObj_get_screenY(event, &l);
577 ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08x\n", hres);
578 if(exl != -10) /* don't test the exact value for -10 */
579 ok_(__FILE__,line)(l == exl, "screenY = %d, expected %d\n", l, exl);
580}

Referenced by _test_event_obj().

◆ _test_event_shiftkey()

static void _test_event_shiftkey ( unsigned  line,
IHTMLEventObj *  event,
VARIANT_BOOL  exval 
)
static

Definition at line 413 of file events.c.

414{
417
418 hres = IHTMLEventObj_get_shiftKey(event, &b);
419 ok_(__FILE__,line)(hres == S_OK, "get_shiftKey failed: %08x\n", hres);
420 ok_(__FILE__,line)(b == exval, "shiftKey = %x, expected %x\n", b, exval);
421}

Referenced by _test_event_obj().

◆ _test_event_src()

static void _test_event_src ( unsigned  line,
const char src_tag 
)
static

Definition at line 380 of file events.c.

381{
382 IHTMLElement *src_elem = _get_event_src(line);
383
384 if(src_tag) {
385 ok_(__FILE__,line) (src_elem != NULL, "src_elem = NULL\n");
386 _test_elem_tag(line, (IUnknown*)src_elem, src_tag);
387 IHTMLElement_Release(src_elem);
388 }else {
389 ok_(__FILE__,line) (!src_elem, "src_elem != NULL\n");
390 }
391}
static IHTMLElement * _get_event_src(unsigned line)
Definition: events.c:366

◆ _test_event_srcfilter()

static void _test_event_srcfilter ( unsigned  line,
IHTMLEventObj *  event 
)
static

Definition at line 605 of file events.c.

606{
607 IDispatch *disp;
609
610 hres = IHTMLEventObj_get_srcFilter(event, &disp);
611 ok_(__FILE__,line)(hres == S_OK, "get_srcFilter failed: %08x\n", hres);
612 ok_(__FILE__,line)(!disp, "srcFilter != NULL\n");
613}

Referenced by _test_event_obj().

◆ _test_event_toelem()

static void _test_event_toelem ( unsigned  line,
IHTMLEventObj *  event,
const char to_tag 
)
static

Definition at line 449 of file events.c.

450{
451 IHTMLElement *elem;
453
454 hres = IHTMLEventObj_get_toElement(event, &elem);
455 ok_(__FILE__,line)(hres == S_OK, "get_toElement failed: %08x\n", hres);
456 if(to_tag)
457 _test_elem_tag(line, (IUnknown*)elem, to_tag);
458 else
459 ok_(__FILE__,line)(elem == NULL, "toElement != NULL\n");
460 if(elem)
461 IHTMLElement_Release(elem);
462}

Referenced by _test_event_obj().

◆ _test_event_type()

static void _test_event_type ( unsigned  line,
IHTMLEventObj *  event,
const char exstr 
)
static

Definition at line 582 of file events.c.

583{
584 BSTR str;
586
587 hres = IHTMLEventObj_get_type(event, &str);
588 ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres);
589 ok_(__FILE__,line)(!strcmp_wa(str, exstr), "type = %s, expected %s\n", wine_dbgstr_w(str), exstr);
590}

Referenced by _test_event_obj().

◆ _test_event_x()

static void _test_event_x ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 494 of file events.c.

495{
496 LONG l;
498
499 hres = IHTMLEventObj_get_x(event, &l);
500 ok_(__FILE__,line)(hres == S_OK, "get_x failed: %08x\n", hres);
501 if(exl != -10) /* don't test the exact value */
502 ok_(__FILE__,line)(l == exl, "x = %d, expected %d\n", l, exl);
503}

Referenced by _test_event_obj().

◆ _test_event_y()

static void _test_event_y ( unsigned  line,
IHTMLEventObj *  event,
LONG  exl 
)
static

Definition at line 505 of file events.c.

506{
507 LONG l;
509
510 hres = IHTMLEventObj_get_y(event, &l);
511 ok_(__FILE__,line)(hres == S_OK, "get_y failed: %08x\n", hres);
512 if(exl != -10) /* don't test the exact value */
513 ok_(__FILE__,line)(l == exl, "y = %d, expected %d\n", l, exl);
514}

Referenced by _test_event_obj().

◆ a2bstr()

static BSTR a2bstr ( const char str)
static

Definition at line 123 of file events.c.

124{
125 BSTR ret;
126 int len;
127
128 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
131
132 return ret;
133}
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
int ret

Referenced by _doc_attach_event(), _doc_detach_event(), _elem_attach_event(), _elem_detach_event(), _elem_fire_event(), _get_elem_id(), find_element_by_id(), test_iframe_connections(), test_imgload(), test_onclick(), and test_onreadystatechange().

◆ body_onclick()

static HRESULT WINAPI body_onclick ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 902 of file events.c.

904{
906 test_event_args(&DIID_DispHTMLBody, id, wFlags, pdp, pvarRes, pei, pspCaller);
907 test_event_src("DIV");
908 return S_OK;
909}
#define test_event_args(a, b, c, d, e, f, g)
Definition: events.c:321
static HRESULT WINAPI body_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:902
#define test_event_src(t)
Definition: events.c:379
#define CHECK_EXPECT(func)
Definition: events.c:36

Referenced by body_onclick(), and test_onclick().

◆ check_ie()

static BOOL check_ie ( void  )
static

Definition at line 2842 of file events.c.

2843{
2844 IHTMLDocument2 *doc;
2845 IHTMLDocument5 *doc5;
2846 IHTMLDocument7 *doc7;
2847 HRESULT hres;
2848
2849 doc = create_document();
2850 if(!doc)
2851 return FALSE;
2852
2853 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument7, (void**)&doc7);
2854 if(SUCCEEDED(hres)) {
2855 is_ie9plus = TRUE;
2856 IHTMLDocument7_Release(doc7);
2857 }
2858
2859 trace("is_ie9plus %x\n", is_ie9plus);
2860
2861 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5);
2862 if(SUCCEEDED(hres))
2863 IHTMLDocument5_Release(doc5);
2864
2865 IHTMLDocument2_Release(doc);
2866 return SUCCEEDED(hres);
2867}
#define trace
Definition: atltest.h:70
static BOOL is_ie9plus
Definition: events.c:79
static IHTMLDocument2 * create_document(void)
Definition: events.c:2734

Referenced by START_TEST().

◆ ClientSite_AddRef()

static ULONG WINAPI ClientSite_AddRef ( IOleClientSite iface)
static

Definition at line 2475 of file events.c.

2476{
2477 return 2;
2478}

◆ ClientSite_GetContainer()

static HRESULT WINAPI ClientSite_GetContainer ( IOleClientSite iface,
IOleContainer **  ppContainer 
)
static

Definition at line 2498 of file events.c.

2499{
2500 return E_NOTIMPL;
2501}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_GetMoniker()

static HRESULT WINAPI ClientSite_GetMoniker ( IOleClientSite iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmon 
)
static

Definition at line 2491 of file events.c.

2493{
2494 ok(0, "unexpected call\n");
2495 return E_NOTIMPL;
2496}

◆ ClientSite_OnShowWindow()

static HRESULT WINAPI ClientSite_OnShowWindow ( IOleClientSite iface,
BOOL  fShow 
)
static

Definition at line 2509 of file events.c.

2510{
2511 ok(0, "unexpected call\n");
2512 return E_NOTIMPL;
2513}

◆ ClientSite_QueryInterface()

static HRESULT WINAPI ClientSite_QueryInterface ( IOleClientSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2470 of file events.c.

2471{
2472 return QueryInterface(riid, ppv);
2473}
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587

◆ ClientSite_Release()

static ULONG WINAPI ClientSite_Release ( IOleClientSite iface)
static

Definition at line 2480 of file events.c.

2481{
2482 return 1;
2483}

◆ ClientSite_RequestNewObjectLayout()

static HRESULT WINAPI ClientSite_RequestNewObjectLayout ( IOleClientSite iface)
static

Definition at line 2515 of file events.c.

2516{
2517 ok(0, "unexpected call\n");
2518 return E_NOTIMPL;
2519}

◆ ClientSite_SaveObject()

static HRESULT WINAPI ClientSite_SaveObject ( IOleClientSite iface)
static

Definition at line 2485 of file events.c.

2486{
2487 ok(0, "unexpected call\n");
2488 return E_NOTIMPL;
2489}

◆ ClientSite_ShowObject()

static HRESULT WINAPI ClientSite_ShowObject ( IOleClientSite iface)
static

Definition at line 2503 of file events.c.

2504{
2505 ok(0, "unexpected call\n");
2506 return E_NOTIMPL;
2507}

◆ CONNECTION_POINT_OBJ() [1/3]

CONNECTION_POINT_OBJ ( doccp  ,
DIID_HTMLDocumentEvents   
)

◆ CONNECTION_POINT_OBJ() [2/3]

CONNECTION_POINT_OBJ ( doccp_onclick_cancel  ,
DIID_HTMLDocumentEvents   
)

◆ CONNECTION_POINT_OBJ() [3/3]

CONNECTION_POINT_OBJ ( elem2_cp  ,
DIID_HTMLElementEvents2   
)

◆ create_container_window()

static HWND create_container_window ( void  )
static

Definition at line 2794 of file events.c.

2795{
2796 static const CHAR szHTMLDocumentTest[] = "HTMLDocumentTest";
2797 static WNDCLASSEXA wndclass = {
2798 sizeof(WNDCLASSEXA),
2799 0,
2800 wnd_proc,
2801 0, 0, NULL, NULL, NULL, NULL, NULL,
2802 szHTMLDocumentTest,
2803 NULL
2804 };
2805
2806 RegisterClassExA(&wndclass);
2807 return CreateWindowA(szHTMLDocumentTest, szHTMLDocumentTest,
2809 300, 300, NULL, NULL, NULL, NULL);
2810}
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: events.c:2789
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
#define CW_USEDEFAULT
Definition: winuser.h:225
struct _WNDCLASSEXA WNDCLASSEXA
char CHAR
Definition: xmlstorage.h:175

Referenced by START_TEST().

◆ create_document()

static IHTMLDocument2 * create_document ( void  )
static

Definition at line 2734 of file events.c.

2735{
2736 IHTMLDocument2 *doc;
2737 HRESULT hres;
2738
2739 hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
2740 &IID_IHTMLDocument2, (void**)&doc);
2741 ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
2742 return SUCCEEDED(hres) ? doc : NULL;
2743}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325

Referenced by check_ie(), run_test(), and test_empty_document().

◆ DEFINE_EXPECT() [1/27]

DEFINE_EXPECT ( body_onclick  )

◆ DEFINE_EXPECT() [2/27]

DEFINE_EXPECT ( div_onclick  )

◆ DEFINE_EXPECT() [3/27]

DEFINE_EXPECT ( div_onclick_attached  )

◆ DEFINE_EXPECT() [4/27]

DEFINE_EXPECT ( div_onclick_disp  )

◆ DEFINE_EXPECT() [5/27]

DEFINE_EXPECT ( doc_onclick_attached  )

◆ DEFINE_EXPECT() [6/27]

DEFINE_EXPECT ( doccp_onclick  )

◆ DEFINE_EXPECT() [7/27]

DEFINE_EXPECT ( doccp_onclick_cancel  )

◆ DEFINE_EXPECT() [8/27]

DEFINE_EXPECT ( document_onclick  )

◆ DEFINE_EXPECT() [9/27]

DEFINE_EXPECT ( elem2_cp_onclick  )

◆ DEFINE_EXPECT() [10/27]

DEFINE_EXPECT ( form_onclick  )

◆ DEFINE_EXPECT() [11/27]

DEFINE_EXPECT ( form_onsubmit  )

◆ DEFINE_EXPECT() [12/27]

DEFINE_EXPECT ( iframe_onload  )

◆ DEFINE_EXPECT() [13/27]

DEFINE_EXPECT ( iframe_onreadystatechange_complete  )

◆ DEFINE_EXPECT() [14/27]

DEFINE_EXPECT ( iframe_onreadystatechange_interactive  )

◆ DEFINE_EXPECT() [15/27]

DEFINE_EXPECT ( iframe_onreadystatechange_loading  )

◆ DEFINE_EXPECT() [16/27]

DEFINE_EXPECT ( iframedoc_onreadystatechange  )

◆ DEFINE_EXPECT() [17/27]

DEFINE_EXPECT ( img_onerror  )

◆ DEFINE_EXPECT() [18/27]

DEFINE_EXPECT ( img_onload  )

◆ DEFINE_EXPECT() [19/27]

DEFINE_EXPECT ( input_onblur  )

◆ DEFINE_EXPECT() [20/27]

DEFINE_EXPECT ( input_onfocus  )

◆ DEFINE_EXPECT() [21/27]

DEFINE_EXPECT ( invoke_onclick  )

◆ DEFINE_EXPECT() [22/27]

DEFINE_EXPECT ( submit_onclick  )

◆ DEFINE_EXPECT() [23/27]

DEFINE_EXPECT ( submit_onclick_attached  )

◆ DEFINE_EXPECT() [24/27]

◆ DEFINE_EXPECT() [25/27]

DEFINE_EXPECT ( submit_onclick_cancel  )

◆ DEFINE_EXPECT() [26/27]

DEFINE_EXPECT ( submit_onclick_setret  )

◆ DEFINE_EXPECT() [27/27]

DEFINE_EXPECT ( timeout  )

◆ Dispatch_QueryInterface()

static HRESULT WINAPI Dispatch_QueryInterface ( IDispatchEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 727 of file events.c.

728{
729 *ppv = NULL;
730
733 *ppv = iface;
734 }else if(IsEqualGUID(riid, &IID_IDispatchEx)) {
735 return E_NOINTERFACE;
736 }else {
737 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
738 return E_NOINTERFACE;
739 }
740
741 return S_OK;
742}
const GUID IID_IUnknown
const GUID IID_IDispatch
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ DispatchEx_AddRef()

static ULONG WINAPI DispatchEx_AddRef ( IDispatchEx iface)
static

Definition at line 744 of file events.c.

745{
746 return 2;
747}

◆ DispatchEx_DeleteMemberByDispID()

static HRESULT WINAPI DispatchEx_DeleteMemberByDispID ( IDispatchEx iface,
DISPID  id 
)
static

Definition at line 802 of file events.c.

803{
804 ok(0, "unexpected call\n");
805 return E_NOTIMPL;
806}

◆ DispatchEx_DeleteMemberByName()

static HRESULT WINAPI DispatchEx_DeleteMemberByName ( IDispatchEx iface,
BSTR  bstrName,
DWORD  grfdex 
)
static

Definition at line 796 of file events.c.

797{
798 ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
799 return E_NOTIMPL;
800}

◆ DispatchEx_GetDispID()

static HRESULT WINAPI DispatchEx_GetDispID ( IDispatchEx iface,
BSTR  bstrName,
DWORD  grfdex,
DISPID pid 
)
static

Definition at line 783 of file events.c.

784{
785 ok(0, "unexpected call\n");
786 return E_NOTIMPL;
787}

◆ DispatchEx_GetIDsOfNames()

static HRESULT WINAPI DispatchEx_GetIDsOfNames ( IDispatchEx iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 767 of file events.c.

770{
771 ok(0, "unexpected call\n");
772 return E_NOTIMPL;
773}

◆ DispatchEx_GetMemberName()

static HRESULT WINAPI DispatchEx_GetMemberName ( IDispatchEx iface,
DISPID  id,
BSTR pbstrName 
)
static

Definition at line 814 of file events.c.

815{
816 ok(0, "unexpected call\n");
817 return E_NOTIMPL;
818}

◆ DispatchEx_GetMemberProperties()

static HRESULT WINAPI DispatchEx_GetMemberProperties ( IDispatchEx iface,
DISPID  id,
DWORD  grfdexFetch,
DWORD pgrfdex 
)
static

Definition at line 808 of file events.c.

809{
810 ok(0, "unexpected call\n");
811 return E_NOTIMPL;
812}

◆ DispatchEx_GetNameSpaceParent()

static HRESULT WINAPI DispatchEx_GetNameSpaceParent ( IDispatchEx iface,
IUnknown **  ppunk 
)
static

Definition at line 826 of file events.c.

827{
828 ok(0, "unexpected call\n");
829 return E_NOTIMPL;
830}

◆ DispatchEx_GetNextDispID()

static HRESULT WINAPI DispatchEx_GetNextDispID ( IDispatchEx iface,
DWORD  grfdex,
DISPID  id,
DISPID pid 
)
static

Definition at line 820 of file events.c.

821{
822 ok(0, "unexpected call\n");
823 return E_NOTIMPL;
824}

◆ DispatchEx_GetTypeInfo()

static HRESULT WINAPI DispatchEx_GetTypeInfo ( IDispatchEx iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 760 of file events.c.

762{
763 ok(0, "unexpected call\n");
764 return E_NOTIMPL;
765}

◆ DispatchEx_GetTypeInfoCount()

static HRESULT WINAPI DispatchEx_GetTypeInfoCount ( IDispatchEx iface,
UINT pctinfo 
)
static

Definition at line 754 of file events.c.

755{
756 ok(0, "unexpected call\n");
757 return E_NOTIMPL;
758}

◆ DispatchEx_Invoke()

static HRESULT WINAPI DispatchEx_Invoke ( IDispatchEx iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 775 of file events.c.

778{
779 ok(0, "unexpected call\n");
780 return E_NOTIMPL;
781}

◆ DispatchEx_InvokeEx()

static HRESULT WINAPI DispatchEx_InvokeEx ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 789 of file events.c.

791{
792 ok(0, "unexpected call\n");
793 return E_NOTIMPL;
794}

◆ DispatchEx_QueryInterface()

static HRESULT WINAPI DispatchEx_QueryInterface ( IDispatchEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 711 of file events.c.

712{
713 *ppv = NULL;
714
717 || IsEqualGUID(riid, &IID_IDispatchEx))
718 *ppv = iface;
719 else {
720 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
721 return E_NOINTERFACE;
722 }
723
724 return S_OK;
725}

◆ DispatchEx_Release()

static ULONG WINAPI DispatchEx_Release ( IDispatchEx iface)
static

Definition at line 749 of file events.c.

750{
751 return 1;
752}

◆ div_onclick()

static HRESULT WINAPI div_onclick ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 867 of file events.c.

869{
871 test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller);
872 test_event_src("DIV");
873 return S_OK;
874}
static HRESULT WINAPI div_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:867

Referenced by div_onclick(), and test_onclick().

◆ div_onclick_attached()

static HRESULT WINAPI div_onclick_attached ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 878 of file events.c.

880{
882
883 test_attached_event_args(id, wFlags, pdp, pvarRes, pei);
884 test_event_src("DIV");
885 return S_OK;
886}
#define test_attached_event_args(a, b, c, d, e)
Definition: events.c:341
static HRESULT WINAPI div_onclick_attached(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:878

Referenced by div_onclick_attached(), and test_onclick().

◆ div_onclick_disp_Invoke()

static HRESULT WINAPI div_onclick_disp_Invoke ( IDispatchEx iface,
DISPID  id,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
UINT puArgErr 
)
static

Definition at line 1378 of file events.c.

1381{
1383
1384 test_attached_event_args(id, wFlags, pdp, pvarRes, pei);
1385
1386 ok(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", wine_dbgstr_guid(riid));
1387 ok(!puArgErr, "puArgErr = %p\n", puArgErr);
1388
1389 return S_OK;
1390}
static IDispatchEx div_onclick_disp
Definition: events.c:1402

◆ do_advise()

static void do_advise ( IUnknown unk,
REFIID  riid,
IUnknown unk_advise 
)
static

Definition at line 2682 of file events.c.

2683{
2686 DWORD cookie;
2687 HRESULT hres;
2688
2689 hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
2690 ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
2691
2692 hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
2693 IConnectionPointContainer_Release(container);
2694 ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
2695
2696 hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
2697 IConnectionPoint_Release(cp);
2698 ok(hres == S_OK, "Advise failed: %08x\n", hres);
2699}
unsigned long DWORD
Definition: ntddk_ex.h:95
POINT cp
Definition: magnifier.c:59
const GUID IID_IConnectionPointContainer
Definition: cookie.c:34

Referenced by run_test().

◆ doc_load_string()

static void doc_load_string ( IHTMLDocument2 *  doc,
const char str 
)
static

Definition at line 2660 of file events.c.

2661{
2663 IStream *stream;
2664 HGLOBAL mem;
2665 SIZE_T len;
2666
2667 notif_doc = doc;
2668
2670 len = strlen(str);
2671 mem = GlobalAlloc(0, len);
2672 memcpy(mem, str, len);
2674
2675 IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
2676
2677 IPersistStreamInit_Load(init, stream);
2678 IPersistStreamInit_Release(init);
2679 IStream_Release(stream);
2680}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static BOOL doc_complete
Definition: events.c:2602
static IHTMLDocument2 * notif_doc
Definition: events.c:2601
const GUID IID_IPersistStreamInit
Definition: mem.c:156
Definition: parse.h:23
ULONG_PTR SIZE_T
Definition: typedefs.h:80
static int init
Definition: wintirpc.c:33

Referenced by run_test().

◆ doc_onclick_attached()

static HRESULT WINAPI doc_onclick_attached ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 890 of file events.c.

892{
894
895 test_attached_event_args(id, wFlags, pdp, pvarRes, pei);
896 test_event_src("DIV");
897 return S_OK;
898}
static HRESULT WINAPI doc_onclick_attached(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:890

Referenced by doc_onclick_attached(), and test_onclick().

◆ doccp()

static HRESULT WINAPI doccp ( IDispatchEx iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pVarResult,
EXCEPINFO *  pei,
UINT puArgErr 
)
static

Definition at line 1278 of file events.c.

1281{
1282 switch(dispIdMember) {
1284 CHECK_EXPECT(doccp_onclick);
1285 test_cp_args(riid, wFlags, pdp, pVarResult, pei, puArgErr);
1286 break;
1287 default:
1288 ok(0, "unexpected call %d\n", dispIdMember);
1289 return E_NOTIMPL;
1290 }
1291
1292 return S_OK;
1293}
#define test_cp_args(a, b, c, d, e, f)
Definition: events.c:1237
#define DISPID_HTMLDOCUMENTEVENTS_ONCLICK
Definition: mshtmdid.h:860

◆ doccp_onclick_cancel()

static HRESULT WINAPI doccp_onclick_cancel ( IDispatchEx iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pVarResult,
EXCEPINFO *  pei,
UINT puArgErr 
)
static

Definition at line 1297 of file events.c.

1299{
1300 switch(dispIdMember) {
1303 test_cp_args(riid, wFlags, pdp, pVarResult, pei, puArgErr);
1304 V_VT(pVarResult) = VT_BOOL;
1305 V_BOOL(pVarResult) = VARIANT_FALSE;
1306 break;
1307 default:
1308 ok(0, "unexpected call %d\n", dispIdMember);
1309 return E_NOTIMPL;
1310 }
1311
1312 return S_OK;
1313}
@ VT_BOOL
Definition: compat.h:2306
static HRESULT WINAPI doccp_onclick_cancel(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr)
Definition: events.c:1297
#define V_BOOL(A)
Definition: oleauto.h:224

Referenced by doccp_onclick_cancel(), and test_submit().

◆ document_onclick()

static HRESULT WINAPI document_onclick ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 852 of file events.c.

854{
855 IHTMLDocument3 *doc3;
857 test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller);
858 doc3 = get_doc3_iface((IUnknown*)V_DISPATCH(pdp->rgvarg));
859 IHTMLDocument3_Release(doc3);
860 test_event_src("DIV");
861 test_event_obj("click", &no_xy);
862 return S_OK;
863}
static HRESULT WINAPI document_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:852
#define test_event_obj(t, x)
Definition: events.c:615
#define get_doc3_iface(u)
Definition: events.c:186
static const xy_test_t no_xy
Definition: events.c:88

Referenced by document_onclick(), and test_onclick().

◆ DocumentSite_ActivateMe()

static HRESULT WINAPI DocumentSite_ActivateMe ( IOleDocumentSite iface,
IOleDocumentView pViewToActivate 
)
static

Definition at line 2550 of file events.c.

2551{
2552 RECT rect = {0,0,300,300};
2553 IOleDocument *document;
2554 HRESULT hres;
2555
2556 hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
2557 ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
2558
2559 hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
2560 IOleDocument_Release(document);
2561 ok(hres == S_OK, "CreateView failed: %08x\n", hres);
2562
2563 hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
2564 ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
2565
2566 hres = IOleDocumentView_UIActivate(view, TRUE);
2567 ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
2568
2569 hres = IOleDocumentView_SetRect(view, &rect);
2570 ok(hres == S_OK, "SetRect failed: %08x\n", hres);
2571
2572 hres = IOleDocumentView_Show(view, TRUE);
2573 ok(hres == S_OK, "Show failed: %08x\n", hres);
2574
2575 return S_OK;
2576}
static IOleInPlaceSite InPlaceSite
Definition: events.c:2468
& rect
Definition: startmenu.cpp:1413

◆ DocumentSite_AddRef()

static ULONG WINAPI DocumentSite_AddRef ( IOleDocumentSite iface)
static

Definition at line 2540 of file events.c.

2541{
2542 return 2;
2543}

◆ DocumentSite_QueryInterface()

static HRESULT WINAPI DocumentSite_QueryInterface ( IOleDocumentSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2535 of file events.c.

2536{
2537 return QueryInterface(riid, ppv);
2538}

◆ DocumentSite_Release()

static ULONG WINAPI DocumentSite_Release ( IOleDocumentSite iface)
static

Definition at line 2545 of file events.c.

2546{
2547 return 1;
2548}

◆ elem2_cp()

static HRESULT WINAPI elem2_cp ( IDispatchEx iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pVarResult,
EXCEPINFO *  pei,
UINT puArgErr 
)
static

Definition at line 1317 of file events.c.

1319{
1320 switch(dispIdMember) {
1322 CHECK_EXPECT(elem2_cp_onclick);
1323 test_cp_eventarg(riid, wFlags, pdp, pVarResult, pei, puArgErr);
1324 break;
1325 default:
1326 ok(0, "unexpected call %d\n", dispIdMember);
1327 return E_NOTIMPL;
1328 }
1329
1330 return S_OK;
1331}
#define test_cp_eventarg(a, b, c, d, e, f)
Definition: events.c:1253

◆ EVENT_HANDLER_FUNC_OBJ() [1/20]

EVENT_HANDLER_FUNC_OBJ ( body_onclick  )

◆ EVENT_HANDLER_FUNC_OBJ() [2/20]

EVENT_HANDLER_FUNC_OBJ ( div_onclick  )

◆ EVENT_HANDLER_FUNC_OBJ() [3/20]

EVENT_HANDLER_FUNC_OBJ ( div_onclick_attached  )

◆ EVENT_HANDLER_FUNC_OBJ() [4/20]

EVENT_HANDLER_FUNC_OBJ ( doc_onclick_attached  )

◆ EVENT_HANDLER_FUNC_OBJ() [5/20]

EVENT_HANDLER_FUNC_OBJ ( document_onclick  )

◆ EVENT_HANDLER_FUNC_OBJ() [6/20]

EVENT_HANDLER_FUNC_OBJ ( form_onclick  )

◆ EVENT_HANDLER_FUNC_OBJ() [7/20]

EVENT_HANDLER_FUNC_OBJ ( form_onsubmit  )

◆ EVENT_HANDLER_FUNC_OBJ() [8/20]

EVENT_HANDLER_FUNC_OBJ ( iframe_onload  )

◆ EVENT_HANDLER_FUNC_OBJ() [9/20]

EVENT_HANDLER_FUNC_OBJ ( iframe_onreadystatechange  )

◆ EVENT_HANDLER_FUNC_OBJ() [10/20]

EVENT_HANDLER_FUNC_OBJ ( iframedoc_onreadystatechange  )

◆ EVENT_HANDLER_FUNC_OBJ() [11/20]

EVENT_HANDLER_FUNC_OBJ ( img_onerror  )

◆ EVENT_HANDLER_FUNC_OBJ() [12/20]

EVENT_HANDLER_FUNC_OBJ ( img_onload  )

◆ EVENT_HANDLER_FUNC_OBJ() [13/20]

EVENT_HANDLER_FUNC_OBJ ( input_onblur  )

◆ EVENT_HANDLER_FUNC_OBJ() [14/20]

EVENT_HANDLER_FUNC_OBJ ( input_onfocus  )

◆ EVENT_HANDLER_FUNC_OBJ() [15/20]

EVENT_HANDLER_FUNC_OBJ ( nocall  )

◆ EVENT_HANDLER_FUNC_OBJ() [16/20]

EVENT_HANDLER_FUNC_OBJ ( submit_onclick  )

◆ EVENT_HANDLER_FUNC_OBJ() [17/20]

EVENT_HANDLER_FUNC_OBJ ( submit_onclick_attached  )

◆ EVENT_HANDLER_FUNC_OBJ() [18/20]

EVENT_HANDLER_FUNC_OBJ ( submit_onclick_attached_check_cancel  )

◆ EVENT_HANDLER_FUNC_OBJ() [19/20]

EVENT_HANDLER_FUNC_OBJ ( submit_onclick_cancel  )

◆ EVENT_HANDLER_FUNC_OBJ() [20/20]

EVENT_HANDLER_FUNC_OBJ ( submit_onclick_setret  )

◆ EventDispatch_AddRef()

static DWORD WINAPI EventDispatch_AddRef ( IDispatch iface)
static

Definition at line 1473 of file events.c.

1474{
1475 return 2;
1476}

◆ EventDispatch_GetIDsOfNames()

static HRESULT WINAPI EventDispatch_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1495 of file events.c.

1497{
1498 ok(0, "Unexpected call\n");
1499 return E_NOTIMPL;
1500}

◆ EventDispatch_GetTypeInfo()

static HRESULT WINAPI EventDispatch_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1489 of file events.c.

1490{
1491 ok(0, "Unexpected call\n");
1492 return E_NOTIMPL;
1493}

◆ EventDispatch_GetTypeInfoCount()

static HRESULT WINAPI EventDispatch_GetTypeInfoCount ( IDispatch iface,
UINT pctinfo 
)
static

Definition at line 1483 of file events.c.

1484{
1485 ok(0, "Unexpected call\n");
1486 return E_NOTIMPL;
1487}

◆ EventDispatch_Invoke()

static HRESULT WINAPI EventDispatch_Invoke ( IDispatch iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1502 of file events.c.

1505{
1506 ok(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", wine_dbgstr_guid(riid));
1507 ok(pDispParams != NULL, "pDispParams == NULL\n");
1508 ok(pExcepInfo != NULL, "pExcepInfo == NULL\n");
1509 ok(puArgErr != NULL, "puArgErr == NULL\n");
1510 ok(V_VT(pVarResult) == 0, "V_VT(pVarResult) = %d\n", V_VT(pVarResult));
1511 ok(wFlags == DISPATCH_METHOD, "wFlags = %d\n", wFlags);
1512
1513 switch(dispIdMember) {
1515 CHECK_EXPECT2(invoke_onclick);
1516 break;
1519 case 1027:
1520 case 1034:
1521 case 1037:
1522 case 1044:
1523 case 1045:
1524 case 1047:
1525 case 1048:
1526 case 1049:
1527 break; /* TODO */
1528 default:
1529 ok(0, "Unexpected call: %d\n", dispIdMember);
1530 }
1531
1532 return S_OK;
1533}
#define CHECK_EXPECT2(func)
Definition: events.c:29
#define DISPID_HTMLDOCUMENTEVENTS2_ONPROPERTYCHANGE
Definition: mshtmdid.h:923
#define DISPID_HTMLDOCUMENTEVENTS2_ONREADYSTATECHANGE
Definition: mshtmdid.h:910

◆ EventDispatch_QueryInterface()

static HRESULT WINAPI EventDispatch_QueryInterface ( IDispatch iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1462 of file events.c.

1463{
1465 *ppv = iface;
1466 return S_OK;
1467 }
1468
1469 ok(0, "Unexpected call\n");
1470 return E_NOINTERFACE;
1471}

◆ EventDispatch_Release()

static DWORD WINAPI EventDispatch_Release ( IDispatch iface)
static

Definition at line 1478 of file events.c.

1479{
1480 return 1;
1481}

◆ find_element_by_id()

static IHTMLElement * find_element_by_id ( IHTMLDocument2 *  doc,
const char id 
)
static

Definition at line 2122 of file events.c.

2123{
2124 HRESULT hres;
2125 IHTMLDocument3 *doc3;
2126 IHTMLElement *result;
2127 BSTR idW = a2bstr(id);
2128
2129 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
2130 ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument3) failed: %08x\n", hres);
2131
2132 hres = IHTMLDocument3_getElementById(doc3, idW, &result);
2133 ok(hres == S_OK, "getElementById failed: %08x\n", hres);
2134 ok(result != NULL, "result == NULL\n");
2135 SysFreeString(idW);
2136
2137 IHTMLDocument3_Release(doc3);
2138 return result;
2139}
GLuint64EXT * result
Definition: glext.h:11304

Referenced by test_iframe_connections().

◆ form_onclick()

static HRESULT WINAPI form_onclick ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 971 of file events.c.

973{
975 test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller);
976
977 return S_OK;
978}
static HRESULT WINAPI form_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:971

Referenced by form_onclick(), and test_submit().

◆ form_onsubmit()

static HRESULT WINAPI form_onsubmit ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 957 of file events.c.

959{
961 test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller);
962 test_event_src("FORM");
963
964 V_VT(pvarRes) = VT_BOOL;
965 V_BOOL(pvarRes) = VARIANT_FALSE;
966 return S_OK;
967}
static HRESULT WINAPI form_onsubmit(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:957

Referenced by form_onsubmit(), and test_submit().

◆ get_cp()

static IConnectionPoint * get_cp ( IUnknown unk,
REFIID  riid 
)
static

Definition at line 1421 of file events.c.

1422{
1423 IConnectionPointContainer *cp_container;
1425 HRESULT hres;
1426
1427 hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&cp_container);
1428 ok(hres == S_OK, "Could not get IConnectionPointContainer: %08x\n", hres);
1429
1430 hres = IConnectionPointContainer_FindConnectionPoint(cp_container, riid, &cp);
1431 IConnectionPointContainer_Release(cp_container);
1432 ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
1433
1434 return cp;
1435}

Referenced by register_cp(), test_empty_document(), test_iframe_connections(), and unregister_cp().

◆ get_iframe_doc()

static IHTMLDocument2 * get_iframe_doc ( IHTMLIFrameElement *  iframe)
static

Definition at line 2141 of file events.c.

2142{
2143 HRESULT hres;
2144 IHTMLFrameBase2 *base;
2145 IHTMLDocument2 *result = NULL;
2146
2147 hres = IHTMLIFrameElement_QueryInterface(iframe, &IID_IHTMLFrameBase2, (void**)&base);
2148 ok(hres == S_OK, "QueryInterface(IID_IHTMLFrameBase2) failed: %08x\n", hres);
2149 if(hres == S_OK) {
2151
2152 hres = IHTMLFrameBase2_get_contentWindow(base, &window);
2153 ok(hres == S_OK, "get_contentWindow failed: %08x\n", hres);
2154 ok(window != NULL, "window == NULL\n");
2155 if(window) {
2156 hres = IHTMLWindow2_get_document(window, &result);
2157 ok(hres == S_OK, "get_document failed: %08x\n", hres);
2158 ok(result != NULL, "result == NULL\n");
2159 IHTMLWindow2_Release(window);
2160 }
2161 }
2162 if(base) IHTMLFrameBase2_Release(base);
2163
2164 return result;
2165}
interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64

Referenced by test_iframe_connections().

◆ iface_cmp()

static BOOL iface_cmp ( IUnknown iface1,
IUnknown iface2 
)
static

Definition at line 135 of file events.c.

136{
137 IUnknown *unk1, *unk2;
138
139 if(iface1 == iface2)
140 return TRUE;
141
142 IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk1);
143 IUnknown_Release(unk1);
144 IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk2);
145 IUnknown_Release(unk2);
146
147 return unk1 == unk2;
148}
static DWORD unk1
Definition: cursoricon.c:1638

Referenced by _test_attached_event_args(), and _test_cp_eventarg().

◆ iframe_onload()

static HRESULT WINAPI iframe_onload ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 996 of file events.c.

998{
1000 test_event_args(&DIID_DispHTMLIFrame, id, wFlags, pdp, pvarRes, pei, pspCaller);
1001 test_event_src("IFRAME");
1002 return S_OK;
1003}
static HRESULT WINAPI iframe_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:996

Referenced by iframe_onload(), and test_iframe_connections().

◆ iframe_onreadystatechange()

static HRESULT WINAPI iframe_onreadystatechange ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 1126 of file events.c.

1128{
1129 IHTMLWindow2 *iframe_window;
1130 IHTMLDocument2 *iframe_doc;
1131 IHTMLFrameBase2 *iframe;
1132 IHTMLElement2 *elem2;
1133 IHTMLElement *elem;
1134 VARIANT v;
1135 BSTR str, str2;
1136 HRESULT hres;
1137
1138 test_event_args(&DIID_DispHTMLIFrame, id, wFlags, pdp, pvarRes, pei, pspCaller);
1139 test_event_src("IFRAME");
1140
1141 elem = get_event_src();
1142 elem2 = get_elem2_iface((IUnknown*)elem);
1143 IHTMLElement_Release(elem);
1144
1145 V_VT(&v) = VT_EMPTY;
1146 hres = IHTMLElement2_get_readyState(elem2, &v);
1147 ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
1148 ok(V_VT(&v) == VT_BSTR, "V_VT(readyState) = %d\n", V_VT(&v));
1149
1150 hres = IHTMLElement2_QueryInterface(elem2, &IID_IHTMLFrameBase2, (void**)&iframe);
1151 IHTMLElement2_Release(elem2);
1152 ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08x\n", hres);
1153
1154 str = NULL;
1155 hres = IHTMLFrameBase2_get_readyState(iframe, &str);
1156 ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
1157 ok(str != NULL, "readyState == NULL\n");
1158 ok(!lstrcmpW(str, V_BSTR(&v)), "ready states differ\n");
1159 VariantClear(&v);
1160
1161 hres = IHTMLFrameBase2_get_contentWindow(iframe, &iframe_window);
1162 ok(hres == S_OK, "get_contentDocument failed: %08x\n", hres);
1163
1164 hres = IHTMLWindow2_get_document(iframe_window, &iframe_doc);
1165 IHTMLWindow2_Release(iframe_window);
1166 ok(hres == S_OK, "get_document failed: %08x\n", hres);
1167
1168 hres = IHTMLDocument2_get_readyState(iframe_doc, &str2);
1169 ok(hres == S_OK, "get_document failed: %08x\n", hres);
1170 ok(!lstrcmpW(str, str2), "unexpected document readyState %s\n", wine_dbgstr_w(str2));
1171 SysFreeString(str2);
1172
1173 if(!strcmp_wa(str, "loading")) {
1174 CHECK_EXPECT(iframe_onreadystatechange_loading);
1175
1176 V_VT(&v) = VT_DISPATCH;
1177 V_DISPATCH(&v) = (IDispatch*)&iframedoc_onreadystatechange_obj;
1178 hres = IHTMLDocument2_put_onreadystatechange(iframe_doc, v);
1179 ok(hres == S_OK, "put_onreadystatechange: %08x\n", hres);
1180 }else if(!strcmp_wa(str, "interactive"))
1181 CHECK_EXPECT(iframe_onreadystatechange_interactive);
1182 else if(!strcmp_wa(str, "complete"))
1183 CHECK_EXPECT(iframe_onreadystatechange_complete);
1184 else
1185 ok(0, "unexpected state %s\n", wine_dbgstr_w(str));
1186
1188 IHTMLDocument2_Release(iframe_doc);
1189 IHTMLFrameBase2_Release(iframe);
1190 return S_OK;
1191}
@ VT_BSTR
Definition: compat.h:2303
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4242
#define get_event_src()
Definition: events.c:365
#define get_elem2_iface(u)
Definition: events.c:210
#define V_BSTR(A)
Definition: oleauto.h:226
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

◆ iframedoc_onreadystatechange()

static HRESULT WINAPI iframedoc_onreadystatechange ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 1107 of file events.c.

1109{
1110 IHTMLEventObj *event = NULL;
1111 HRESULT hres;
1112
1114 test_event_args(&DIID_DispHTMLDocument, id, wFlags, pdp, pvarRes, pei, pspCaller);
1115
1116 event = (void*)0xdeadbeef;
1117 hres = IHTMLWindow2_get_event(window, &event);
1118 ok(hres == S_OK, "get_event failed: %08x\n", hres);
1119 ok(!event, "event = %p\n", event);
1120
1121 return S_OK;
1122}
static HRESULT WINAPI iframedoc_onreadystatechange(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:1107

Referenced by iframedoc_onreadystatechange(), and test_onreadystatechange().

◆ img_onerror()

static HRESULT WINAPI img_onerror ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 924 of file events.c.

926{
928 test_event_args(&DIID_DispHTMLImg, id, wFlags, pdp, pvarRes, pei, pspCaller);
929 test_event_src("IMG");
930 return S_OK;
931}
static HRESULT WINAPI img_onerror(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:924

Referenced by img_onerror(), and test_imgload().

◆ img_onload()

static HRESULT WINAPI img_onload ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 913 of file events.c.

915{
917 test_event_args(&DIID_DispHTMLImg, id, wFlags, pdp, pvarRes, pei, pspCaller);
918 test_event_src("IMG");
919 return S_OK;
920}
static HRESULT WINAPI img_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:913

Referenced by img_onload(), and test_imgload().

◆ InPlaceFrame_AddRef()

static ULONG WINAPI InPlaceFrame_AddRef ( IOleInPlaceFrame iface)
static

Definition at line 2240 of file events.c.

2241{
2242 return 2;
2243}

◆ InPlaceFrame_ContextSensitiveHelp()

static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp ( IOleInPlaceFrame iface,
BOOL  fEnterMode 
)
static

Definition at line 2255 of file events.c.

2256{
2257 return E_NOTIMPL;
2258}

◆ InPlaceFrame_EnableModeless()

static HRESULT WINAPI InPlaceFrame_EnableModeless ( IOleInPlaceFrame iface,
BOOL  fEnable 
)
static

Definition at line 2313 of file events.c.

2314{
2315 return E_NOTIMPL;
2316}

◆ InPlaceFrame_GetBorder()

static HRESULT WINAPI InPlaceFrame_GetBorder ( IOleInPlaceFrame iface,
LPRECT  lprectBorder 
)
static

Definition at line 2260 of file events.c.

2261{
2262 return E_NOTIMPL;
2263}

◆ InPlaceFrame_GetWindow()

static HRESULT WINAPI InPlaceFrame_GetWindow ( IOleInPlaceFrame iface,
HWND phwnd 
)
static

Definition at line 2250 of file events.c.

2251{
2252 return E_NOTIMPL;
2253}

◆ InPlaceFrame_InsertMenus()

static HRESULT WINAPI InPlaceFrame_InsertMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
LPOLEMENUGROUPWIDTHS  lpMenuWidths 
)
static

Definition at line 2289 of file events.c.

2291{
2292 return E_NOTIMPL;
2293}

◆ InPlaceFrame_QueryInterface()

static HRESULT WINAPI InPlaceFrame_QueryInterface ( IOleInPlaceFrame iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2235 of file events.c.

2236{
2237 return E_NOINTERFACE;
2238}

◆ InPlaceFrame_Release()

static ULONG WINAPI InPlaceFrame_Release ( IOleInPlaceFrame iface)
static

Definition at line 2245 of file events.c.

2246{
2247 return 1;
2248}

◆ InPlaceFrame_RemoveMenus()

static HRESULT WINAPI InPlaceFrame_RemoveMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared 
)
static

Definition at line 2302 of file events.c.

2303{
2304 ok(0, "unexpected call\n");
2305 return E_NOTIMPL;
2306}

◆ InPlaceFrame_RequestBorderSpace()

static HRESULT WINAPI InPlaceFrame_RequestBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 2265 of file events.c.

2267{
2268 return E_NOTIMPL;
2269}

◆ InPlaceFrame_SetActiveObject()

static HRESULT WINAPI InPlaceFrame_SetActiveObject ( IOleInPlaceFrame iface,
IOleInPlaceActiveObject pActiveObject,
LPCOLESTR  pszObjName 
)
static

Definition at line 2283 of file events.c.

2285{
2286 return S_OK;
2287}

◆ InPlaceFrame_SetBorderSpace()

static HRESULT WINAPI InPlaceFrame_SetBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 2271 of file events.c.

2273{
2274 return S_OK;
2275}

◆ InPlaceFrame_SetMenu()

static HRESULT WINAPI InPlaceFrame_SetMenu ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
HOLEMENU  holemenu,
HWND  hwndActiveObject 
)
static

Definition at line 2295 of file events.c.

2297{
2298 ok(0, "unexpected call\n");
2299 return E_NOTIMPL;
2300}

◆ InPlaceFrame_SetStatusText()

static HRESULT WINAPI InPlaceFrame_SetStatusText ( IOleInPlaceFrame iface,
LPCOLESTR  pszStatusText 
)
static

Definition at line 2308 of file events.c.

2309{
2310 return S_OK;
2311}

◆ InPlaceFrame_TranslateAccelerator()

static HRESULT WINAPI InPlaceFrame_TranslateAccelerator ( IOleInPlaceFrame iface,
LPMSG  lpmsg,
WORD  wID 
)
static

Definition at line 2318 of file events.c.

2319{
2320 ok(0, "unexpected call\n");
2321 return E_NOTIMPL;
2322}

◆ InPlaceSite_AddRef()

static ULONG WINAPI InPlaceSite_AddRef ( IOleInPlaceSite iface)
static

Definition at line 2363 of file events.c.

2364{
2365 return 2;
2366}

◆ InPlaceSite_CanInPlaceActivate()

static HRESULT WINAPI InPlaceSite_CanInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 2385 of file events.c.

2386{
2387 return S_OK;
2388}

◆ InPlaceSite_ContextSensitiveHelp()

static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp ( IOleInPlaceSite iface,
BOOL  fEnterMode 
)
static

Definition at line 2379 of file events.c.

2380{
2381 ok(0, "unexpected call\n");
2382 return E_NOTIMPL;
2383}

◆ InPlaceSite_DeactivateAndUndo()

static HRESULT WINAPI InPlaceSite_DeactivateAndUndo ( IOleInPlaceSite iface)
static

Definition at line 2440 of file events.c.

2441{
2442 return E_NOTIMPL;
2443}

◆ InPlaceSite_DiscardUndoState()

static HRESULT WINAPI InPlaceSite_DiscardUndoState ( IOleInPlaceSite iface)
static

Definition at line 2435 of file events.c.

2436{
2437 return E_NOTIMPL;
2438}

◆ InPlaceSite_GetWindow()

static HRESULT WINAPI InPlaceSite_GetWindow ( IOleInPlaceSite iface,
HWND phwnd 
)
static

Definition at line 2373 of file events.c.

2374{
2375 *phwnd = container_hwnd;
2376 return S_OK;
2377}
static HWND container_hwnd
Definition: events.c:76

◆ InPlaceSite_GetWindowContext()

static HRESULT WINAPI InPlaceSite_GetWindowContext ( IOleInPlaceSite iface,
IOleInPlaceFrame **  ppFrame,
IOleInPlaceUIWindow **  ppDoc,
LPRECT  lprcPosRect,
LPRECT  lprcClipRect,
LPOLEINPLACEFRAMEINFO  lpFrameInfo 
)
static

Definition at line 2400 of file events.c.

2403{
2404 static const RECT rect = {0,0,300,300};
2405
2406 *ppFrame = &InPlaceFrame;
2408 *lprcPosRect = rect;
2409 *lprcClipRect = rect;
2410
2411 ok(lpFrameInfo->cb == sizeof(*lpFrameInfo), "lpFrameInfo->cb = %u, expected %u\n", lpFrameInfo->cb, (unsigned)sizeof(*lpFrameInfo));
2412 lpFrameInfo->fMDIApp = FALSE;
2413 lpFrameInfo->hwndFrame = container_hwnd;
2414 lpFrameInfo->haccel = NULL;
2415 lpFrameInfo->cAccelEntries = 0;
2416
2417 return S_OK;
2418}
static IOleInPlaceFrame InPlaceFrame
Definition: events.c:2342

◆ InPlaceSite_OnInPlaceActivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 2390 of file events.c.

2391{
2392 return S_OK;
2393}

◆ InPlaceSite_OnInPlaceDeactivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate ( IOleInPlaceSite iface)
static

Definition at line 2430 of file events.c.

2431{
2432 return S_OK;
2433}

◆ InPlaceSite_OnPosRectChange()

static HRESULT WINAPI InPlaceSite_OnPosRectChange ( IOleInPlaceSite iface,
LPCRECT  lprcPosRect 
)
static

Definition at line 2445 of file events.c.

2446{
2447 return E_NOTIMPL;
2448}

◆ InPlaceSite_OnUIActivate()

static HRESULT WINAPI InPlaceSite_OnUIActivate ( IOleInPlaceSite iface)
static

Definition at line 2395 of file events.c.

2396{
2397 return S_OK;
2398}

◆ InPlaceSite_OnUIDeactivate()

static HRESULT WINAPI InPlaceSite_OnUIDeactivate ( IOleInPlaceSite iface,
BOOL  fUndoable 
)
static

Definition at line 2425 of file events.c.

2426{
2427 return S_OK;
2428}

◆ InPlaceSite_QueryInterface()

static HRESULT WINAPI InPlaceSite_QueryInterface ( IOleInPlaceSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2358 of file events.c.

2359{
2360 return QueryInterface(riid, ppv);
2361}

◆ InPlaceSite_Release()

static ULONG WINAPI InPlaceSite_Release ( IOleInPlaceSite iface)
static

Definition at line 2368 of file events.c.

2369{
2370 return 1;
2371}

◆ InPlaceSite_Scroll()

static HRESULT WINAPI InPlaceSite_Scroll ( IOleInPlaceSite iface,
SIZE  scrollExtant 
)
static

Definition at line 2420 of file events.c.

2421{
2422 return E_NOTIMPL;
2423}

◆ InPlaceUIWindow_SetActiveObject()

static HRESULT WINAPI InPlaceUIWindow_SetActiveObject ( IOleInPlaceFrame iface,
IOleInPlaceActiveObject pActiveObject,
LPCOLESTR  pszObjName 
)
static

Definition at line 2277 of file events.c.

2279{
2280 return S_OK;
2281}

◆ input_onblur()

static HRESULT WINAPI input_onblur ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 946 of file events.c.

948{
950 test_event_args(&DIID_DispHTMLInputElement, id, wFlags, pdp, pvarRes, pei, pspCaller);
951 test_event_src("INPUT");
952 return S_OK;
953}
static HRESULT WINAPI input_onblur(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:946

Referenced by input_onblur(), and test_focus().

◆ input_onfocus()

static HRESULT WINAPI input_onfocus ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 935 of file events.c.

937{
939 test_event_args(&DIID_DispHTMLInputElement, id, wFlags, pdp, pvarRes, pei, pspCaller);
940 test_event_src("INPUT");
941 return S_OK;
942}
static HRESULT WINAPI input_onfocus(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: events.c:935

Referenced by input_onfocus(), and test_focus().

◆ nocall()

static HRESULT WINAPI nocall ( IDispatchEx iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 1195 of file events.c.

1197{
1198 ok(0, "unexpected call\n");
1199 return S_OK;
1200}

◆ PropertyNotifySink_AddRef()

static ULONG WINAPI PropertyNotifySink_AddRef ( IPropertyNotifySink iface)
static

Definition at line 2616 of file events.c.

2617{
2618 return 2;
2619}

◆ PropertyNotifySink_OnChanged()

static HRESULT WINAPI PropertyNotifySink_OnChanged ( IPropertyNotifySink iface,
DISPID  dispID 
)
static

Definition at line 2626 of file events.c.

2627{
2628 if(dispID == DISPID_READYSTATE){
2629 BSTR state;
2630 HRESULT hres;
2631
2632 hres = IHTMLDocument2_get_readyState(notif_doc, &state);
2633 ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
2634
2635 if(!strcmp_wa(state, "complete"))
2637
2639 }
2640
2641 return S_OK;
2642}
static int state
Definition: maze.c:121
#define DISPID_READYSTATE
Definition: idispids.h:22

◆ PropertyNotifySink_OnRequestEdit()

static HRESULT WINAPI PropertyNotifySink_OnRequestEdit ( IPropertyNotifySink iface,
DISPID  dispID 
)
static

Definition at line 2644 of file events.c.

2645{
2646 ok(0, "unexpected call\n");
2647 return E_NOTIMPL;
2648}

◆ PropertyNotifySink_QueryInterface()

static HRESULT WINAPI PropertyNotifySink_QueryInterface ( IPropertyNotifySink iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2604 of file events.c.

2606{
2608 *ppv = iface;
2609 return S_OK;
2610 }
2611
2612 ok(0, "unexpected call\n");
2613 return E_NOINTERFACE;
2614}
const GUID IID_IPropertyNotifySink

◆ PropertyNotifySink_Release()

static ULONG WINAPI PropertyNotifySink_Release ( IPropertyNotifySink iface)
static

Definition at line 2621 of file events.c.

2622{
2623 return 1;
2624}

◆ pump_msgs()

static void pump_msgs ( BOOL b)
static

Definition at line 1404 of file events.c.

1405{
1406 MSG msg;
1407
1408 if(b) {
1409 while(!*b && GetMessageW(&msg, NULL, 0, 0)) {
1412 }
1413 }else {
1414 while(PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
1417 }
1418 }
1419}
#define msg(x)
Definition: auth_time.c:54
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1196
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)

Referenced by test_focus(), test_iframe_connections(), test_imgload(), test_onclick(), test_onreadystatechange(), test_submit(), and test_timeout().

◆ QueryInterface()

static HRESULT QueryInterface ( REFIID  riid,
void **  ppv 
)
static

Definition at line 2587 of file events.c.

2588{
2589 *ppv = NULL;
2590
2592 *ppv = &ClientSite;
2593 else if(IsEqualGUID(&IID_IOleDocumentSite, riid))
2594 *ppv = &DocumentSite;
2596 *ppv = &InPlaceSite;
2597
2598 return *ppv ? S_OK : E_NOINTERFACE;
2599}
static IOleDocumentSite DocumentSite
Definition: events.c:2585
static IOleClientSite ClientSite
Definition: events.c:2533
const GUID IID_IOleInPlaceSite
const GUID IID_IOleWindow
const GUID IID_IOleClientSite

Referenced by ClientSite_QueryInterface(), DECLARE_INTERFACE(), DECLARE_INTERFACE_(), DECLARE_INTERFACE_IID_(), DocumentSite_QueryInterface(), InPlaceSite_QueryInterface(), and test_NdrDllGetClassObject().

◆ register_cp()

static DWORD register_cp ( IUnknown unk, <