major move of all glib specific bindings and extendable objects from go runtime to go-glib package

This commit is contained in:
Avi Zimmerman
2021-01-17 18:42:14 +02:00
parent d5306ebb3e
commit 56afdb35c0
61 changed files with 286 additions and 2614 deletions

View File

@@ -3,12 +3,12 @@ package examples
import (
"fmt"
"github.com/tinyzimmer/go-gst/gst"
"github.com/tinyzimmer/go-glib/glib"
)
// Run is used to wrap the given function in a main loop and print any error
func Run(f func() error) {
mainLoop := gst.NewMainLoop(gst.DefaultMainContext(), false)
mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false)
defer mainLoop.Unref()
@@ -24,8 +24,8 @@ func Run(f func() error) {
// RunLoop is used to wrap the given function in a main loop and print any error.
// The main loop itself is passed to the function for more control over exiting.
func RunLoop(f func(*gst.MainLoop) error) {
mainLoop := gst.NewMainLoop(gst.DefaultMainContext(), false)
func RunLoop(f func(*glib.MainLoop) error) {
mainLoop := glib.NewMainLoop(glib.MainContextDefault(), false)
defer mainLoop.Unref()
if err := f(mainLoop); err != nil {