Class: RemoteTkIp
- Inherits:
-
MultiTkIp
show all
- Defined in:
- lib/remote-tk.rb,
lib/remote-tk.rb,
lib/remote-tk.rb,
lib/remote-tk.rb
Constant Summary
collapse
- @@IP_TABLE =
MultiTkIp._IP_TABLE
- @@TK_TABLE_LIST =
MultiTkIp._TK_TABLE_LIST
Constants inherited
from MultiTkIp
MultiTkIp::BASE_DIR, MultiTkIp::INTERP_MUTEX, MultiTkIp::INTERP_ROOT_CHECK, MultiTkIp::INTERP_THREAD, MultiTkIp::INTERP_THREAD_STATUS, MultiTkIp::RUN_EVENTLOOP_ON_MAIN_THREAD, MultiTkIp::WITH_ENCODING, MultiTkIp::WITH_RUBY_VM
Class Method Summary
collapse
Instance Method Summary
collapse
-
#__eval(str) ⇒ Object
-
#__invoke(*args) ⇒ Object
-
#_conv_listelement(str) ⇒ Object
-
#_create_console ⇒ Object
-
#_eval(str) ⇒ Object
-
#_eval_with_enc(str) ⇒ Object
-
#_eval_without_enc(str) ⇒ Object
-
#_fromUTF8(str, encoding = nil) ⇒ Object
-
#_get_global_var(var_name) ⇒ Object
-
#_get_global_var2(var_name, index_name) ⇒ Object
-
#_get_variable(var_name, flag) ⇒ Object
-
#_get_variable2(var_name, index_name, flag) ⇒ Object
-
#_invoke(*args) ⇒ Object
-
#_invoke_with_enc(*args) ⇒ Object
-
#_invoke_without_enc(*args) ⇒ Object
-
#_ip_id_ ⇒ Object
-
#_merge_tklist(*args) ⇒ Object
-
#_return_value ⇒ Object
-
#_set_global_var(var_name, value) ⇒ Object
-
#_set_global_var2(var_name, index_name, value) ⇒ Object
-
#_set_variable(var_name, value, flag) ⇒ Object
-
#_set_variable2(var_name, index_name, value, flag) ⇒ Object
-
#_split_tklist(str) ⇒ Object
-
#_thread_tkwait(mode, target) ⇒ Object
-
#_thread_vwait(var_name) ⇒ Object
-
#_toUTF8(str, encoding = nil) ⇒ Object
-
#_unset_global_var(var_name) ⇒ Object
-
#_unset_global_var2(var_name, index_name) ⇒ Object
-
#_unset_variable(var_name, flag) ⇒ Object
-
#_unset_variable2(var_name, index_name, flag) ⇒ Object
-
#allow_ruby_exit=(mode) ⇒ Object
-
#allow_ruby_exit? ⇒ Boolean
-
#appsend(async, *args) ⇒ Object
-
#create_slave(name, safe = false) ⇒ Object
-
#delete ⇒ Object
-
#deleted? ⇒ Boolean
-
#do_one_event(flag = nil) ⇒ Object
-
#get_eventloop_tick ⇒ Object
-
#get_eventloop_weight ⇒ Object
-
#get_no_event_wait ⇒ Object
-
#has_mainwindow? ⇒ Boolean
-
#initialize(remote_ip, displayof = nil, timeout = 5) ⇒ RemoteTkIp
constructor
A new instance of RemoteTkIp.
-
#invalid_namespace? ⇒ Boolean
-
#is_rubytk? ⇒ Boolean
-
#mainloop ⇒ Object
-
#mainloop_abort_on_exception ⇒ Object
-
#mainloop_abort_on_exception=(mode) ⇒ Object
-
#mainloop_watchdog ⇒ Object
-
#make_safe ⇒ Object
-
#manipulable? ⇒ Boolean
-
#rb_appsend(async, *args) ⇒ Object
-
#ready?(timeout = 5) ⇒ Boolean
-
#restart ⇒ Object
-
#safe? ⇒ Boolean
-
#safe_base? ⇒ Boolean
-
#set_eventloop_tick(*args) ⇒ Object
-
#set_eventloop_weight(*args) ⇒ Object
-
#set_no_event_wait(*args) ⇒ Object
Methods inherited from MultiTkIp
_DEFAULT_MASTER, _IP_TABLE, _TK_TABLE_LIST, #__create_safe_slave_obj, #__create_trusted_slave_obj, __getip, #__pseudo_toplevel, #__pseudo_toplevel=, #__pseudo_toplevel_evaluable=, #__pseudo_toplevel_evaluable?, #_add_new_tables, #_add_tk_procs, _conv_listelement, _create_console, #_create_slave_object, #_default_delete_hook, #_destroy_slaves_of_slaveIP, _eval, _eval_with_enc, _eval_without_enc, _fromUTF8, _get_global_var, _get_global_var2, _get_variable, _get_variable2, #_init_ip_env, #_init_ip_internal, _invoke, _invoke_with_enc, _invoke_without_enc, _ip_id_, #_make_menu_embeddable, _make_menu_embeddable, _merge_tklist, #_proc_on_current_safelevel, _proc_on_current_safelevel, _proc_on_safelevel, #_proc_on_safelevel, #_receiver_mainloop, #_remove_tk_procs, _return_value, _set_global_var, _set_global_var2, _set_variable, _set_variable2, _split_tklist, _thread_tkwait, _thread_vwait, #_tk_cmd_tbl, #_tk_table_list, #_tk_windows, _toUTF8, _unset_global_var, _unset_global_var2, _unset_variable, _unset_variable2, #abort, abort, add_tk_procs, #alias_delete, alias_delete, #alias_info, alias_info, #alias_target, alias_target, aliases, #aliases, #alive?, alive?, allow_ruby_exit=, allow_ruby_exit?, #background_call, #background_eval, #background_eval_proc, #background_eval_str, #background_eval_string, #bg_call, bg_eval, #bg_eval, bg_eval_proc, #bg_eval_proc, #bg_eval_str, bg_eval_string, #bg_eval_string, bgerror, #call, cb_entry_class, #cb_error, #cb_eval, create_table, #def_alias, def_alias, default_encoding, #default_encoding=, default_encoding=, default_master?, delete, #delete_cmd, delete_cmd, #delete_slaves, delete_slaves, deleted?, encoding, #encoding=, encoding=, encoding_convert_from, encoding_convert_to, #encoding_convertfrom, encoding_convertfrom, #encoding_convertto, encoding_convertto, #encoding_name, encoding_name, #encoding_obj, encoding_obj, #encoding_table, encoding_table, eval, #eval, #eval_callback, eval_proc, #eval_proc, #eval_str, eval_string, #eval_string, exist?, #exist?, exit, #exit, exit!, #exit!, #expose_cmd, expose_cmd, force_default_encoding=, #force_default_encoding=, #force_default_encoding?, force_default_encoding?, #get_bgerror_handler, get_cb_entry, get_limit, #get_limit, has_mainwindow?, #hidden_cmds, hidden_cmds, hide_cmd, #hide_cmd, inherited, init_ip_env, init_ip_internal, #inspect, invalid_namespace?, #invoke_hidden, invoke_hidden, invoke_hidden_on_global, #invoke_hidden_on_global, #invoke_hidden_on_namespace, invoke_hidden_on_namespace, #ip_name, ip_name, make_safe, #mark_trusted, mark_trusted, master?, #master?, method_missing, new_master, new_safe_slave, new_slave, path, #path, #recursion_limit, recursion_limit, remove_tk_procs, restart, #running_mainloop?, safe?, safe_base?, #safe_level, safe_level, safe_level=, #safe_level=, #safeip_add_to_access_path, #safeip_configinfo, #safeip_configure, #safeip_delete, #safeip_find_in_access_path, #safeip_set_log_cmd, #set_bgerror_handler, #set_cb_error, #set_limit, set_limit, #set_safe_level, set_safe_level, #share_stderr, share_stderr, #share_stdin, share_stdin, share_stdio, #share_stdio, #share_stdout, share_stdout, #slave?, slave?, slaves, #slaves, #thread_eval_proc, tk_cmd_tbl, tk_object_table, tk_windows, to_eval, #to_eval, transfer_stderr, #transfer_stderr, #transfer_stdin, transfer_stdin, transfer_stdio, #transfer_stdio, transfer_stdout, #transfer_stdout, #wait_on_mainloop=, #wait_on_mainloop?
Constructor Details
#initialize(remote_ip, displayof = nil, timeout = 5) ⇒ RemoteTkIp
Returns a new instance of RemoteTkIp.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
# File 'lib/remote-tk.rb', line 66
def initialize(remote_ip, displayof=nil, timeout=5)
@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
=begin
@cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog()
@threadgroup.add @cmd_receiver
@threadgroup.add @receiver_watchdog
@threadgroup.enclose
=end
@@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 end
|
Class Method Details
.do_one_event(flag = nil) ⇒ Object
500
501
502
|
# File 'lib/remote-tk.rb', line 500
def do_one_event(flag = nil)
fail RuntimeError, 'not support "do_one_event" on the remote interpreter'
end
|
.get_eventloop_tick ⇒ Object
512
513
514
|
# File 'lib/remote-tk.rb', line 512
def get_eventloop_tick
fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter'
end
|
.get_eventloop_weight ⇒ Object
524
525
526
|
# File 'lib/remote-tk.rb', line 524
def get_eventloop_weight
fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter'
end
|
.get_no_event_wait ⇒ Object
518
519
520
|
# File 'lib/remote-tk.rb', line 518
def get_no_event_wait
fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter'
end
|
.mainloop(*args) ⇒ Object
494
495
496
|
# File 'lib/remote-tk.rb', line 494
def mainloop(*args)
fail RuntimeError, 'not support "mainloop" on the remote interpreter'
end
|
.mainloop_abort_on_exception ⇒ Object
503
504
505
|
# File 'lib/remote-tk.rb', line 503
def mainloop_abort_on_exception
fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter'
end
|
.mainloop_abort_on_exception=(mode) ⇒ Object
506
507
508
|
# File 'lib/remote-tk.rb', line 506
def mainloop_abort_on_exception=(mode)
fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter'
end
|
.mainloop_watchdog(*args) ⇒ Object
497
498
499
|
# File 'lib/remote-tk.rb', line 497
def mainloop_watchdog(*args)
fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter'
end
|
.manipulable? ⇒ Boolean
142
143
144
|
# File 'lib/remote-tk.rb', line 142
def self.manipulable?
true
end
|
.new(*args, &b) ⇒ Object
58
59
60
61
62
|
# File 'lib/remote-tk.rb', line 58
def new(*args, &b)
ip = __new(*args)
ip.eval_proc(&b) if b
ip
end
|
.set_eventloop_tick(*args) ⇒ Object
509
510
511
|
# File 'lib/remote-tk.rb', line 509
def set_eventloop_tick(*args)
fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter'
end
|
.set_eventloop_weight(*args) ⇒ Object
521
522
523
|
# File 'lib/remote-tk.rb', line 521
def set_eventloop_weight(*args)
fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter'
end
|
.set_no_event_wait(*args) ⇒ Object
515
516
517
|
# File 'lib/remote-tk.rb', line 515
def set_no_event_wait(*args)
fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter'
end
|
92
|
# File 'lib/remote-tk.rb', line 92
def @encoding.to_s; self.join(nil); end
|
Instance Method Details
#__eval(str) ⇒ Object
338
339
340
|
# File 'lib/remote-tk.rb', line 338
def __eval(str)
_appsend(false, false, str)
end
|
#__invoke(*args) ⇒ Object
355
356
357
|
# File 'lib/remote-tk.rb', line 355
def __invoke(*args)
_appsend(false, false, *args)
end
|
#_conv_listelement(str) ⇒ Object
449
450
451
452
|
# File 'lib/remote-tk.rb', line 449
def _conv_listelement(str)
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._conv_listelement(str)
end
|
#_create_console ⇒ Object
454
455
456
|
# File 'lib/remote-tk.rb', line 454
def _create_console
fail RuntimeError, 'not support "_create_console" on the remote interpreter'
end
|
#_eval(str) ⇒ Object
341
342
343
|
# File 'lib/remote-tk.rb', line 341
def _eval(str)
_appsend(nil, false, str)
end
|
#_eval_with_enc(str) ⇒ Object
347
348
349
|
# File 'lib/remote-tk.rb', line 347
def _eval_with_enc(str)
_appsend(true, false, str)
end
|
#_eval_without_enc(str) ⇒ Object
344
345
346
|
# File 'lib/remote-tk.rb', line 344
def _eval_without_enc(str)
_appsend(false, false, str)
end
|
#_fromUTF8(str, encoding = nil) ⇒ Object
373
374
375
376
|
# File 'lib/remote-tk.rb', line 373
def _fromUTF8(str, encoding=nil)
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._fromUTF8(str, encoding)
end
|
#_get_global_var(var_name) ⇒ Object
418
419
420
|
# File 'lib/remote-tk.rb', line 418
def _get_global_var(var_name)
_appsend(false, 'set', TkComm::_get_eval_string(var_name))
end
|
#_get_global_var2(var_name, index_name) ⇒ Object
#_get_variable(var_name, flag) ⇒ Object
391
392
393
394
|
# File 'lib/remote-tk.rb', line 391
def _get_variable(var_name, flag)
_appsend(false, 'set', TkComm::_get_eval_string(var_name))
end
|
#_get_variable2(var_name, index_name, flag) ⇒ Object
#_invoke(*args) ⇒ Object
351
352
353
|
# File 'lib/remote-tk.rb', line 351
def _invoke(*args)
_appsend(nil, false, *args)
end
|
#_invoke_with_enc(*args) ⇒ Object
364
365
366
|
# File 'lib/remote-tk.rb', line 364
def _invoke_with_enc(*args)
_appsend(true, false, *args)
end
|
#_invoke_without_enc(*args) ⇒ Object
361
362
363
|
# File 'lib/remote-tk.rb', line 361
def _invoke_without_enc(*args)
_appsend(false, false, *args)
end
|
151
152
153
|
# File 'lib/remote-tk.rb', line 151
def _ip_id_
@ip_id
end
|
#_merge_tklist(*args) ⇒ Object
444
445
446
447
|
# File 'lib/remote-tk.rb', line 444
def _merge_tklist(*args)
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._merge_tklist(*args)
end
|
#_return_value ⇒ Object
386
387
388
389
|
# File 'lib/remote-tk.rb', line 386
def _return_value
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._return_value
end
|
#_set_global_var(var_name, value) ⇒ Object
#_set_global_var2(var_name, index_name, value) ⇒ Object
#_set_variable(var_name, value, flag) ⇒ Object
#_set_variable2(var_name, index_name, value, flag) ⇒ Object
#_split_tklist(str) ⇒ Object
439
440
441
442
|
# File 'lib/remote-tk.rb', line 439
def _split_tklist(str)
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._split_tklist(str)
end
|
#_thread_tkwait(mode, target) ⇒ Object
382
383
384
|
# File 'lib/remote-tk.rb', line 382
def _thread_tkwait(mode, target)
_appsend(false, 'thread_tkwait', mode, target)
end
|
#_thread_vwait(var_name) ⇒ Object
378
379
380
|
# File 'lib/remote-tk.rb', line 378
def _thread_vwait(var_name)
_appsend(false, 'thread_vwait', var_name)
end
|
#_toUTF8(str, encoding = nil) ⇒ Object
368
369
370
371
|
# File 'lib/remote-tk.rb', line 368
def _toUTF8(str, encoding=nil)
raise SecurityError, "no permission to manipulate" unless self.manipulable?
@interp._toUTF8(str, encoding)
end
|
#_unset_global_var(var_name) ⇒ Object
432
433
434
|
# File 'lib/remote-tk.rb', line 432
def _unset_global_var(var_name)
_appsend(false, 'unset', TkComm::_get_eval_string(var_name))
end
|
#_unset_global_var2(var_name, index_name) ⇒ Object
435
436
437
|
# File 'lib/remote-tk.rb', line 435
def _unset_global_var2(var_name, index_name)
_appsend(false, 'unset', "#{var_name}(#{index_name})")
end
|
#_unset_variable(var_name, flag) ⇒ Object
409
410
411
412
|
# File 'lib/remote-tk.rb', line 409
def _unset_variable(var_name, flag)
_appsend(false, 'unset', TkComm::_get_eval_string(var_name))
end
|
#_unset_variable2(var_name, index_name, flag) ⇒ Object
413
414
415
416
|
# File 'lib/remote-tk.rb', line 413
def _unset_variable2(var_name, index_name, flag)
_appsend(false, 'unset', "#{var_name}(#{index_name})")
end
|
#allow_ruby_exit=(mode) ⇒ Object
290
291
292
|
# File 'lib/remote-tk.rb', line 290
def allow_ruby_exit= (mode)
fail RuntimeError, 'cannot change mode of the remote interpreter'
end
|
#allow_ruby_exit? ⇒ Boolean
286
287
288
|
# File 'lib/remote-tk.rb', line 286
def allow_ruby_exit?
false
end
|
#appsend(async, *args) ⇒ Object
237
238
239
240
241
242
243
244
245
246
247
248
249
|
# File 'lib/remote-tk.rb', line 237
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) ⇒ Object
265
266
267
268
269
270
271
272
|
# File 'lib/remote-tk.rb', line 265
def create_slave(name, safe=false)
if safe
safe_opt = ''
else
safe_opt = '-safe'
end
_appsend(false, false, "interp create #{safe_opt} -- #{name}")
end
|
294
295
296
|
# File 'lib/remote-tk.rb', line 294
def delete
_appsend(false, true, 'exit')
end
|
#deleted? ⇒ Boolean
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
# File 'lib/remote-tk.rb', line 298
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(_toUTF8(@remote))
true
else
false
end
end
|
#do_one_event(flag = nil) ⇒ Object
464
465
466
|
# File 'lib/remote-tk.rb', line 464
def do_one_event(flag = nil)
fail RuntimeError, 'not support "do_one_event" on the remote interpreter'
end
|
#get_eventloop_tick ⇒ Object
476
477
478
|
# File 'lib/remote-tk.rb', line 476
def get_eventloop_tick
fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter'
end
|
#get_eventloop_weight ⇒ Object
488
489
490
|
# File 'lib/remote-tk.rb', line 488
def get_eventloop_weight
fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter'
end
|
#get_no_event_wait ⇒ Object
482
483
484
|
# File 'lib/remote-tk.rb', line 482
def get_no_event_wait
fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter'
end
|
#has_mainwindow? ⇒ Boolean
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
# File 'lib/remote-tk.rb', line 315
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? ⇒ Boolean
330
331
332
|
# File 'lib/remote-tk.rb', line 330
def invalid_namespace?
false
end
|
#is_rubytk? ⇒ Boolean
231
232
233
234
235
|
# File 'lib/remote-tk.rb', line 231
def is_rubytk?
return false if _appsend(false, false, 'info', 'command', 'ruby') == ""
[ _appsend(false, false, 'ruby', 'RUBY_VERSION'),
_appsend(false, false, 'set', 'tk_patchLevel') ]
end
|
458
459
460
|
# File 'lib/remote-tk.rb', line 458
def mainloop
fail RuntimeError, 'not support "mainloop" on the remote interpreter'
end
|
#mainloop_abort_on_exception ⇒ Object
467
468
469
|
# File 'lib/remote-tk.rb', line 467
def mainloop_abort_on_exception
fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter'
end
|
#mainloop_abort_on_exception=(mode) ⇒ Object
470
471
472
|
# File 'lib/remote-tk.rb', line 470
def mainloop_abort_on_exception=(mode)
fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter'
end
|
#mainloop_watchdog ⇒ Object
461
462
463
|
# File 'lib/remote-tk.rb', line 461
def mainloop_watchdog
fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter'
end
|
#make_safe ⇒ Object
274
275
276
|
# File 'lib/remote-tk.rb', line 274
def make_safe
fail RuntimeError, 'cannot change safe mode of the remote interpreter'
end
|
#manipulable? ⇒ Boolean
138
139
140
141
|
# File 'lib/remote-tk.rb', line 138
def manipulable?
return true if (Thread.current.group == ThreadGroup::Default)
MultiTkIp.__getip == @interp && ! @interp.safe?
end
|
#rb_appsend(async, *args) ⇒ Object
251
252
253
254
255
256
257
258
259
260
261
262
263
|
# File 'lib/remote-tk.rb', line 251
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) ⇒ Boolean
224
225
226
227
228
229
|
# File 'lib/remote-tk.rb', line 224
def ready?(timeout=5)
if timeout < 0
fail ArgumentError, "timeout must be positive number"
end
_available_check(timeout)
end
|
334
335
336
|
# File 'lib/remote-tk.rb', line 334
def restart
fail RuntimeError, 'cannot restart the remote interpreter'
end
|
#safe? ⇒ Boolean
278
279
280
|
# File 'lib/remote-tk.rb', line 278
def safe?
_appsend(false, false, 'interp issafe')
end
|
#safe_base? ⇒ Boolean
282
283
284
|
# File 'lib/remote-tk.rb', line 282
def safe_base?
false
end
|
#set_eventloop_tick(*args) ⇒ Object
473
474
475
|
# File 'lib/remote-tk.rb', line 473
def set_eventloop_tick(*args)
fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter'
end
|
#set_eventloop_weight(*args) ⇒ Object
485
486
487
|
# File 'lib/remote-tk.rb', line 485
def set_eventloop_weight(*args)
fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter'
end
|
#set_no_event_wait(*args) ⇒ Object
479
480
481
|
# File 'lib/remote-tk.rb', line 479
def set_no_event_wait(*args)
fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter'
end
|