/* ĊĠ ĠCopyright Ġ( c ) Ġ 2 0 2 0 , ĠSur f Studio ĠLLC . ĊĊĠ ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); ĊĠ Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . ĊĠ ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat ĊĊĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 ĊĊĠ ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware ĊĠ Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , ĊĠ ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . ĊĠ ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand ĊĠ Ġlimitations Ġunder Ġthe ĠLicense . Ċ */ Ċ package Ġru . surf studio . android . core . m vi . impl s . event . hub . back _ pressed Ċ Ċ import Ġru . surf studio . android . core . m vi . event . factory . Param less Event Factory Ċ import Ġru . surf studio . android . core . m vi . event . Event Ċ import Ġru . surf studio . android . core . m vi . event . hub . EventHub Ċ import Ġru . surf studio . android . core . ui . event . back . On Back Pressed Delegate Ċ Ċ /** Ċ Ġ* Ġ[ EventHub ], Ġthat Ġhandles ĠBack Pressed Events Ġ( click s Ġon Ġsystem Ġ" Back " Ġbutton ) Ċ Ġ*/ Ċ interface ĠBack Pressed EventHub < E Ġ: ĠEvent , ĠEvent Stream > Ġ: ĠEvent Hub < E , ĠEvent Stream >, ĠOn Back Pressed Delegate Ġ{ ĊĊĠĠĠ Ġval Ġback Pressed Creator : ĠParam less Event Factory < E >? ĊĊĠĠĠ Ġoverride Ġfun Ġon Back Pressed (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġevent Ġ= Ġback Pressed Creator ?. invoke () Ġ?: Ġreturn Ġfalse ĊĠĠĠĠĠĠĠ Ġemit ( event ) ĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} Ċ }