Documentation ¶
Index ¶
- Variables
- func Init(ui UI, baseDir string, imageFetchType int) error
- func Main(appContext AppContext)
- func Quit()
- func SendCommand(cmd string)
- func SendSkippingWait()
- func SendStopSkippingWait()
- func SetTextUnitPx(textUnitWidthPx, textUnitHeightPx float64) error
- func SetViewSize(lineCount, lineRuneWidth int) error
- func StringWidth(text string) int32
- type AppContext
- type CallbackJson
- type UI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Export ImageFetchType as int for mobile client. ImageFetchNone int = pubdata.ImageFetchNone ImageFetchRawRGBA int = pubdata.ImageFetchRawRGBA ImageFetchEncodedPNG int = pubdata.ImageFetchEncodedPNG )
Functions ¶
func Main ¶
func Main(appContext AppContext)
run game thread. the game thread runs on background so it returns imediately. quiting the game thread is notifyed through AppContext.NotifyQuit().
func SendCommand ¶
func SendCommand(cmd string)
func SendSkippingWait ¶
func SendSkippingWait()
func SendStopSkippingWait ¶
func SendStopSkippingWait()
func SetTextUnitPx ¶
func SetViewSize ¶
func StringWidth ¶
Types ¶
type AppContext ¶
type AppContext interface { // it is called when mobile.app is quited. // the native framework must be quited by this signal. // the argument erorr indicates why app is quited. // nil error means quit correctly. NotifyQuit(error) }
AppContext manages application context.
type CallbackJson ¶
type CallbackJson interface { OnPublishJson(string) error OnPublishJsonTemporary(string) error OnRemove(nParagraph int) error OnRemoveAll() error }
Callbacks with json message if use complex structure.
type UI ¶
type UI interface { CallbackJson // it is called when mobile.app requires inputting // user's command. OnCommandRequested() // it is called when mobile.app requires just input any command. OnInputRequested() // it is called when mobile.app no longer requires any input, // such as just-input and command. OnInputRequestClosed() }
erago.UI for java bind.
Click to show internal directories.
Click to hide internal directories.