本文整理汇总了C++中Application::GetResource方法的典型用法代码示例。如果您正苦于以下问题:C++ Application::GetResource方法的具体用法?C++ Application::GetResource怎么用?C++ Application::GetResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application
的用法示例。
在下文中一共展示了Application::GetResource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetUriSource
void
BitmapImage::UriSourceChanged ()
{
Surface *surface = Deployment::GetCurrent ()->GetSurface ();
Application *app = Application::GetCurrent ();
Uri *uri = GetUriSource ();
if (surface == NULL) {
SetBitmapData (NULL, false);
return;
}
if (app && uri) {
if (get_res_aborter)
delete get_res_aborter;
get_res_aborter = new Cancellable ();
app->GetResource (GetResourceBase(), uri, resource_notify, pixbuf_write, policy,
HttpRequest::DisableFileStorage, get_res_aborter, this);
}
}
示例2:
static void
load_window_icons (MoonWindow *window, Deployment *deployment, IconCollection *icons)
{
Application *application = deployment->GetCurrentApplication ();
IconLoader *loader;
int count, i;
/* load the icons */
if (icons && (count = icons->GetCount ()) > 0) {
for (i = 0; i < count; i++) {
Value *value = icons->GetValueAt (i);
Icon *icon = value->AsIcon ();
const Uri *uri = icon->GetSource ();
loader = g_new0 (IconLoader, 1);
loader->window = window;
application->GetResource (NULL, uri, icon_loader_notify_cb, icon_loader_write_cb, MediaPolicy, HttpRequest::DisableFileStorage, NULL, loader);
}
}
}