static void cxLoadingArrive(cxEvent *event) { cxLoading this = cxActionView(event->sender); CX_EVENT_FIRE(this, onLoading); cxTimer timer = cxViewAppendTimer(this, 1.0f, 1); CX_EVENT_QUICK(timer->onArrive, cxFinishedArrive); }
CX_OBJECT_INIT(cxTextureFactory, cxObject) { cxEngine engine = cxEngineInstance(); this->caches = CX_ALLOC(cxHash); CX_SLOT_CONNECT(engine->onMemory, this, onMemory, cxTextureFactoryMemory); CX_EVENT_QUICK(engine->onFree, cxTextureFactoryDestroy); }
CX_OBJECT_INIT(cxSprite, cxView) { this->texCoord = cxBoxTex2fDefault(); cxSpriteSetBlendFactor(this, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); CX_EVENT_QUICK(this->super.onDirty, cxSpriteDirtyEvent); CX_METHOD_OVERRIDE(this->super.Draw, cxSpriteDraw); cxSpriteSetShader(this, cxShaderDefaultKey); cxObjectSetReadAttrFunc(this, cxSpriteReadAttr); }
CX_OBJECT_INIT(cxLoading, cxView) { this->isLoading = false; CX_EVENT_QUICK(this->super.onUpdate, cxLoadingOnUpdate); CX_METHOD_OVERRIDE(this->super.Touch, cxLoadingTouch); }
void cxViewOnUpdate(cxAny pview,cxEventFunc func) { cxView this = pview; CX_EVENT_QUICK(this->onUpdate, func); }