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


C++ TestApplication::DisconnectAll方法代码示例

本文整理汇总了C++中TestApplication::DisconnectAll方法的典型用法代码示例。如果您正苦于以下问题:C++ TestApplication::DisconnectAll方法的具体用法?C++ TestApplication::DisconnectAll怎么用?C++ TestApplication::DisconnectAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestApplication的用法示例。


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

示例1: UtcDaliBaseHandleConnectSignal

int UtcDaliBaseHandleConnectSignal(void)
{
  TestApplication application;
  tet_infoline("Testing Dali::BaseHandle::ConnectSignal");

  gTouchCallBackCalled = false;

  // get the root layer
  Actor actor = Actor::New();
  actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
  actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
  actor.SetPosition( 240, 400 );
  actor.SetSize( 100, 100 );

  Stage::GetCurrent().Add( actor );

  DALI_TEST_CHECK( gTouchCallBackCalled == false );

  // connect to its touch signal
  actor.ConnectSignal( &application, "touched", TestCallback() );

  application.SendNotification();
  application.Render(1000);
  application.SendNotification();
  application.Render(1000);

  // simulate a touch event
  Dali::TouchPoint point( 0, TouchPoint::Down, 240, 400  );
  Dali::Integration::TouchEvent event;
  event.AddPoint( point );
  application.ProcessEvent( event );

  application.SendNotification();
  application.Render(1000);
  application.SendNotification();
  application.Render(1000);

  DALI_TEST_CHECK( application.GetConnectionCount() > 0 );
  DALI_TEST_CHECK( gTouchCallBackCalled == true );

  gTouchCallBackCalled = false;
  application.DisconnectAll();

  // simulate another touch event
  application.ProcessEvent( event );

  DALI_TEST_CHECK( gTouchCallBackCalled == false );
  END_TEST;
}
开发者ID:mettalla,项目名称:dali,代码行数:49,代码来源:utc-Dali-BaseHandle.cpp


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