当前位置: 首页>>代码示例>>C++>>正文


C++ JSMutableHandleValue类代码示例

本文整理汇总了C++中JSMutableHandleValue的典型用法代码示例。如果您正苦于以下问题:C++ JSMutableHandleValue类的具体用法?C++ JSMutableHandleValue怎么用?C++ JSMutableHandleValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了JSMutableHandleValue类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getPropertyWrapper

JSBool JavaObject::getPropertyWrapper(JSContext* ctx, JSHandleObject obj,
    JSHandleId id, JSMutableHandleValue vp) {
  jsval rval;
  JSBool result = JavaObject::getProperty(ctx, obj.get(), id.get(), &rval);
  vp.set(rval);
  return result;
}
开发者ID:djvano,项目名称:gwt-plugins,代码行数:7,代码来源:JavaObject.cpp

示例2: def_timestep_view_set_filterColor

CEXPORT JSBool def_timestep_view_set_filterColor(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		if (vp.isString()) {
	JSString *jstr = vp.toString();

	JSTR_TO_CSTR(cx, jstr, cstr);

	rgba color;
	rgba_parse(&color, cstr);
	thiz->filter_color = color;
}

		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:20,代码来源:js_timestep_view_template.gen.cpp

示例3: def_timestep_image_map_set_width

CEXPORT JSBool def_timestep_image_map_set_width(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_image_map *thiz = (timestep_image_map*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		thiz->width = vp.toInt32();
		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:SpielmeisterCompany,项目名称:native-ios,代码行数:11,代码来源:js_timestep_image_map_template.gen.cpp

示例4: def_timestep_view_get_offsetX

CEXPORT JSBool def_timestep_view_get_offsetX(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		vp.setNumber(thiz->offset_x);
		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:11,代码来源:js_timestep_view_template.gen.cpp

示例5: def_timestep_image_map_get_marginLeft

CEXPORT JSBool def_timestep_image_map_get_marginLeft(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_image_map *thiz = (timestep_image_map*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		vp.setInt32(thiz->margin_left);
		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:SpielmeisterCompany,项目名称:native-ios,代码行数:11,代码来源:js_timestep_image_map_template.gen.cpp

示例6: def_timestep_view_get_filterType

CEXPORT JSBool def_timestep_view_get_filterType(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		vp.setInt32(thiz->filter_type);
		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:11,代码来源:js_timestep_view_template.gen.cpp

示例7: def_timestep_view_set_y

CEXPORT JSBool def_timestep_view_set_y(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		thiz->y = vp.toNumber();
		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:11,代码来源:js_timestep_view_template.gen.cpp

示例8: def_timestep_image_map_get_url

CEXPORT JSBool def_timestep_image_map_get_url(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_image_map *thiz = (timestep_image_map*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		vp.setString(JS_NewStringCopyZ(cx, thiz->url));

		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:SpielmeisterCompany,项目名称:native-ios,代码行数:12,代码来源:js_timestep_image_map_template.gen.cpp

示例9: def_timestep_view_get___firstRender

CEXPORT JSBool def_timestep_view_get___firstRender(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		vp.setBoolean(thiz->__first_render);

		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:12,代码来源:js_timestep_view_template.gen.cpp

示例10: def_timestep_image_map_set_url

CEXPORT JSBool def_timestep_image_map_set_url(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_image_map *thiz = (timestep_image_map*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		if (vp.isString()) {
	JSString *jstr = vp.toString();

	JSTR_TO_CSTR_PERSIST(cx, jstr, cstr);

	if (thiz->url) {
		free(thiz->url);
	}

	thiz->url = cstr;
}

		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:SpielmeisterCompany,项目名称:native-ios,代码行数:22,代码来源:js_timestep_image_map_template.gen.cpp

示例11: js_cocos2dx_extension_WebSocket_get_readyState

static JSBool js_cocos2dx_extension_WebSocket_get_readyState(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp)
{
    JSObject* jsobj = obj.get();
	js_proxy_t *proxy = jsb_get_js_proxy(jsobj);
	WebSocket* cobj = (WebSocket *)(proxy ? proxy->ptr : NULL);
	JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
    
    if (cobj) {
        vp.set(INT_TO_JSVAL((int)cobj->getReadyState()));
        return JS_TRUE;
    } else {
        JS_ReportError(cx, "Error: WebSocket instance is invalid.");
        return JS_FALSE;
    }
}
开发者ID:Ben-Cortina,项目名称:GameBox,代码行数:15,代码来源:jsb_websocket.cpp

示例12: def_timestep_view_get_filterColor

CEXPORT JSBool def_timestep_view_get_filterColor(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) {
	JS_BeginRequest(cx);
	timestep_view *thiz = (timestep_view*)JS_GetPrivate(obj.get());
	if (thiz) {
		
		rgba prop = thiz->filter_color;

char buf[64];
int len = rgba_to_string(&prop, buf);

vp.setString(JS_NewStringCopyN(cx, buf, len));

		
	}
	JS_EndRequest(cx);
	return JS_TRUE;
}
开发者ID:debarko,项目名称:native-ios,代码行数:17,代码来源:js_timestep_view_template.gen.cpp

示例13: setPropertyWrapper

JSBool JavaObject::setPropertyWrapper(JSContext* ctx, JSHandleObject obj,
    JSHandleId id, JSBool strict, JSMutableHandleValue vp) {
  jsval rval = vp.get();
  return JavaObject::setProperty(ctx, obj, id, strict, &rval);
}
开发者ID:djvano,项目名称:gwt-plugins,代码行数:5,代码来源:JavaObject.cpp

示例14: setProperty

JSBool
setProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp)
{
  printf("in setProperty %ld=%s\n",JSID_BITS(id.get()),JS_EncodeString(cx,JS_ValueToString(cx,vp.get())));
  return true;
}
开发者ID:trarck,项目名称:learnspidermonkey,代码行数:6,代码来源:test_binding_object.cpp


注:本文中的JSMutableHandleValue类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。