Documentation
¶
Overview ¶
Package internal provides functions/types that should be accessible for the testing backend and for the view but not for any one else. For example the definition of library wrapper wrapping the used aspects of gio or the standard library which need to be mocked.
Index ¶
Constants ¶
const LibPnc = "view: internal: lib-adaption: unknown signature"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GioLiber ¶
type GioLiber interface { // Main calls by default app.Main to breath some actual appearance // into a NewWindow. Main() // NewWindow provides the application window defined by the // Window-interface. NewWindow() Window // Adapt replaces the method from the default implementation with // given method. Adapt(method any) }
GioLiber abstracts from the implementation of gio's functionality to make it mockable.
type Guier ¶
type Guier interface { AppendAppOption(app.Option) SetSendTimeout(time.Duration) Lib() GioLiber SetEventHandlerWrapper(func(func())) Msg(id int, txt string, aa ...any) Message SetIDSeed(int) }
GUIer abstracts from the view.GUI type in order to setup GUI options also from internal options for testing without making their setting part of the public API: the GUIer interface is internally defined, i.e. by spec not accessible outside of the view package. The public methods are implemented by a private view.GUI wrapper hence also not accessible from the public API.
type Message ¶
type Message interface{}
Message abstracts from view.Message in order to be able to issue messages also from internal options.
type Option ¶
An Option can be pass into GUI.Main to set a GUI's options.
func EventHandlerWrapper ¶
func EventHandlerWrapper(cb func(func())) Option
EventHandlerWrapper provides given callback cb with an function that starts event handling to allow the testing backend more fine grained control when things are happening.