本文整理汇总了C++中AutoGCRoot::get方法的典型用法代码示例。如果您正苦于以下问题:C++ AutoGCRoot::get方法的具体用法?C++ AutoGCRoot::get怎么用?C++ AutoGCRoot::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutoGCRoot
的用法示例。
在下文中一共展示了AutoGCRoot::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lime_cairo_set_font_size
void lime_cairo_set_font_size (value handle, double size) {
cairo_font_face_t* face = cairo_get_font_face ((cairo_t*)val_data (handle));
if (face) {
cairo_font_type_t type = cairo_font_face_get_type (face);
if (type == CAIRO_FONT_TYPE_FT) {
AutoGCRoot* fontReference = (AutoGCRoot*)cairo_font_face_get_user_data (face, &userData);
if (fontReference) {
Font* font = (Font*)val_data (fontReference->get ());
font->SetSize (size);
}
}
}
cairo_set_font_size ((cairo_t*)val_data (handle), size);
}
示例2: controlEvent
void controlEvent(Control *control, EventType type)
{
val_call2(
clbkControlEvent.get(),
ReferenceToValue(control, true),
EnumToValue(type)
);
}
示例3: visitWrapper
bool visitWrapper(Node *node)
{
bool result =
val_get_bool(val_call1(
clbkVisitMethod.get(),
ReferenceToValue(node, true)
));
return result;
}
示例4: ELOG
JAVA_EXPORT void JNICALL Java_org_haxe_nme_NME_onCallback(JNIEnv * env, jobject obj, jlong handle)
{
int top = 0;
gc_set_top_of_stack(&top,true);
ELOG("NME onCallback %p",(void *)handle);
AutoGCRoot *root = (AutoGCRoot *)handle;
val_call0( root->get() );
delete root;
gc_set_top_of_stack(0,true);
}
示例5: touchEvent
void touchEvent(Touch::TouchEvent event, int x, int y, unsigned int contactIndex)
{
value vals[] =
{
EnumToValue(event),
alloc_int(x),
alloc_int(y),
alloc_int(contactIndex)
};
val_callN(clbkTouchEvent.get(), vals, 4);
}
示例6: mouseEvent
bool mouseEvent(Mouse::MouseEvent event, int x, int y, int wheelData)
{
value vals[] =
{
EnumToValue(event),
alloc_int(x),
alloc_int(y),
alloc_int(wheelData)
};
return val_get_bool(val_callN(clbkMouseEvent.get(), vals, 4));
}
示例7: collisionEvent
void collisionEvent(
PhysicsCollisionObject::CollisionListener::EventType type,
const PhysicsCollisionObject::CollisionPair &collisionPair,
const Vector3 &contactPointA,
const Vector3 &contactPointB)
{
value args[] =
{
EnumToValue(type),
ObjectToValue(
new PhysicsCollisionObject::CollisionPair(
collisionPair.objectA,
collisionPair.objectB
)
),
ObjectToValue(&contactPointA, false),
ObjectToValue(&contactPointB, false)
};
val_callN(clbkCollisionEvent.get(), args, 4);
}
示例8: gamepadEvent
void gamepadEvent(Gamepad::GamepadEvent event, Gamepad *gamepad)
{
val_call2(clbkGamepadEvent.get(), EnumToValue(event), ObjectToValue(gamepad, false));
}
示例9: menuEvent
void menuEvent()
{
val_call0(clbkMenuEvent.get());
}
示例10: keyEvent
void keyEvent(Keyboard::KeyEvent event, int key)
{
val_call2(clbkKeyEvent.get(), EnumToValue(event), alloc_int(key));
}
示例11: gestureTapEvent
void gestureTapEvent(int x, int y)
{
val_call2(clbkGestureTapEvent.get(), alloc_int(x), alloc_int(y));
}
示例12: gestureSwipeEvent
void gestureSwipeEvent(int x, int y, int direction)
{
val_call3(clbkGestureSwipeEvent.get(), alloc_int(x), alloc_int(y), alloc_int(direction));
}
示例13: gesturePinchEvent
void gesturePinchEvent(int x, int y, float scale)
{
val_call3(clbkGesturePinchEvent.get(), alloc_int(x), alloc_int(y), alloc_float(scale));
}
示例14: render
void render(float elapsedTime)
{
val_call1(clbkRender.get(), alloc_float(elapsedTime));
}
示例15: update
void update(float elapsedTime)
{
val_call1(clbkUpdate.get(), alloc_float(elapsedTime));
}