ZFFramework
 
Loading...
Searching...
No Matches
ZFUIImageAsync.h File Reference

async image load util More...

#include "ZFUIWidgetDef.h"

Go to the source code of this file.

Macros

#define ZFUIImageSerializeType_ZFUIImageAsync
 see ZFUIIMAGE_SERIALIZE_TYPE_DEFINE
 
#define ZFSerializableKeyword_ZFUIImageAsync_imageSrc
 keyword for serialize
 
#define ZFSerializableKeyword_ZFUIImageAsync_imageLoadFail
 keyword for serialize
 
#define ZFSerializableKeyword_ZFUIImageAsync_imageLoading
 keyword for serialize
 

Functions

zfautoT< ZFUIImageZFUIImageAsync (const ZFInput &src, ZFUIImage *imageLoadFail=(zft_zfnull), ZFUIImage *imageLoading=(zft_zfnull))
 async image load util
 
zfbool ZFUIImageAsyncT (ZFUIImage *ret, const ZFInput &src, ZFUIImage *imageLoadFail=(zft_zfnull), ZFUIImage *imageLoading=(zft_zfnull))
 see ZFUIImageAsync
 

Detailed Description

async image load util

Macro Definition Documentation

◆ ZFUIImageSerializeType_ZFUIImageAsync

#define ZFUIImageSerializeType_ZFUIImageAsync

see ZFUIIMAGE_SERIALIZE_TYPE_DEFINE

serializable data:

<ZFUIImage imageType="ZFUIImageAsync">
<ZFCallback category="imageSrc" ... /> // callback serialization, see #ZFCALLBACK_SERIALIZE_TYPE_DEFINE
<ZFUIImage category="imageLoadFail" ... /> // load fail image
<ZFUIImage category="imageLoading" ... /> // loading image
callback used by ZFFramework
Definition ZFCallback.h:96
image storage
Definition ZFUIImage.h:30

Function Documentation

◆ ZFUIImageAsync()

zfautoT< ZFUIImage > ZFUIImageAsync ( const ZFInput & src,
ZFUIImage * imageLoadFail = (zft_zfnull),
ZFUIImage * imageLoading = (zft_zfnull) )
extern

async image load util

how it works:

  1. return a dummy holder image
  2. loading image in background, by ZFUIImageLoad
  3. notify impl to redraw, by ZFUIImage::imageStateImplNotifyUpdate
Note
the imageLoadFail and imageLoading would be retained by the returned image object