本文整理汇总了C++中OSFactory::getScreenWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ OSFactory::getScreenWidth方法的具体用法?C++ OSFactory::getScreenWidth怎么用?C++ OSFactory::getScreenWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSFactory
的用法示例。
在下文中一共展示了OSFactory::getScreenWidth方法的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" );
}
示例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) );
}
}
示例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 );
}
示例4: getRefWidth
const int SkinParser::getRefWidth( bool toScreen )
{
if( toScreen )
{
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
return pOsFactory->getScreenWidth();
}
string panelId = m_panelStack.back();
if( panelId != "none" )
{
const BuilderData::Panel panel = m_pData->m_listPanel.back();
return panel.m_width;
}
else
{
const BuilderData::Layout layout = m_pData->m_listLayout.back();
return layout.m_width;
}
}
示例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 );
}