本文整理汇总了C++中StringW::set方法的典型用法代码示例。如果您正苦于以下问题:C++ StringW::set方法的具体用法?C++ StringW::set怎么用?C++ StringW::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringW
的用法示例。
在下文中一共展示了StringW::set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
Application_Local::Application_Local()
{
#if defined(FOG_OS_WINDOWS)
StringW applicationCommand;
applicationCommand.set(reinterpret_cast<const CharW*>(::GetCommandLineW()));
Application_parseWinCmdLine(applicationCommand, applicationArguments);
applicationArgumentsWasSet();
#endif // FOG_OS_WINDOWS
}
示例2: if
err_t X11UIEngine::openXlib()
{
// Try to load X11 library and all helper libraries. We need only X11 to be
// present, all other libraries are optional and will be only used if found.
// Load X11.
StringW name;
char* badSymbol;
const size_t numXLibSymbols = sizeof(X11UIEngineXLibAPI) / sizeof(void*);
const size_t numXExtSymbols = sizeof(X11UIEngineXExtAPI) / sizeof(void*);
const size_t numXRenderSymbols = sizeof(X11UIEngineXRenderAPI) / sizeof(void*);
// Load X11.
FOG_RETURN_ON_ERROR(name.set(Ascii8("X11")));
if (_XLibLibrary.openLibrary(name) != ERR_OK)
{
Logger::error("Fog::X11UIEngine", "openXlib", "Failed to open X11 library.");
return ERR_UI_X11_ENGINE_XLIB_NOT_AVAILABLE;
}
if (_XLibLibrary.getSymbols(reinterpret_cast<void**>(&_XLib),
X11UIEngine_XLibSymbolNames, FOG_ARRAY_SIZE(X11UIEngine_XLibSymbolNames),
numXLibSymbols, &badSymbol) != numXLibSymbols)
{
Logger::error("Fog::X11UIEngine", "openXlib", "Failed to load X11 symbol %s.", badSymbol);
return ERR_UI_X11_ENGINE_XLIB_NOT_AVAILABLE;
}
// Load Xext.
name.set(Ascii8("Xext"));
if (_XExtLibrary.openLibrary(name) != ERR_OK)
{
Logger::debug("Fog::X11UIEngine", "openXlib", "Failed to open Xext library.");
}
else if (_XExtLibrary.getSymbols(reinterpret_cast<void**>(&_XExt),
X11UIEngine_XExtSymbolNames, FOG_ARRAY_SIZE(X11UIEngine_XExtSymbolNames),
numXExtSymbols, &badSymbol) != numXExtSymbols)
{
Logger::debug("Fog::X11UIEngine", "openXlib", "Failed to load Xext symbol %s.", badSymbol);
_XExtLibrary.close();
}
// Load Xrender.
name.set(Ascii8("Xrender"));
if (_XRenderLibrary.openLibrary(name) != ERR_OK)
{
Logger::debug("Fog::X11UIEngine", "openXlib", "Failed to open Xrender library.");
}
else if (_XRenderLibrary.getSymbols(reinterpret_cast<void**>(&_XRender),
X11UIEngine_XRenderSymbolNames, FOG_ARRAY_SIZE(X11UIEngine_XRenderSymbolNames),
numXRenderSymbols, &badSymbol) != numXRenderSymbols)
{
Logger::debug("Fog::X11UIEngine", "openXlib", "Failed to load Xrender symbol %s.", badSymbol);
_XRenderLibrary.close();
}
// Setup locale.
if (!_XLib._XSupportsLocale())
{
Logger::debug("Fog::X11UIEngine", "openXlib", "X does not support locale.");
}
else
{
char* localeModifiers = _XLib._XSetLocaleModifiers("");
if (localeModifiers == NULL)
{
Logger::debug("Fog::X11UIEngine", "openXlib", "Can't set X locale modifiers.");
}
}
// Setup error handlers.
_XLib._XSetIOErrorHandler(X11UIEngine_IOErrorHandler);
_XLib._XSetErrorHandler(X11UIEngine_ErrorHandler);
return ERR_OK;
}