void Event::dispatch(EventHandler & evh) { if (!isHandled()) { evh.onEvent(*this); if (isHandled() && !handler) { handler = &evh; } } }
void TouchEvent::dispatch(EventHandler & element) { if (!isHandled()) { element.onTouchEvent(*this); if (isHandled() && !handler) { handler = &element; } } Event::dispatch(element); }
void chord::handleProgram (const rpc_program &prog) { warn << "chord::handleProgram: " << prog.name << " (" << prog.progno << ")\n"; if (isHandled (prog.progno)) return; else { handledProgs.push_back (&prog); } }
void AppEventManager::callFunction(SDL_Event e) { if (isHandled(e.type)) { std::map<EventType, EventFunction>::iterator event_it = event_functions.find(e.type); if (event_it != event_functions.end()) { event_it->second(e); } else { simple_functions[e.type](); } } else { default_function(e); } }
/** Called during the PTP connection establishment phase to mark the completion of sending the init ack to the initiator @return Flag stating that the ini has been sent successfully. */ TBool CPTPIPEventHandler::HandleInitAck() { OstTraceFunctionEntry0( CPTPIPEVENTHANDLER_HANDLEINITACK_ENTRY ); TBool isHandled(EFalse); if (iState == EInitSendInProgress) { //Now signal the connection, set its state and set it to active. Connection().SetConnectionState(CPTPIPConnection::EInitialisationComplete); Connection().CompleteSelf(iStatus.Int()); iState = EIdle; isHandled = ETrue; } OstTraceFunctionExit0( CPTPIPEVENTHANDLER_HANDLEINITACK_EXIT ); return isHandled; }
void AppEventManager::registerSimpleFunction(EventType etype, SimpleFunction sfunc) { if (!isHandled(etype)) { simple_functions[etype] = sfunc; } }
void AppEventManager::registerEventFunction(EventType etype, EventFunction efunc) { if (!isHandled(etype)) { event_functions[etype] = efunc; } }