#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_this (jsval_t vthis) |
| |
| static HRESULT | enumvar_get_next_item (EnumeratorInstance *This, script_ctx_t *ctx) |
| |
| static void | Enumerator_destructor (jsdisp_t *dispex) |
| |
| static HRESULT | Enumerator_gc_traverse (struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *dispex) |
| |
| static HRESULT | Enumerator_atEnd (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
| |
| static HRESULT | Enumerator_item (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
| |
| static HRESULT | Enumerator_moveFirst (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
| |
| static HRESULT | Enumerator_moveNext (script_ctx_t *ctx, jsval_t vthis, 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, jsval_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) |
| |
◆ alloc_enumerator()
Definition at line 195 of file enumerator.c.
196{
199
201 if(!enumerator)
203
204 if(object_prototype)
206 else
208 ctx->enumerator_constr);
209
211 {
214 }
215
218}
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 220 of file enumerator.c.
221{
227
229 {
231
233 {
234 FIXME(
"I don't know how to handle this type!\n");
236 }
237
239
240
245 {
246 WARN(
"Enumerator: no DISPID_NEWENUM.\n");
248 }
249
251 {
253 &IID_IEnumVARIANT, (
void**)&
enumvar);
254 }
255 else
256 {
257 FIXME(
"Enumerator: NewEnum unexpected type of varresult (%d).\n",
V_VT(&varresult));
259 }
263 }
264
267 {
271 }
272
277 {
280 }
281
284}
static HRESULT enumvar_get_next_item(EnumeratorInstance *This, script_ctx_t *ctx)
static HRESULT alloc_enumerator(script_ctx_t *ctx, jsdisp_t *object_prototype, EnumeratorInstance **ret)
ULONG jsdisp_release(jsdisp_t *obj)
#define JS_E_OBJECT_NOT_COLLECTION
static IDispatch * get_object(jsval_t v)
static BOOL is_object_instance(jsval_t v)
struct stdole::DISPPARAMS DISPPARAMS
#define DISPATCH_PROPERTYGET
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
Referenced by EnumeratorConstr_value().
◆ create_enumerator_constr()
Definition at line 320 of file enumerator.c.
321{
324
328
332
334}
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 const builtin_info_t EnumeratorConstr_info
static HRESULT EnumeratorConstr_value(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
const unsigned int PROPF_CONSTR
Referenced by init_constructors().
◆ Enumerator_atEnd()
Definition at line 97 of file enumerator.c.
99{
101
104
106
110}
static EnumeratorInstance * enumerator_this(jsval_t vthis)
GLdouble GLdouble GLdouble r
#define JS_E_ENUMERATOR_EXPECTED
static jsval_t jsval_bool(BOOL b)
◆ Enumerator_destructor()
Definition at line 81 of file enumerator.c.
82{
84
86
88 IEnumVARIANT_Release(
This->enumvar);
90}
static EnumeratorInstance * enumerator_from_jsdisp(jsdisp_t *jsdisp)
void jsval_release(jsval_t val)
◆ enumerator_from_jsdisp()
◆ Enumerator_gc_traverse()
Definition at line 92 of file enumerator.c.
93{
95}
HRESULT gc_process_linked_val(struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *obj, jsval_t *link)
◆ Enumerator_item()
Definition at line 112 of file enumerator.c.
114{
116
118
121
123}
HRESULT jsval_copy(jsval_t v, jsval_t *r)
◆ Enumerator_moveFirst()
Definition at line 125 of file enumerator.c.
127{
130
132
135
137 {
138 hres = IEnumVARIANT_Reset(
This->enumvar);
141
146 }
147
151}
static jsval_t jsval_undefined(void)
◆ Enumerator_moveNext()
Definition at line 153 of file enumerator.c.
155{
158
160
163
165 {
169 }
170
174}
◆ enumerator_this()
◆ EnumeratorConstr_value()
Definition at line 286 of file enumerator.c.
288{
291
293
295 case DISPATCH_CONSTRUCT: {
298
302
305 break;
306 }
307 default:
310 }
311
313}
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 |
| ) |
|
◆ Enumerator_info
◆ Enumerator_props
Initial value:= {
}
static HRESULT Enumerator_moveFirst(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_moveNext(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_item(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Enumerator_atEnd(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
const unsigned int PROPF_METHOD
Definition at line 176 of file enumerator.c.
◆ EnumeratorConstr_info
Initial value:= {
}
HRESULT Function_value(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition at line 315 of file enumerator.c.
Referenced by create_enumerator_constr().
◆ EnumeratorInst_info
Initial value:= {
}
static void Enumerator_destructor(jsdisp_t *dispex)
static HRESULT Enumerator_gc_traverse(struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *dispex)
Definition at line 189 of file enumerator.c.
Referenced by alloc_enumerator().