Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
using Gtk
|
||||
|
||||
function keypresswindow()
|
||||
tcount = 0
|
||||
txt = "Press a Key"
|
||||
win = GtkWindow("Keypress Test", 500, 30) |> (GtkFrame() |> ((vbox = GtkBox(:v)) |> (lab = GtkLabel(txt))))
|
||||
function keycall(w, event)
|
||||
ch = Char(event.keyval)
|
||||
tcount += 1
|
||||
set_gtk_property!(lab, :label, "You have typed $tcount chars including $ch this time")
|
||||
end
|
||||
signal_connect(keycall, win, "key-press-event")
|
||||
|
||||
cond = Condition()
|
||||
endit(w) = notify(cond)
|
||||
signal_connect(endit, win, :destroy)
|
||||
showall(win)
|
||||
wait(cond)
|
||||
end
|
||||
|
||||
keypresswindow()
|
||||
Loading…
Add table
Add a link
Reference in a new issue