#include <assert.h>
#include "jscript.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (jscript) |
|
static EnumeratorInstance * | enumerator_from_jsdisp (jsdisp_t *jsdisp) |
|
static EnumeratorInstance * | enumerator_from_vdisp (vdisp_t *vdisp) |
|
static EnumeratorInstance * | enumerator_this (vdisp_t *jsthis) |
|
static HRESULT | enumvar_get_next_item (EnumeratorInstance *This) |
|
static void | Enumerator_destructor (jsdisp_t *dispex) |
|
static HRESULT | Enumerator_atEnd (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | Enumerator_item (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | Enumerator_moveFirst (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | Enumerator_moveNext (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | alloc_enumerator (script_ctx_t *ctx, jsdisp_t *object_prototype, EnumeratorInstance **ret) |
|
static HRESULT | create_enumerator (script_ctx_t *ctx, jsval_t *argv, jsdisp_t **ret) |
|
static HRESULT | EnumeratorConstr_value (script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
HRESULT | create_enumerator_constr (script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret) |
|
|
static const WCHAR | atEndW [] = {'a','t','E','n','d',0} |
|
static const WCHAR | itemW [] = {'i','t','e','m',0} |
|
static const WCHAR | moveFirstW [] = {'m','o','v','e','F','i','r','s','t',0} |
|
static const WCHAR | moveNextW [] = {'m','o','v','e','N','e','x','t',0} |
|
static const builtin_prop_t | Enumerator_props [] |
|
static const builtin_info_t | Enumerator_info |
|
static const builtin_info_t | EnumeratorInst_info |
|
static const builtin_info_t | EnumeratorConstr_info |
|
◆ alloc_enumerator()
Definition at line 204 of file enumerator.c.
205{
208
210 if(!enumerator)
212
213 if(object_prototype)
215 else
217 ctx->enumerator_constr);
218
220 {
223 }
224
227}
static BOOL heap_free(void *mem)
static const builtin_info_t EnumeratorInst_info
static const builtin_info_t Enumerator_info
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Referenced by create_enumerator(), and create_enumerator_constr().
◆ create_enumerator()
Definition at line 229 of file enumerator.c.
230{
236
238 {
240
242 {
243 FIXME(
"I don't know how to handle this type!\n");
245 }
246
248
249
254 {
255 WARN(
"Enumerator: no DISPID_NEWENUM.\n");
257 }
258
260 {
262 &IID_IEnumVARIANT, (
void**)&
enumvar);
263 }
264 else
265 {
266 FIXME(
"Enumerator: NewEnum unexpected type of varresult (%d).\n",
V_VT(&varresult));
268 }
272 }
273
276 {
280 }
281
286 {
289 }
290
293}
static HRESULT enumvar_get_next_item(EnumeratorInstance *This)
static HRESULT alloc_enumerator(script_ctx_t *ctx, jsdisp_t *object_prototype, EnumeratorInstance **ret)
static void jsdisp_release(jsdisp_t *jsdisp)
static IDispatch * get_object(jsval_t v)
static BOOL is_object_instance(jsval_t v)
struct stdole::DISPPARAMS DISPPARAMS
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
Referenced by EnumeratorConstr_value().
◆ create_enumerator_constr()
Definition at line 332 of file enumerator.c.
333{
336 static const WCHAR EnumeratorW[] = {
'E',
'n',
'u',
'm',
'e',
'r',
'a',
't',
'o',
'r',0};
337
341
346
348}
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
static HRESULT EnumeratorConstr_value(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t EnumeratorConstr_info
static const WCHAR EnumeratorW[]
Referenced by init_constructors().
◆ Enumerator_atEnd()
Definition at line 100 of file enumerator.c.
102{
104
107
109
113}
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
static EnumeratorInstance * enumerator_this(vdisp_t *jsthis)
GLdouble GLdouble GLdouble r
#define JS_E_ENUMERATOR_EXPECTED
static jsval_t jsval_bool(BOOL b)
◆ Enumerator_destructor()
Definition at line 90 of file enumerator.c.
91{
93
95
98}
static EnumeratorInstance * enumerator_from_jsdisp(jsdisp_t *jsdisp)
void jsval_release(jsval_t val)
◆ enumerator_from_jsdisp()
◆ enumerator_from_vdisp()
◆ Enumerator_item()
Definition at line 115 of file enumerator.c.
117{
119
121
124
126}
HRESULT jsval_copy(jsval_t v, jsval_t *r)
◆ Enumerator_moveFirst()
Definition at line 128 of file enumerator.c.
130{
133
135
138
140 {
141 hres = IEnumVARIANT_Reset(
This->enumvar);
144
149 }
150
154}
static jsval_t jsval_undefined(void)
◆ Enumerator_moveNext()
Definition at line 156 of file enumerator.c.
158{
161
163
166
168 {
172 }
173
177}
◆ enumerator_this()
◆ EnumeratorConstr_value()
Definition at line 295 of file enumerator.c.
297{
300
302
304 case DISPATCH_CONSTRUCT: {
307
311
313 break;
314 }
315 default:
318 }
319
321}
HRESULT throw_syntax_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
static HRESULT create_enumerator(script_ctx_t *ctx, jsval_t *argv, jsdisp_t **ret)
static jsval_t jsval_obj(jsdisp_t *obj)
Referenced by create_enumerator_constr().
◆ enumvar_get_next_item()
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
jscript |
| ) |
|
◆ atEndW
◆ Enumerator_info
◆ Enumerator_props
Initial value:= {
}
static const WCHAR itemW[]
static const WCHAR atEndW[]
static const WCHAR moveFirstW[]
static const WCHAR moveNextW[]
static HRESULT Enumerator_atEnd(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_moveNext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_moveFirst(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_item(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition at line 179 of file enumerator.c.
◆ EnumeratorConstr_info
◆ EnumeratorInst_info
◆ itemW
◆ moveFirstW
◆ moveNextW