package com.ym.library.activity.contract

import com.ym.library.activity.presenter.NewWebPresenter


/**
 * Created by gaoleichao on 2019/4/22
 */
class NewWebContract {
    interface View {


        fun closePage()

        fun loadUrl(url: String)

        fun setTitle(title: String?)

        fun setTitleEnabled(visibility: Int)

        fun addJavascriptInterface(javaScriptInterface: NewWebPresenter.NewWebJavaScriptInterface, name: String)

        fun setCloseVisibility(visibility: Int)

        fun setTimerDesc(desc: String)

        fun setTopDesc(desc: String)

        fun setTopDescVisibity(visibility: Int)

        fun setTimerLayoutVisibility(visibility: Int)

        fun setTimerMaxProgress(max: Int)

        fun updateTimerProgress(progress: Int)

        fun showCoinsDialog(coins: Int,string: String)

        fun setBottomDesc(desc: String)

        fun setCurrentNum(award: Int,num: Int,title: String)

        fun setBottomVisibity(visibility: Int)

        fun setBottomMaxProgress(progress: Int)

        fun updateBottomProgress(progress: Int)

        fun setBottomProgressVisibity(visibility: Int)

    }

    interface Presenter {

        fun savePic(path: String)

        fun onScrollChanged()

        fun onDownloadStart(url: String?)

        fun onPageStarted(newUrl: String)

        fun onPageFinished(url: String)

        fun shouldOverrideUrlLoading(url: String): Boolean

        fun dispatchTouchEvent()

        fun getHomeUrl():String

        fun nextUrl()

    }
}