Module: wine
Branch: master
Commit: 9e8c4fd94017b7f4b3f10e34f904123bfd6e09b0
URL: https://gitlab.winehq.org/wine/wine/-/commit/9e8c4fd94017b7f4b3f10e34f90412…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Date: Wed Jul 26 14:57:57 2023 +0300
mshtml: Add some basic documentation for the dispex and its vtbl.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/mshtml/mshtml_private.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 59d652a828b..9a606c4e501 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -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;