caret(win, keys=nil)
click to toggle source
def TkXIM.caret(win, keys=nil)
if keys
tk_call_without_enc('tk', 'caret', win, *hash_kv(keys))
self
else
lst = tk_split_list(tk_call_without_enc('tk', 'caret', win))
info = {}
while key = lst.shift
info[key[1..-1]] = lst.shift
end
info
end
end
configinfo(win, slot=nil)
click to toggle source
def TkXIM.configinfo(win, slot=nil)
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
begin
if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
if slot
conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
conf[0] = conf[0][1..-1]
conf
else
tk_split_list(tk_call('imconfigure', win)).collect{|conf|
conf[0] = conf[0][1..-1]
conf
}
end
else
[]
end
rescue
[]
end
else
TkXIM.current_configinfo(win, slot)
end
end
current_configinfo(win, slot=nil)
click to toggle source
def TkXIM.current_configinfo(win, slot=nil)
begin
if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
if slot
conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
{ conf[0][1..-1] => conf[1] }
else
ret = {}
tk_split_list(tk_call('imconfigure', win)).each{|conf|
ret[conf[0][1..-1]] = conf[1]
}
ret
end
else
{}
end
rescue
{}
end
end
caret(keys=nil)
click to toggle source
def caret(keys=nil)
TkXIM.caret(self, keys=nil)
end
imconfiginfo(slot=nil)
click to toggle source
def imconfiginfo(slot=nil)
TkXIM.configinfo(self, slot)
end