Methods
- #
-
- __eval,
- __invoke,
- _conv_listelement,
- _create_console,
- _eval,
- _eval_with_enc,
- _eval_without_enc,
- _fromUTF8,
- _get_global_var,
- _get_global_var2,
- _get_variable,
- _get_variable2,
- _invoke,
- _invoke_with_enc,
- _invoke_without_enc,
- _ip_id_,
- _is_master_of?,
- _merge_tklist,
- _return_value,
- _set_global_var,
- _set_global_var2,
- _set_variable,
- _set_variable2,
- _split_tklist,
- _thread_tkwait,
- _thread_vwait,
- _toUTF8,
- _unset_global_var,
- _unset_global_var2,
- _unset_variable,
- _unset_variable2
- A
- C
- D
- G
- H
- I
- M
- N
- R
- S
Class Public methods
manipulable?()
Link
new(remote_ip, displayof=nil, timeout=5)
Link
# File ext/tk/lib/remote-tk.rb, line 63 def initialize(remote_ip, displayof=nil, timeout=5) if $SAFE >= 4 fail SecurityError, "cannot access another interpreter at level #{$SAFE}" end @interp = MultiTkIp.__getip if @interp.safe? fail SecurityError, "safe-IP cannot create RemoteTkIp" end @interp.allow_ruby_exit = false @appname = @interp._invoke('tk', 'appname') @remote = remote_ip.to_s.dup.freeze if displayof.kind_of?(TkWindow) @displayof = displayof.path.dup.freeze else @displayof = nil end if self.deleted? fail RuntimeError, "no Tk application named \"#{@remote}\"" end @tk_windows = {} @tk_table_list = [] @slave_ip_tbl = {} @slave_ip_top = {} @force_default_encoding ||= TkUtil.untrust([false]) @encoding ||= TkUtil.untrust([nil]) def @encoding.to_s; self.join(nil); end TkUtil.untrust(@tk_windows) unless @tk_windows.tainted? TkUtil.untrust(@tk_table_list) unless @tk_table_list.tainted? TkUtil.untrust(@slave_ip_tbl) unless @slave_ip_tbl.tainted? TkUtil.untrust(@slave_ip_top) unless @slave_ip_top.tainted? @system = Object.new @threadgroup = ThreadGroup.new @safe_level = [$SAFE] @wait_on_mainloop = [true, 0] @cmd_queue = Queue.new @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog() @threadgroup.add @cmd_receiver @threadgroup.add @receiver_watchdog @threadgroup.enclose @@DEFAULT_MASTER.assign_receiver_and_watchdog(self) @@IP_TABLE[@threadgroup] = self @@TK_TABLE_LIST.size.times{ (tbl = {}).tainted? || TkUtil.untrust(tbl) @tk_table_list << tbl } @ret_val = TkVariable.new if timeout > 0 && ! _available_check(timeout) fail RuntimeError, "cannot create connection" end @ip_id = _create_connection class << self undef :instance_eval end self.freeze # defend against modification end
Instance Public methods
__eval(str)
Link
__invoke(*args)
Link
_conv_listelement(str)
Link
_create_console()
Link
_eval(str)
Link
_eval_with_enc(str)
Link
_eval_without_enc(str)
Link
_fromUTF8(str, encoding=nil)
Link
_get_global_var(var_name)
Link
_get_global_var2(var_name, index_name)
Link
_get_variable(var_name, flag)
Link
_get_variable2(var_name, index_name, flag)
Link
_invoke(*args)
Link
_invoke_with_enc(*args)
Link
_invoke_without_enc(*args)
Link
_ip_id_()
Link
_merge_tklist(*args)
Link
_return_value()
Link
_set_global_var(var_name, value)
Link
_set_global_var2(var_name, index_name, value)
Link
_set_variable(var_name, value, flag)
Link
_set_variable2(var_name, index_name, value, flag)
Link
_split_tklist(str)
Link
_thread_tkwait(mode, target)
Link
_thread_vwait(var_name)
Link
_toUTF8(str, encoding=nil)
Link
_unset_global_var(var_name)
Link
_unset_global_var2(var_name, index_name)
Link
_unset_variable(var_name, flag)
Link
_unset_variable2(var_name, index_name, flag)
Link
allow_ruby_exit=(mode)
Link
allow_ruby_exit?()
Link
appsend(async, *args)
Link
# File ext/tk/lib/remote-tk.rb, line 240 def appsend(async, *args) raise SecurityError, "no permission to manipulate" unless self.manipulable? if async != true && async != false && async != nil args.unshift(async) async = false end if @displayof Tk.appsend_displayof(@remote, @displayof, async, *args) else Tk.appsend(@remote, async, *args) end end
create_slave(name, safe=false)
Link
delete()
Link
deleted?()
Link
# File ext/tk/lib/remote-tk.rb, line 301 def deleted? raise SecurityError, "no permission to manipulate" unless self.manipulable? if @displayof lst = @interp._invoke_without_enc('winfo', 'interps', '-displayof', @displayof) else lst = @interp._invoke_without_enc('winfo', 'interps') end # unless @interp._split_tklist(lst).index(@remote) unless @interp._split_tklist(lst).index(_toUTF8(@remote)) true else false end end
do_one_event(flag = nil)
Link
get_eventloop_tick()
Link
get_eventloop_weight()
Link
get_no_event_wait()
Link
has_mainwindow?()
Link
# File ext/tk/lib/remote-tk.rb, line 318 def has_mainwindow? raise SecurityError, "no permission to manipulate" unless self.manipulable? begin inf = @interp._invoke_without_enc('info', 'command', '.') rescue Exception return nil end if !inf.kind_of?(String) || inf != '.' false else true end end
invalid_namespace?()
Link
is_rubytk?()
Link
mainloop()
Link
mainloop_abort_on_exception()
Link
mainloop_abort_on_exception=(mode)
Link
mainloop_watchdog()
Link
make_safe()
Link
manipulable?()
Link
new(*args, &b)
Link
rb_appsend(async, *args)
Link
# File ext/tk/lib/remote-tk.rb, line 254 def rb_appsend(async, *args) raise SecurityError, "no permission to manipulate" unless self.manipulable? if async != true && async != false && async != nil args.unshift(async) async = false end if @displayof Tk.rb_appsend_displayof(@remote, @displayof, async, *args) else Tk.rb_appsend(@remote, async, *args) end end
ready?(timeout=5)
Link
restart()
Link
safe?()
Link
safe_base?()
Link
set_eventloop_tick(*args)
Link
set_eventloop_weight(*args)
Link
set_no_event_wait(*args)
Link
Instance Protected methods