Class: TclTkIp

Inherits:
Object show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

initialize interpreter



4740
4741
4742
# File 'tcltklib.c', line 4740

static VALUE
ip_init(argc, argv, self)
int   argc;

Instance Attribute Details

#encodingObject

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_listelementObject



7698
7699
7700
# File 'tcltklib.c', line 7698

static VALUE
lib_conv_listelement(self, src)
VALUE self;

#_create_consoleObject



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_encObject

backup original (without encoding) _eval and _invoke



15
# File 'lib/tk.rb', line 15

alias _eval_without_enc _eval

#_fromUTF8Object Also known as: __fromUTF8



6359
6360
6361
# File 'tcltklib.c', line 6359

static VALUE
ip_fromUTF8(argc, argv, self)
int   argc;

#_get_global_varObject



7434
7435
7436
# File 'tcltklib.c', line 7434

static VALUE
ip_get_global_var(self, varname)
VALUE self;

#_get_global_var2Object



7443
7444
7445
# File 'tcltklib.c', line 7443

static VALUE
ip_get_global_var2(self, varname, index)
VALUE self;

#_get_variableObject




7211
7212
7213
# File 'tcltklib.c', line 7211

static VALUE
ip_get_variable(self, varname, flag)
VALUE self;

#_get_variable2Object



7185
7186
7187
# File 'tcltklib.c', line 7185

static VALUE
ip_get_variable2(self, varname, index, flag)
VALUE self;

#_immediate_invokeObject



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_encObject



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_embeddableObject




7839
7840
7841
# File 'tcltklib.c', line 7839

static VALUE
ip_make_menu_embeddable(interp, menu_path)
VALUE interp;

#_merge_tklistObject



7626
7627
7628
# File 'tcltklib.c', line 7626

static VALUE
lib_merge_tklist(argc, argv, obj)
int argc;

#_return_valueObject

get return code from Tcl_Eval()



7050
7051
7052
# File 'tcltklib.c', line 7050

static VALUE
ip_retval(self)
VALUE self;

#_set_global_varObject



7453
7454
7455
# File 'tcltklib.c', line 7453

static VALUE
ip_set_global_var(self, varname, value)
VALUE self;

#_set_global_var2Object



7463
7464
7465
# File 'tcltklib.c', line 7463

static VALUE
ip_set_global_var2(self, varname, index, value)
VALUE self;

#_set_variableObject



7350
7351
7352
# File 'tcltklib.c', line 7350

static VALUE
ip_set_variable(self, varname, value, flag)
VALUE self;

#_set_variable2Object



7321
7322
7323
# File 'tcltklib.c', line 7321

static VALUE
ip_set_variable2(self, varname, index, value, flag)
VALUE self;

#_split_tklistObject




7618
7619
7620
# File 'tcltklib.c', line 7618

static VALUE
ip_split_tklist(self, list_str)
VALUE self;

#_thread_tkwaitObject



4256
4257
4258
# File 'tcltklib.c', line 4256

static VALUE
ip_thread_tkwait(self, mode, target)
VALUE self;

#_thread_vwaitObject



4242
4243
4244
# File 'tcltklib.c', line 4242

static VALUE
ip_thread_vwait(self, var)
VALUE self;

#_toUTF8Object Also known as: __toUTF8



6199
6200
6201
# File 'tcltklib.c', line 6199

static VALUE
ip_toUTF8(argc, argv, self)
int   argc;

#_unset_global_varObject



7474
7475
7476
# File 'tcltklib.c', line 7474

static VALUE
ip_unset_global_var(self, varname)
VALUE self;

#_unset_global_var2Object



7483
7484
7485
# File 'tcltklib.c', line 7483

static VALUE
ip_unset_global_var2(self, varname, index)
VALUE self;

#_unset_variableObject



7425
7426
7427
# File 'tcltklib.c', line 7425

static VALUE
ip_unset_variable(self, varname, flag)
VALUE self;

#_unset_variable2Object



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?

Returns:



5238
5239
5240
# File 'tcltklib.c', line 5238

static VALUE
ip_allow_ruby_exit_p(self)
VALUE self;

#create_slaveObject



5034
5035
5036
# File 'tcltklib.c', line 5034

static VALUE
ip_create_slave(argc, argv, self)
int   argc;

#deleteObject

delete interpreter



5307
5308
5309
# File 'tcltklib.c', line 5307

static VALUE
ip_delete(self)
VALUE self;

#deleted?Boolean

Returns:



5358
5359
5360
# File 'tcltklib.c', line 5358

static VALUE
ip_is_deleted_p(self)
VALUE self;

#do_one_eventObject



2119
2120
2121
# File 'tcltklib.c', line 2119

static VALUE
ip_do_one_event(argc, argv, self)
int   argc;

#get_eventloop_tickObject



1013
1014
1015
# File 'tcltklib.c', line 1013

static VALUE
ip_get_eventloop_tick(self)
VALUE self;

#get_eventloop_weightObject



1120
1121
1122
# File 'tcltklib.c', line 1120

static VALUE
ip_get_eventloop_weight(self)
VALUE self;

#get_no_event_waitObject



1065
1066
1067
# File 'tcltklib.c', line 1065

static VALUE
ip_get_no_event_wait(self)
VALUE self;

#has_mainwindow?Boolean

Returns:



5371
5372
5373
# File 'tcltklib.c', line 5371

static VALUE
ip_has_mainwindow_p(self)
VALUE self;

#invalid_namespace?Boolean

is deleted?

Returns:



5336
5337
5338
# File 'tcltklib.c', line 5336

static VALUE
ip_has_invalid_namespace_p(self)
VALUE self;

#mainloopObject




1815
1816
1817
# File 'tcltklib.c', line 1815

static VALUE
ip_mainloop(argc, argv, self)
int   argc;

#mainloop_abort_on_exceptionObject



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_watchdogObject



1931
1932
1933
# File 'tcltklib.c', line 1931

static VALUE
ip_mainloop_watchdog(argc, argv, self)
int   argc;

#make_safeObject



5204
5205
5206
# File 'tcltklib.c', line 5204

static VALUE
ip_make_safe(self)
VALUE self;

#restartObject



6043
6044
6045
# File 'tcltklib.c', line 6043

static VALUE
ip_restart(self)
VALUE self;

#safe?Boolean

is safe?

Returns:



5219
5220
5221
# File 'tcltklib.c', line 5219

static VALUE
ip_is_safe_p(self)
VALUE self;

#set_eventloop_tickObject



994
995
996
# File 'tcltklib.c', line 994

static VALUE
ip_set_eventloop_tick(self, tick)
VALUE self;

#set_eventloop_weightObject



1100
1101
1102
# File 'tcltklib.c', line 1100

static VALUE
ip_set_eventloop_weight(self, loop_max, no_event)
VALUE self;

#set_max_block_timeObject



1127
1128
1129
# File 'tcltklib.c', line 1127

static VALUE
set_max_block_time(self, time)
VALUE self;

#set_no_event_waitObject



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?

Returns:



5069
5070
5071
# File 'tcltklib.c', line 5069

static VALUE
ip_is_slave_of_p(self, master)
VALUE self, master;