Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenEvents ¶
ListenEvents must get all the events from Gio, in order to get the GioView once it's ready and apply the refresh rate to the window. It needs to be called from the main UI loop.
Example:
select { case e := <-w.Events(): giorefreshrate.ListenEvents(e, w) switch e := e.(type) { (( ... your code ... ))
func PreferHighRefreshRate ¶
func PreferHighRefreshRate()
Prefer the highest refresh rate supported by the display at the current resolution. Needs to be called before any window events are consumed. The refresh rate will be applied by ListenEvents() when it sees that the window is ready.
func PreferLowRefreshRate ¶
func PreferLowRefreshRate()
Prefer the lowest refresh rate supported by the display at the current resolution. Needs to be called before any window events are consumed. The refresh rate will be applied by ListenEvents() when it sees that the window is ready.
Types ¶
This section is empty.