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


C++ AutoGCRoot类代码示例

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


在下文中一共展示了AutoGCRoot类的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);
		
	}
开发者ID:Gemioli,项目名称:lime,代码行数:26,代码来源:CairoBindings.cpp

示例2: Java_org_haxe_nme_NME_onCallback

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);
}
开发者ID:deltaluca,项目名称:Haxe-NME--fork-,代码行数:11,代码来源:JNI.cpp

示例3: controlEvent

 void controlEvent(Control *control, EventType type)
 {
     val_call2(
             clbkControlEvent.get(),
             ReferenceToValue(control, true),
             EnumToValue(type)
         );
 }
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:Control_Listener.cpp

示例4: visitWrapper

 bool visitWrapper(Node *node)
 {
     bool result =
             val_get_bool(val_call1(
                     clbkVisitMethod.get(),
                     ReferenceToValue(node, true)
                 ));
     return result;
 }
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:9,代码来源:Scene.cpp

示例5: 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));
    }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:12,代码来源:hx_Game.cpp

示例6: 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);
    }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:12,代码来源:hx_Game.cpp

示例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);
    }
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:21,代码来源:PhysicsCollisionObject_CollisionListener.cpp

示例8: menuEvent

 void menuEvent()
 {
     val_call0(clbkMenuEvent.get());
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例9: keyEvent

 void keyEvent(Keyboard::KeyEvent event, int key)
 {
     val_call2(clbkKeyEvent.get(), EnumToValue(event), alloc_int(key));
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例10: gestureTapEvent

 void gestureTapEvent(int x, int y)
 {
     val_call2(clbkGestureTapEvent.get(), alloc_int(x), alloc_int(y));
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例11: gestureSwipeEvent

 void gestureSwipeEvent(int x, int y, int direction)
 {
     val_call3(clbkGestureSwipeEvent.get(), alloc_int(x), alloc_int(y), alloc_int(direction));
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例12: gesturePinchEvent

 void gesturePinchEvent(int x, int y, float scale)
 {
      val_call3(clbkGesturePinchEvent.get(), alloc_int(x), alloc_int(y), alloc_float(scale));
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例13: update

 void update(float elapsedTime)
 {
     val_call1(clbkUpdate.get(), alloc_float(elapsedTime));
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例14: finalize

 void finalize()
 {
     val_call0(clbkFinalize.get());
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp

示例15: initialize

 void initialize()
 {
     val_call0(clbkInitialize.get());
 }
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:4,代码来源:hx_Game.cpp


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