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


C++ IDirectFBWindow::LowerToBottom方法代码示例

本文整理汇总了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;
}
开发者ID:jamesyan84,项目名称:zbase,代码行数:30,代码来源:zkplayerutil.c

示例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;
}
开发者ID:,项目名称:,代码行数:58,代码来源:

示例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:
开发者ID:Limsik,项目名称:e17,代码行数:67,代码来源:evas_directfb_window.c


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