guigtk

package
v0.0.0-...-366e4d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2016 License: GPL-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package guigtk provides a simple GTK3 GUI to interact with UPnP media players.

Index

Constants

View Source
const (
	RowIcon = iota
	RowText
	RowRenderer // Object
	RowUDN      // ID
	RowSeriesID
	RowVisible
)

Rows for renderer and server comboboxes.

View Source
const (
	WindowWidth  = 250
	WindowHeight = 400
)

Window settings.

Variables

View Source
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

func (gui *TVGui) AddRenderer(rend upnptype.Renderer)

AddRenderer adds a media renderer to the gui.

func (*TVGui) AddServer

func (gui *TVGui) AddServer(srv upnptype.Server)

AddServer adds a media server 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) Load

func (gui *TVGui) Load()

Load fills renderers and servers combo boxes.

func (*TVGui) RemoveRenderer

func (gui *TVGui) RemoveRenderer(rend upnptype.Renderer)

RemoveRenderer removes a media renderer from the gui.

func (*TVGui) RemoveServer

func (gui *TVGui) RemoveServer(srv upnptype.Server)

RemoveServer removes a media server from the gui.

func (*TVGui) SetCurrentTime

func (gui *TVGui) SetCurrentTime(secs int, percent float64)

SetCurrentTime sets the position of the timer slider.

func (*TVGui) SetDuration

func (gui *TVGui) SetDuration(dur string)

SetDuration sets the content of the duration label.

func (*TVGui) SetMuted

func (gui *TVGui) SetMuted(muted bool)

SetMuted sets the position of the muted button.

func (*TVGui) SetPlaybackState

func (gui *TVGui) SetPlaybackState(state upnptype.PlaybackState)

SetPlaybackState update controls according to the new state.

func (*TVGui) SetRenderer

func (gui *TVGui) SetRenderer(rend upnptype.Renderer)

SetRenderer selects a renderer in the combo. Don't propagate event.

func (*TVGui) SetSeekDelta

func (gui *TVGui) SetSeekDelta(delta int)

SetSeekDelta configures the default seek delta for user actions.

func (*TVGui) SetServer

func (gui *TVGui) SetServer(srv upnptype.Server)

SetServer selects a server in the combo. Don't propagate event.

func (*TVGui) SetTitle

func (gui *TVGui) SetTitle(title string)

SetTitle sets the content of the title label.

func (*TVGui) SetVolume

func (gui *TVGui) SetVolume(vol int)

SetVolume sets the position of the volume slider.

func (*TVGui) SetVolumeDelta

func (gui *TVGui) SetVolumeDelta(delta int)

SetVolumeDelta sets the volume interval for volume changes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL