本文整理汇总了C++中IDirectFBWindow::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirectFBWindow::Destroy方法的具体用法?C++ IDirectFBWindow::Destroy怎么用?C++ IDirectFBWindow::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirectFBWindow
的用法示例。
在下文中一共展示了IDirectFBWindow::Destroy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static DFBResult
Test_DestroyWindow( IDirectFBDisplayLayer *layer, void *arg )
{
IDirectFBWindow *window;
D_ASSERT( m_toplevel_id != 0 );
/*
* Get the top level window
*/
_T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) );
/*
* Destroy it
*/
SHOW_TEST( "Destroy()..." );
_T( window->Destroy( window ) );
SHOW_RESULT( "...Destroy() done." );
window->Release( window );
return DFB_OK;
}
示例2: releaseWindow
void DFBDeviceScreen::releaseWindow(void* win) {
set<IDirectFBWindow*>::iterator i;
IDirectFBWindow* w;
w = (IDirectFBWindow*)win;
pthread_mutex_lock(&winMutex);
if (windowPool != NULL) {
i = windowPool->find(w);
if (i != windowPool->end()) {
windowPool->erase(i);
pthread_mutex_unlock(&winMutex);
} else {
pthread_mutex_unlock(&winMutex);
}
} else {
pthread_mutex_unlock(&winMutex);
}
w->Destroy(w);
w->Release(w);
win = NULL;
w = NULL;
}