mshtml: Add some basic documentation for the dispex and its vtbl.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2023-07-26 14:57:57 +03:00 committed by Alexandre Julliard
parent c7e6f208d6
commit 9e8c4fd940

View file

@ -337,14 +337,31 @@ typedef struct dispex_dynamic_data_t dispex_dynamic_data_t;
typedef struct DispatchEx DispatchEx;
/*
dispex is our base IDispatchEx implementation for all mshtml objects, and the vtbl allows
customizing the behavior depending on the object. Objects have basically 3 types of props:
- builtin props: These props are implicitly generated from the TypeInfo (disp_tid and iface_tids in dispex_static_data_t).
- custom props: These props are specific to an object, they are created using vtbl below (e.g. indexed props in HTMLRectCollection).
- dynamic props: These props are generally allocated by external code (e.g. 'document.wine = 42' creates 'wine' dynamic prop on document)
*/
typedef struct {
/* Called when the object wants to handle DISPID_VALUE invocations */
HRESULT (*value)(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
/* Used when the object has custom props, and this returns DISPIDs for them */
HRESULT (*get_dispid)(DispatchEx*,BSTR,DWORD,DISPID*);
/* These are called when the object implements GetMemberName, InvokeEx, DeleteMemberByDispID and GetNextDispID for custom props */
HRESULT (*get_name)(DispatchEx*,DISPID,BSTR*);
HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*delete)(DispatchEx*,DISPID);
HRESULT (*next_dispid)(DispatchEx*,DISPID,DISPID*);
/* Used by objects that want to delay their compat mode initialization until actually needed */
compat_mode_t (*get_compat_mode)(DispatchEx*);
/* Used by objects that want to populate some dynamic props on initialization */
HRESULT (*populate_props)(DispatchEx*);
} dispex_static_data_vtbl_t;