本文整理汇总了C++中IDirectFBWindow::LowerToBottom方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirectFBWindow::LowerToBottom方法的具体用法?C++ IDirectFBWindow::LowerToBottom怎么用?C++ IDirectFBWindow::LowerToBottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirectFBWindow
的用法示例。
在下文中一共展示了IDirectFBWindow::LowerToBottom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dfb_create_window
/* DFB API */
IDirectFBWindow* dfb_create_window (IDirectFB *dfb, int x, int y, int width, int height, gboolean isAlpha)
{
DFBResult err;
DFBWindowDescription dsc;
IDirectFBWindow *window = NULL;
IDirectFBDisplayLayer *layer = NULL;
DFBCHECK(dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer));
layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
dsc.flags = DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT;
dsc.posx = x;
dsc.posy = y;
dsc.width = width;
dsc.height = height;
if(isAlpha) {
dsc.flags |= DWDESC_CAPS;
dsc.caps = DWCAPS_ALPHACHANNEL;
}
err = layer->CreateWindow (layer, &dsc, &window);
if (err!=DR_OK) {
ZError(DBG_INIT, "Failed to dfb_create_window.");
return NULL;
}
/* Set ZKPlayer to Bottom but upper ZImagePlayer */
DFBCHECK(window->LowerToBottom(window));
DFBCHECK(window->SetOpacity(window, 0x0));
return window;
}
示例2:
static DFBResult
Test_RestackWindow( IDirectFBDisplayLayer *layer, void *arg )
{
int i;
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 ) );
/*
* Lower it a few times
*/
for (i=0; i<2; i++) {
SHOW_TEST( "Lower() #%d...", i+1 );
_T( window->Lower( window ) );
SHOW_RESULT( "...Lower() #%d done.", i+1 );
}
/*
* Raise it a few times
*/
for (i=0; i<2; i++) {
SHOW_TEST( "Raise() #%d...", i+1 );
_T( window->Raise( window ) );
SHOW_RESULT( "...Raise() #%d done.", i+1 );
}
/*
* Lower it to the bottom
*/
SHOW_TEST( "LowerToBottom()..." );
_T( window->LowerToBottom( window ) );
SHOW_RESULT( "...LowerToBottom() done." );
/*
* Raise it to the top
*/
SHOW_TEST( "RaiseToTop()..." );
_T( window->RaiseToTop( window ) );
SHOW_RESULT( "...RaiseToTop() done." );
window->Release( window );
return DFB_OK;
}
示例3: main
//.........这里部分代码省略.........
DFBWindowEvent evt;
buffer->WaitForEventWithTimeout( buffer, 0, 10 );
while (buffer->GetEvent( buffer, DFB_EVENT(&evt) ) == DFB_OK) {
IDirectFBWindow* window;
if (evt.window_id == id1)
window = window1;
else
window = window2;
if (active) {
switch (evt.type) {
case DWET_BUTTONDOWN:
if (!grabbed && evt.button == DIBI_LEFT) {
grabbed = 1;
layer->GetCursorPosition( layer,
&startx, &starty );
window->GrabPointer( window );
}
break;
case DWET_BUTTONUP:
switch (evt.button) {
case DIBI_LEFT:
if (grabbed) {
window->UngrabPointer( window );
grabbed = 0;
}
break;
case DIBI_MIDDLE:
upper->LowerToBottom( upper );
upper = (upper == window1) ? window2 : window1;
break;
case DIBI_RIGHT:
quit = DIKS_DOWN;
break;
default:
break;
}
break;
case DWET_KEYDOWN:
if (grabbed)
break;
switch (evt.key_id) {
case DIKI_RIGHT:
active->Move (active, 1, 0);
break;
case DIKI_LEFT:
active->Move (active, -1, 0);
break;
case DIKI_UP:
active->Move (active, 0, -1);
break;
case DIKI_DOWN:
active->Move (active, 0, 1);
break;
default:
break;
}
break;
case DWET_LOSTFOCUS: