Documentation
¶
Overview ¶
Package gui is an abstraction layer for real GUI implementations. It defines the Events that can be passed from the GUI to the emulation code and also the Requests that can be made from the emulation code to the GUI. Implementations need to convert their specific signals and requests to and from these abstractions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureReq ¶
type FeatureReq string
FeatureReq is used to request the setting of a gui attribute eg. toggling the overlay.
const ( // notify gui of the underlying emulation mode. ReqSetEmulationMode FeatureReq = "ReqSetEmulationMode" // govern.Mode // program is ending. gui should do anything required before final exit. ReqEnd FeatureReq = "ReqEnd" // nil // put gui output into full-screen mode (ie. no window border and content // the size of the monitor). ReqFullScreen FeatureReq = "ReqFullScreen" // bool // an event generated by the emulation has occured. for example, the // emulation has been paused. ReqEmulationNotice FeatureReq = "ReqEmulationNotice" // notifications.Notify // an event generated by the cartridge has occured. for example, network // activity from a PlusROM cartridge. ReqCartridgeNotice FeatureReq = "ReqCartridgeNotice" // notifications.Notify // peripheral has changed for one of the ports. ReqPeripheralChange FeatureReq = "ReqPeripheralChange" // plugging.PortID, plugging.PeripheralID // open ROM selector. ReqROMSelector FeatureReq = "ReqROMSelector" // nil // request for a comparison window to be opened. ReqComparison FeatureReq = "ReqComparison" // chan *image.RGBA, chan *image.RGBA // request for bot features to be enabled. a nil argument will cause the // bot features to be removed. ReqBotFeedback FeatureReq = "ReqBotFeedback" // *bots.Feedback // request for the coprocess source window to open at the specified line ReqCoProcSourceLine FeatureReq = "ReqCoProcSourceLine" // *developer.SourceLine // request a screenshot to be taken // optional argument is the filename for the screenshot ReqScreenshot FeatureReq = "ReqScreenshot" // [optional] filename )
List of valid feature requests. argument must be of the type specified or else the interface{} type conversion will fail and the application will probably crash.
Note that, like the name suggests, these are requests, they may or may not be satisfied depending other conditions in the GUI.
type FeatureReqData ¶ added in v0.7.1
type FeatureReqData interface{}
FeatureReqData represents the information associated with a FeatureReq. See commentary for the defined FeatureReq values for the underlying type.
type GUI ¶
type GUI interface { // Send a request to set a GUI feature. Returns an error so that it can be // shown in the appropriate context (terminal or the log depending on what // was being requested) SetFeature(request FeatureReq, args ...FeatureReqData) error }
GUI defines the operations that can be performed on visual user interfaces.
type Stub ¶ added in v0.7.1
type Stub struct{}
Stub is a type of convenience that implements the GUI interface.
func (Stub) SetFeature ¶ added in v0.7.1
func (s Stub) SetFeature(request FeatureReq, args ...FeatureReqData) error
SetFeature implements the GUI interface.
Directories
¶
Path | Synopsis |
---|---|
Package CRT contains non-gui-specific and non-VCS-specific information.
|
Package CRT contains non-gui-specific and non-VCS-specific information. |
Package fonts embeds a set of FontAwesome glyphs as font data into a byte array.
|
Package fonts embeds a set of FontAwesome glyphs as font data into a byte array. |
Package sdlaudio provides the Audio type.
|
Package sdlaudio provides the Audio type. |
This file is part of Gopher2600.
|
This file is part of Gopher2600. |
framebuffer
Package framebuffer provides a convenient way of working with OpenGL framebuffers.
|
Package framebuffer provides a convenient way of working with OpenGL framebuffers. |
lazyvalues
Package lazyvalues is the method used by sdlimgui to read emulator data from the GUI thread.
|
Package lazyvalues is the method used by sdlimgui to read emulator data from the GUI thread. |
shaders
Package shaders contains the shader source for displaying GUI elements on the screen.
|
Package shaders contains the shader source for displaying GUI elements on the screen. |