Documentation ¶
Overview ¶
Package guigtk provides a simple GTK3 GUI to interact with UPnP media players.
Index ¶
- Constants
- Variables
- type TVGui
- func (gui *TVGui) AddRenderer(rend upnptype.Renderer)
- func (gui *TVGui) AddServer(srv upnptype.Server)
- func (gui *TVGui) ConnectControl()
- func (gui *TVGui) DisconnectControl()
- func (gui *TVGui) Load()
- func (gui *TVGui) RemoveRenderer(rend upnptype.Renderer)
- func (gui *TVGui) RemoveServer(srv upnptype.Server)
- func (gui *TVGui) SetCurrentTime(secs int, percent float64)
- func (gui *TVGui) SetDuration(dur string)
- func (gui *TVGui) SetMuted(muted bool)
- func (gui *TVGui) SetPlaybackState(state upnptype.PlaybackState)
- func (gui *TVGui) SetRenderer(rend upnptype.Renderer)
- func (gui *TVGui) SetSeekDelta(delta int)
- func (gui *TVGui) SetServer(srv upnptype.Server)
- func (gui *TVGui) SetTitle(title string)
- func (gui *TVGui) SetVolume(vol int)
- func (gui *TVGui) SetVolumeDelta(delta int)
Constants ¶
const ( RowIcon = iota RowText RowRenderer // Object RowUDN // ID RowSeriesID RowVisible )
Rows for renderer and server comboboxes.
const ( WindowWidth = 250 WindowHeight = 400 )
Window settings.
Variables ¶
var (
// WindowTitle defines the title of the window.
WindowTitle = "TVPlay"
)
Functions ¶
This section is empty.
Types ¶
type TVGui ¶
type TVGui struct { gtk.Box // Container is first level. Act as (at least) a GtkWidget. // contains filtered or unexported fields }
TVGui is a media renderer selector widget using ComboBox.
func NewGui ¶
func NewGui(control upnptype.MediaControl) (*TVGui, *gtk.Window)
NewGui creates a window with a TVGui widget.
func NewTVGui ¶
func NewTVGui(control upnptype.MediaControl) *TVGui
NewTVGui creates a new TVGui widget.
Parameters:
control *MediaControl The UPnP media control point interface.
func (*TVGui) AddRenderer ¶
AddRenderer adds a media renderer to the gui.
func (*TVGui) ConnectControl ¶
func (gui *TVGui) ConnectControl()
ConnectControl connects media callbacks.
func (*TVGui) DisconnectControl ¶
func (gui *TVGui) DisconnectControl()
DisconnectControl removes media callbacks.
func (*TVGui) RemoveRenderer ¶
RemoveRenderer removes a media renderer from the gui.
func (*TVGui) RemoveServer ¶
RemoveServer removes a media server from the gui.
func (*TVGui) SetCurrentTime ¶
SetCurrentTime sets the position of the timer slider.
func (*TVGui) SetDuration ¶
SetDuration sets the content of the duration label.
func (*TVGui) SetPlaybackState ¶
func (gui *TVGui) SetPlaybackState(state upnptype.PlaybackState)
SetPlaybackState update controls according to the new state.
func (*TVGui) SetRenderer ¶
SetRenderer selects a renderer in the combo. Don't propagate event.
func (*TVGui) SetSeekDelta ¶
SetSeekDelta configures the default seek delta for user actions.
func (*TVGui) SetVolumeDelta ¶
SetVolumeDelta sets the volume interval for volume changes.