v0.8.4
This commit is contained in:
parent
f28cbcc016
commit
ad70b68564
10 changed files with 57 additions and 13 deletions
|
|
@ -1,3 +1,6 @@
|
|||
## This test program was kindly provided by Mr. Tomohiro, see
|
||||
## https://github.com/StefanSalewski/gintro/issues/99
|
||||
|
||||
# nim c libnice_simple_test.nim
|
||||
#
|
||||
# Test code for libnice.
|
||||
|
|
@ -98,7 +101,7 @@ proc cbNiceRecv(agent: nice.Agent; streamID: cuint; componentID: cuint; len: cui
|
|||
|
||||
proc main =
|
||||
gio.networkingInit()
|
||||
|
||||
|
||||
gloop = newMainLoop(nil, false)
|
||||
|
||||
lagent = nice.newAgent(glib.getContext(gloop), nice.CompatibilityRfc5245)
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ nim c gsettings.nim
|
|||
nim c gstBasicTutorial1.nim
|
||||
nim c handy.nim
|
||||
nim c label.nim
|
||||
nim c libnice_simple_test.nim
|
||||
nim c listview.nim
|
||||
nim c menubar.nim
|
||||
nim c overlay_tree1.nim
|
||||
nim c simpledrawingarea.nim
|
||||
nim c simple_example.nim
|
||||
nim c spinbutton.nim
|
||||
nim c sourceview_test.nim
|
||||
nim c t0.nim
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ nim c --gc:arc gsettings.nim
|
|||
nim c --gc:arc gstBasicTutorial1.nim
|
||||
nim c --gc:arc handy.nim
|
||||
nim c --gc:arc label.nim
|
||||
nim c --gc:arc libnice_simple_test.nim
|
||||
nim c --gc:arc listview.nim
|
||||
nim c --gc:arc menubar.nim
|
||||
nim c --gc:arc overlay_tree1.nim
|
||||
nim c --gc:arc simpledrawingarea.nim
|
||||
nim c --gc:arc simple_example.nim
|
||||
nim c --gc:arc spinbutton.nim
|
||||
nim c --gc:arc sourceview_test.nim
|
||||
nim c --gc:arc t0.nim
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
# ./sdp-example 0 $(host -4 -t A stun.stunprotocol.org | awk '{ print $4 }')
|
||||
# ./sdp-example 1 $(host -4 -t A stun.stunprotocol.org | awk '{ print $4 }')
|
||||
|
||||
## This is a legacy Nim libnice example. Deprecated, we may remove it, or improve the code...
|
||||
|
||||
# https://forum.nim-lang.org/t/3752
|
||||
when (compiles do: import gintro/gtk):
|
||||
import gintro/[gtk, glib, gobject, gio, nice]
|
||||
|
|
|
|||
|
|
@ -8,8 +8,15 @@
|
|||
## simple-example 0 $(host -4 -t A stun.stunprotocol.org | awk '{ print $4 }')
|
||||
## simple-example 1 $(host -4 -t A stun.stunprotocol.org | awk '{ print $4 }')
|
||||
##
|
||||
## this code contains the fixes of Mr. Tomohiro for Windows OS, see https://github.com/StefanSalewski/gintro/issues/99
|
||||
|
||||
## The construct "when (compiles do: import ..." is fragile -- we let it in for now
|
||||
## to support windows OS without a full gtk version available.
|
||||
## Of course we could use dummygtk always and avoid that construct.
|
||||
## We may improse the situation later somehow...
|
||||
# https://github.com/nim-lang/Nim/issues/16287
|
||||
# https://forum.nim-lang.org/t/3752
|
||||
#
|
||||
when (compiles do: import gintro/gtk):
|
||||
import gintro/[gtk, glib, gobject, gio, nice]
|
||||
else:
|
||||
|
|
@ -190,7 +197,7 @@ proc cbCandidateGatheringDone(agent: nice.Agent; streamId: int) =
|
|||
echo("")
|
||||
## Listen on stdin for the remote candidate list
|
||||
echo("Enter remote data (single line, no wrapping):")
|
||||
discard addWatch(ioStdin, glib.PRIORITY_DEFAULT, {IOCFlag.`in`} , stdinRemoteInfoCb, agent)
|
||||
discard addWatch(ioStdin, glib.PRIORITY_DEFAULT, {IOCFlag.`in`}, stdinRemoteInfoCb, agent)
|
||||
stdout.write("> ")
|
||||
flushFile(stdout)
|
||||
|
||||
|
|
@ -223,7 +230,7 @@ proc cbComponentStateChanged(agent: nice.Agent; streamId: int; componentId: int;
|
|||
echo(" [$1]:$2)" % [$ipaddr, $getPort(remote.impl.`addr`)])
|
||||
## Listen to stdin and send data written to it
|
||||
echo("\nSend lines to remote (Ctrl-D to quit):")
|
||||
discard addWatch(ioStdin, glib.PRIORITY_DEFAULT, {IOCFlag.`in`} , stdinSendDataCb, agent)
|
||||
discard addWatch(ioStdin, glib.PRIORITY_DEFAULT, {IOCFlag.`in`}, stdinSendDataCb, agent)
|
||||
stdout.write("> ")
|
||||
flushFile(stdout)
|
||||
elif state == ComponentState.failed.ord:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ proc prepareWindowForOrientation(orientation: gtk.Orientation) =
|
|||
discard connect(window, "delete_event", onDeleteEvent)
|
||||
let mainbox = gtk.newBox(if orientation == gtk.Orientation.horizontal: Orientation.vertical else: Orientation.horizontal, 2)
|
||||
window.add(mainbox)
|
||||
let wrapButton = newToggleButtonWithLabel("Wrap")
|
||||
let wrapButton = newToggleButton("Wrap")
|
||||
mainbox.add(wrapButton)
|
||||
var max = 0
|
||||
while max <= 999999999:
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ proc main =
|
|||
box.append(content)
|
||||
let footer = newActionBar()
|
||||
footer.setCenterWidget(newCheckButton("Middle"))
|
||||
let button = newToggleButtonWithLabel("Custom")
|
||||
let button = newToggleButton("Custom")
|
||||
button.connect("clicked", changeHeader, window)
|
||||
footer.packStart(button)
|
||||
#var button1 = newButton("Subtitle")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue