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


C++ OSFactory::getScreenHeight方法代码示例

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


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

示例1: getRefDimensions

void SkinParser::getRefDimensions( int &rWidth, int &rHeight, bool toScreen )
{
    if( toScreen )
    {
        OSFactory *pOsFactory = OSFactory::instance( getIntf() );
        rWidth = pOsFactory->getScreenWidth();
        rHeight = pOsFactory->getScreenHeight();
        return;
    }

    string panelId = m_panelStack.back();
    if( panelId != "none" )
    {
        list<BuilderData::Panel>::const_iterator it;
        for( it = m_pData->m_listPanel.begin();
             it != m_pData->m_listPanel.end(); ++it )
        {
            if( it->m_id == panelId )
            {
                rWidth = it->m_width;
                rHeight = it->m_height;
                return;
            }
        }
    }
    else
    {
        const BuilderData::Layout layout = m_pData->m_listLayout.back();
        rWidth = layout.m_width;
        rHeight = layout.m_height;
        return;
    }
    msg_Err( getIntf(), "failure to retrieve parent panel or layout" );
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:34,代码来源:skin_parser.cpp

示例2: if

void Tooltip::CmdShow::execute()
{
    if( m_pParent->m_pImage )
    {
        if( m_pParent->m_xPos == -1 )
        {
            // Get the mouse coordinates and the image size
            OSFactory *pOsFactory = OSFactory::instance( m_pParent->getIntf() );
            int x, y;
            pOsFactory->getMousePos( x, y );
            int scrWidth = pOsFactory->getScreenWidth();
            int scrHeight = pOsFactory->getScreenHeight();
            int w = m_pParent->m_pImage->getWidth();
            int h = m_pParent->m_pImage->getHeight();

            // Compute the position of the tooltip
            x -= (w / 2 + 4);
            y += (h + 5);
            if( x + w > scrWidth )
                x -= (x + w - scrWidth);
            else if( x < 0 )
                x = 0;
            if( y + h > scrHeight )
                y -= (2 * h + 20);

            m_pParent->m_xPos = x;
            m_pParent->m_yPos = y;
        }

        // Show the tooltip window
        m_pParent->m_pOsTooltip->show( m_pParent->m_xPos, m_pParent->m_yPos,
                                   *(m_pParent->m_pImage) );
    }
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:34,代码来源:tooltip.cpp

示例3: SkinObject

VoutManager::VoutManager( intf_thread_t *pIntf ): SkinObject( pIntf ),
     m_pCtrlVideoVec(), m_pCtrlVideoVecBackup(), m_SavedWndVec(),
     m_pVoutMainWindow( NULL ), m_pFscWindow( NULL )
{
    m_pVoutMainWindow = new VoutMainWindow( getIntf() );

    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
    int width = pOsFactory->getScreenWidth();
    int height = pOsFactory->getScreenHeight();

    m_pVoutMainWindow->move( 0, 0 );
    m_pVoutMainWindow->resize( width, height );

    VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
    rFullscreen.addObserver( this );
}
开发者ID:Aakash-729,项目名称:vlc,代码行数:16,代码来源:vout_manager.cpp

示例4: getRefHeight

const int SkinParser::getRefHeight( bool toScreen )
{
    if( toScreen )
    {
        OSFactory *pOsFactory = OSFactory::instance( getIntf() );
        return pOsFactory->getScreenHeight();
    }

    string panelId = m_panelStack.back();
    if( panelId != "none" )
    {
        const BuilderData::Panel panel = m_pData->m_listPanel.back();
        return panel.m_height;
    }
    else
    {
        const BuilderData::Layout layout = m_pData->m_listLayout.back();
        return layout.m_height;
    }
}
开发者ID:banketree,项目名称:faplayer,代码行数:20,代码来源:skin_parser.cpp

示例5: XInternAtom

void X11DragDrop::dndPosition( ldata_t data )
{
    Window src = data[0];
    Time time = data[2];

    Atom selectionAtom = XInternAtom( XDISPLAY, "XdndSelection", 0 );
    Atom targetAtom = XInternAtom( XDISPLAY, "text/plain", 0 );
    Atom propAtom = XInternAtom( XDISPLAY, "VLC_SELECTION", 0 );

    Atom actionAtom = XInternAtom( XDISPLAY, "XdndActionCopy", 0 );
    Atom typeAtom = XInternAtom( XDISPLAY, "XdndFinished", 0 );

    // Convert the selection into the given target
    // NEEDED or it doesn't work!
    XConvertSelection( XDISPLAY, selectionAtom, targetAtom, propAtom, src,
                       time );

    actionAtom = XInternAtom( XDISPLAY, "XdndActionCopy", 0 );
    typeAtom = XInternAtom( XDISPLAY, "XdndStatus", 0 );

    XEvent event;
    event.type = ClientMessage;
    event.xclient.window = src;
    event.xclient.display = XDISPLAY;
    event.xclient.message_type = typeAtom;
    event.xclient.format = 32;
    event.xclient.data.l[0] = m_wnd;
    // Accept the drop (1), or not (0).
    event.xclient.data.l[1] = m_target != None ? 1 : 0;
    OSFactory *pOsFactory = X11Factory::instance( getIntf() );
    int w = pOsFactory->getScreenWidth();
    int h = pOsFactory->getScreenHeight();
    event.xclient.data.l[2] = 0;
    event.xclient.data.l[3] = (w << 16) | h;
    event.xclient.data.l[4] = actionAtom;

    // Tell the source whether we accept the drop
    XSendEvent( XDISPLAY, src, False, 0, &event );
}
开发者ID:cobr123,项目名称:qtVlc,代码行数:39,代码来源:x11_dragdrop.cpp


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