/usr/lib/ruby/1.9.1/tk/kinput.rb is in libtcltk-ruby1.9.1 1.9.3.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #
# tk/kinput.rb : control kinput
#
require 'tk'
module TkKinput
include Tk
extend Tk
TkCommandNames = [
'kinput_start'.freeze,
'kinput_send_spot'.freeze,
'kanjiInput'.freeze
].freeze
def TkKinput.start(win, style=None)
tk_call('kinput_start', win, style)
end
def kinput_start(style=None)
TkKinput.start(self, style)
end
def TkKinput.send_spot(win)
tk_call('kinput_send_spot', win)
end
def kinput_send_spot
TkKinput.send_spot(self)
end
def TkKinput.input_start(win, keys=nil)
tk_call('kanjiInput', 'start', win, *hash_kv(keys))
end
def kanji_input_start(keys=nil)
TkKinput.input_start(self, keys)
end
def TkKinput.attribute_config(win, slot, value=None)
if slot.kind_of? Hash
tk_call('kanjiInput', 'attribute', win, *hash_kv(slot))
else
tk_call('kanjiInput', 'attribute', win, "-#{slot}", value)
end
end
def kinput_attribute_config(slot, value=None)
TkKinput.attribute_config(self, slot, value)
end
def TkKinput.attribute_info(win, slot=nil)
if slot
conf = tk_split_list(tk_call('kanjiInput', 'attribute',
win, "-#{slot}"))
conf[0] = conf[0][1..-1]
conf
else
tk_split_list(tk_call('kanjiInput', 'attribute', win)).collect{|conf|
conf[0] = conf[0][1..-1]
conf
}
end
end
def kinput_attribute_info(slot=nil)
TkKinput.attribute_info(self, slot)
end
def TkKinput.input_end(win)
tk_call('kanjiInput', 'end', win)
end
def kanji_input_end
TkKinput.input_end(self)
end
end
|