Class: TclTkIp
- Defined in:
- sample/demos-en/tkencoding.rb,
lib/tk.rb,
tcltklib.c,
lib/tk.rb,
lib/tk.rb
Overview
dummy methods
Instance Attribute Summary collapse
-
#encoding ⇒ Object
from tkencoding.rb by [email protected].
Class Method Summary collapse
Instance Method Summary collapse
- #_conv_listelement ⇒ Object
- #_create_console ⇒ Object
-
#_eval(cmd) ⇒ Object
(also: #_eval_with_enc, #__eval)
#### –> definition is moved to TclTkIp module.
-
#_eval_without_enc ⇒ Object
backup original (without encoding) _eval and _invoke.
- #_fromUTF8 ⇒ Object (also: #__fromUTF8)
- #_get_global_var ⇒ Object
- #_get_global_var2 ⇒ Object
-
#_get_variable ⇒ Object
—————————————————————.
- #_get_variable2 ⇒ Object
- #_immediate_invoke ⇒ Object
- #_invoke(*cmds) ⇒ Object (also: #_invoke_with_enc, #__invoke)
- #_invoke_without_enc ⇒ Object
- #_ip_id_ ⇒ Object
-
#_make_menu_embeddable ⇒ Object
—————————————————————.
- #_merge_tklist ⇒ Object
-
#_return_value ⇒ Object
get return code from Tcl_Eval().
- #_set_global_var ⇒ Object
- #_set_global_var2 ⇒ Object
- #_set_variable ⇒ Object
- #_set_variable2 ⇒ Object
-
#_split_tklist ⇒ Object
—————————————————————.
- #_thread_tkwait ⇒ Object
- #_thread_vwait ⇒ Object
- #_toUTF8 ⇒ Object (also: #__toUTF8)
- #_unset_global_var ⇒ Object
- #_unset_global_var2 ⇒ Object
- #_unset_variable ⇒ Object
- #_unset_variable2 ⇒ Object
-
#allow_ruby_exit= ⇒ Object
allow_ruby_exit = mode.
-
#allow_ruby_exit? ⇒ Boolean
allow_ruby_exit?.
- #create_slave ⇒ Object
-
#delete ⇒ Object
delete interpreter.
- #deleted? ⇒ Boolean
- #do_one_event ⇒ Object
- #get_eventloop_tick ⇒ Object
- #get_eventloop_weight ⇒ Object
- #get_no_event_wait ⇒ Object
- #has_mainwindow? ⇒ Boolean
-
#initialize ⇒ Object
constructor
initialize interpreter.
-
#invalid_namespace? ⇒ Boolean
is deleted?.
-
#mainloop ⇒ Object
—————————————————————.
- #mainloop_abort_on_exception ⇒ Object
- #mainloop_abort_on_exception= ⇒ Object
- #mainloop_watchdog ⇒ Object
- #make_safe ⇒ Object
- #restart ⇒ Object
-
#safe? ⇒ Boolean
is safe?.
- #set_eventloop_tick ⇒ Object
- #set_eventloop_weight ⇒ Object
- #set_max_block_time ⇒ Object
- #set_no_event_wait ⇒ Object
-
#slave_of? ⇒ Boolean
self is slave of master?.
Constructor Details
#initialize ⇒ Object
initialize interpreter
4740 4741 4742 |
# File 'tcltklib.c', line 4740 static VALUE ip_init(argc, argv, self) int argc; |
Instance Attribute Details
#encoding ⇒ Object
from tkencoding.rb by [email protected]
2210 2211 2212 |
# File 'lib/tk.rb', line 2210 def encoding @encoding end |
Class Method Details
.__new__ ⇒ Object
24 |
# File 'lib/multi-tk.rb', line 24 alias __new__ new |
.new(*args) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/multi-tk.rb', line 27 def new(*args) if Thread.current.group != ThreadGroup::Default raise SecurityError, 'only ThreadGroup::Default can call TclTkIp.new' end __new__(*args) end |
Instance Method Details
#_conv_listelement ⇒ Object
7698 7699 7700 |
# File 'tcltklib.c', line 7698 static VALUE lib_conv_listelement(self, src) VALUE self; |
#_create_console ⇒ Object
5151 5152 5153 |
# File 'tcltklib.c', line 5151 static VALUE ip_create_console(self) VALUE self; |
#_eval(cmd) ⇒ Object Also known as: _eval_with_enc, __eval
#### –> definition is moved to TclTkIp module
def _toUTF8(str, encoding = nil)
# decide encoding
if encoding
encoding = encoding.to_s
elsif str.kind_of?(Tk::EncodedString) && str.encoding != nil
encoding = str.encoding.to_s
elsif str.instance_variable_get(:@encoding)
encoding = str.instance_variable_get(:@encoding).to_s
elsif defined?(@encoding) && @encoding != nil
encoding = @encoding.to_s
else
encoding = __invoke('encoding', 'system')
end
# convert
case encoding
when 'utf-8', 'binary'
str
else
__toUTF8(str, encoding)
end
end
def _fromUTF8(str, encoding = nil)
unless encoding
if defined?(@encoding) && @encoding != nil
encoding = @encoding.to_s
else
encoding = __invoke('encoding', 'system')
end
end
if str.kind_of?(Tk::EncodedString)
if str.encoding == 'binary'
str
else
__fromUTF8(str, encoding)
end
elsif str.instance_variable_get(:@encoding).to_s == 'binary'
str
else
__fromUTF8(str, encoding)
end
end
5866 5867 5868 5869 5870 5871 5872 |
# File 'tcltklib.c', line 5866 def _eval(cmd) if( @encoding ) _fromUTF8(__eval(_toUTF8(cmd,@encoding)),@encoding) else __eval(cmd) end end |
#_eval_without_enc ⇒ Object
backup original (without encoding) _eval and _invoke
15 |
# File 'lib/tk.rb', line 15 alias _eval_without_enc _eval |
#_fromUTF8 ⇒ Object Also known as: __fromUTF8
6359 6360 6361 |
# File 'tcltklib.c', line 6359 static VALUE ip_fromUTF8(argc, argv, self) int argc; |
#_get_global_var ⇒ Object
7434 7435 7436 |
# File 'tcltklib.c', line 7434 static VALUE ip_get_global_var(self, varname) VALUE self; |
#_get_global_var2 ⇒ Object
7443 7444 7445 |
# File 'tcltklib.c', line 7443 static VALUE ip_get_global_var2(self, varname, index) VALUE self; |
#_get_variable ⇒ Object
7211 7212 7213 |
# File 'tcltklib.c', line 7211 static VALUE ip_get_variable(self, varname, flag) VALUE self; |
#_get_variable2 ⇒ Object
7185 7186 7187 |
# File 'tcltklib.c', line 7185 static VALUE ip_get_variable2(self, varname, index, flag) VALUE self; |
#_immediate_invoke ⇒ Object
7076 7077 7078 |
# File 'tcltklib.c', line 7076 static VALUE ip_invoke_immediate(argc, argv, obj) int argc; |
#_invoke(*cmds) ⇒ Object Also known as: _invoke_with_enc, __invoke
7067 7068 7069 7070 7071 7072 7073 7074 |
# File 'tcltklib.c', line 7067 def _invoke(*cmds) if( @encoding ) cmds = cmds.collect{|cmd| _toUTF8(cmd,@encoding)} _fromUTF8(__invoke(*cmds),@encoding) else __invoke(*cmds) end end |
#_invoke_without_enc ⇒ Object
16 |
# File 'lib/tk.rb', line 16 alias _invoke_without_enc _invoke |
#_ip_id_ ⇒ Object
18 19 20 21 |
# File 'lib/tk.rb', line 18 def _ip_id_ # for RemoteTkIp '' end |
#_make_menu_embeddable ⇒ Object
7839 7840 7841 |
# File 'tcltklib.c', line 7839 static VALUE (interp, ) VALUE interp; |
#_merge_tklist ⇒ Object
7626 7627 7628 |
# File 'tcltklib.c', line 7626 static VALUE lib_merge_tklist(argc, argv, obj) int argc; |
#_return_value ⇒ Object
get return code from Tcl_Eval()
7050 7051 7052 |
# File 'tcltklib.c', line 7050 static VALUE ip_retval(self) VALUE self; |
#_set_global_var ⇒ Object
7453 7454 7455 |
# File 'tcltklib.c', line 7453 static VALUE ip_set_global_var(self, varname, value) VALUE self; |
#_set_global_var2 ⇒ Object
7463 7464 7465 |
# File 'tcltklib.c', line 7463 static VALUE ip_set_global_var2(self, varname, index, value) VALUE self; |
#_set_variable ⇒ Object
7350 7351 7352 |
# File 'tcltklib.c', line 7350 static VALUE ip_set_variable(self, varname, value, flag) VALUE self; |
#_set_variable2 ⇒ Object
7321 7322 7323 |
# File 'tcltklib.c', line 7321 static VALUE ip_set_variable2(self, varname, index, value, flag) VALUE self; |
#_split_tklist ⇒ Object
7618 7619 7620 |
# File 'tcltklib.c', line 7618 static VALUE ip_split_tklist(self, list_str) VALUE self; |
#_thread_tkwait ⇒ Object
4256 4257 4258 |
# File 'tcltklib.c', line 4256 static VALUE ip_thread_tkwait(self, mode, target) VALUE self; |
#_thread_vwait ⇒ Object
4242 4243 4244 |
# File 'tcltklib.c', line 4242 static VALUE ip_thread_vwait(self, var) VALUE self; |
#_toUTF8 ⇒ Object Also known as: __toUTF8
6199 6200 6201 |
# File 'tcltklib.c', line 6199 static VALUE ip_toUTF8(argc, argv, self) int argc; |
#_unset_global_var ⇒ Object
7474 7475 7476 |
# File 'tcltklib.c', line 7474 static VALUE ip_unset_global_var(self, varname) VALUE self; |
#_unset_global_var2 ⇒ Object
7483 7484 7485 |
# File 'tcltklib.c', line 7483 static VALUE ip_unset_global_var2(self, varname, index) VALUE self; |
#_unset_variable ⇒ Object
7425 7426 7427 |
# File 'tcltklib.c', line 7425 static VALUE ip_unset_variable(self, varname, flag) VALUE self; |
#_unset_variable2 ⇒ Object
7399 7400 7401 |
# File 'tcltklib.c', line 7399 static VALUE ip_unset_variable2(self, varname, index, flag) VALUE self; |
#allow_ruby_exit= ⇒ Object
allow_ruby_exit = mode
5257 5258 5259 |
# File 'tcltklib.c', line 5257 static VALUE ip_allow_ruby_exit_set(self, val) VALUE self, val; |
#allow_ruby_exit? ⇒ Boolean
allow_ruby_exit?
5238 5239 5240 |
# File 'tcltklib.c', line 5238 static VALUE ip_allow_ruby_exit_p(self) VALUE self; |
#create_slave ⇒ Object
5034 5035 5036 |
# File 'tcltklib.c', line 5034 static VALUE ip_create_slave(argc, argv, self) int argc; |
#delete ⇒ Object
delete interpreter
5307 5308 5309 |
# File 'tcltklib.c', line 5307 static VALUE ip_delete(self) VALUE self; |
#deleted? ⇒ Boolean
5358 5359 5360 |
# File 'tcltklib.c', line 5358 static VALUE ip_is_deleted_p(self) VALUE self; |
#do_one_event ⇒ Object
2119 2120 2121 |
# File 'tcltklib.c', line 2119 static VALUE ip_do_one_event(argc, argv, self) int argc; |
#get_eventloop_tick ⇒ Object
1013 1014 1015 |
# File 'tcltklib.c', line 1013 static VALUE ip_get_eventloop_tick(self) VALUE self; |
#get_eventloop_weight ⇒ Object
1120 1121 1122 |
# File 'tcltklib.c', line 1120 static VALUE ip_get_eventloop_weight(self) VALUE self; |
#get_no_event_wait ⇒ Object
1065 1066 1067 |
# File 'tcltklib.c', line 1065 static VALUE ip_get_no_event_wait(self) VALUE self; |
#has_mainwindow? ⇒ Boolean
5371 5372 5373 |
# File 'tcltklib.c', line 5371 static VALUE ip_has_mainwindow_p(self) VALUE self; |
#invalid_namespace? ⇒ Boolean
is deleted?
5336 5337 5338 |
# File 'tcltklib.c', line 5336 static VALUE ip_has_invalid_namespace_p(self) VALUE self; |
#mainloop ⇒ Object
1815 1816 1817 |
# File 'tcltklib.c', line 1815 static VALUE ip_mainloop(argc, argv, self) int argc; |
#mainloop_abort_on_exception ⇒ Object
1189 1190 1191 |
# File 'tcltklib.c', line 1189 static VALUE ip_evloop_abort_on_exc(self) VALUE self; |
#mainloop_abort_on_exception= ⇒ Object
1211 1212 1213 |
# File 'tcltklib.c', line 1211 static VALUE ip_evloop_abort_on_exc_set(self, val) VALUE self, val; |
#mainloop_watchdog ⇒ Object
1931 1932 1933 |
# File 'tcltklib.c', line 1931 static VALUE ip_mainloop_watchdog(argc, argv, self) int argc; |
#make_safe ⇒ Object
5204 5205 5206 |
# File 'tcltklib.c', line 5204 static VALUE ip_make_safe(self) VALUE self; |
#restart ⇒ Object
6043 6044 6045 |
# File 'tcltklib.c', line 6043 static VALUE ip_restart(self) VALUE self; |
#safe? ⇒ Boolean
is safe?
5219 5220 5221 |
# File 'tcltklib.c', line 5219 static VALUE ip_is_safe_p(self) VALUE self; |
#set_eventloop_tick ⇒ Object
994 995 996 |
# File 'tcltklib.c', line 994 static VALUE ip_set_eventloop_tick(self, tick) VALUE self; |
#set_eventloop_weight ⇒ Object
1100 1101 1102 |
# File 'tcltklib.c', line 1100 static VALUE ip_set_eventloop_weight(self, loop_max, no_event) VALUE self; |
#set_max_block_time ⇒ Object
1127 1128 1129 |
# File 'tcltklib.c', line 1127 static VALUE set_max_block_time(self, time) VALUE self; |
#set_no_event_wait ⇒ Object
1046 1047 1048 |
# File 'tcltklib.c', line 1046 static VALUE ip_set_no_event_wait(self, wait) VALUE self; |
#slave_of? ⇒ Boolean
self is slave of master?
5069 5070 5071 |
# File 'tcltklib.c', line 5069 static VALUE ip_is_slave_of_p(self, master) VALUE self, master; |