MessageLoop

Post events to main GUI message loop.

Modulerequire("gui")
TypeObject

Depending on the runtime you use, Yue may or may not provide this API.

Note that MessageLoop is a class instead of an instance, the APIs are provided as class methods. This is because the MessageLoop does not manage message loop, it just provides wrappers of system GUI message loop APIs.

This class can not be created by user, you can only call its class methods.

const gui = require('gui')
gui.MessageLoop.run()

Class methods

run()

Enter GUI message loop.

quit()

Quit current message loop.

postTask(task)

Post a task to main thread's message loop.

Parameters

postDelayedTask(ms, task)

Post a task to main thread's message loop and execute it after ms.

Parameters