コード例 #1
0
ファイル: PluginSource.cpp プロジェクト: A600/xbmc
bool CPluginSource::IsType(TYPE type) const
{
  return ((type == ADDON_VIDEO && Provides(VIDEO))
       || (type == ADDON_AUDIO && Provides(AUDIO))
       || (type == ADDON_IMAGE && Provides(IMAGE))
       || (type == ADDON_EXECUTABLE && Provides(EXECUTABLE)));
}
コード例 #2
0
bool Customizations::GetBitmap( const wxString& key, wxBitmap& bitmap )
{
	if ( Provides( key ) )
	{
    const auto path = m_customs.getSingleValue(STD_STRING(key));
    wxBitmap icon_bmp;
		if( icon_bmp.IsOk() )
		{
			bitmap = icon_bmp;
			return true;
		}
	}
	return false;//either loaded bmp was kaput or key not found
}
コード例 #3
0
ファイル: customizations.cpp プロジェクト: hoijui/springlobby
bool Customizations::GetBitmap( const wxString& key, wxBitmap& bitmap )
{
	if ( Provides( key ) )
	{
		const wxString path = m_customs.getSingleValue( key );
#ifdef SL_QT_MODE
		wxBitmap icon_bmp ( wxQtConvertImage( usync().GetQImage( m_modname, path, false ) ) );
#else
		wxBitmap icon_bmp (usync().GetImage( m_modname, path, false ) );
#endif
		if( icon_bmp.IsOk() )
		{
			bitmap = icon_bmp;
			return true;
		}
	}
	return false;//either loaded bmp was kaput or key not found
}