зеркало из https://github.com/github/ruby.git
* ext/tk/tcltklib.c: TclTkLib.do_one_event doesn't work.
* ext/tk/lib/tk.rb: Tk.thread_update is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9e0adac4b4
Коммит
4d52e65787
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Jul 13 12:40:00 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/tcltklib.c: TclTkLib.do_one_event doesn't work.
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: Tk.thread_update is available.
|
||||||
|
|
||||||
Tue Jul 12 23:32:11 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jul 12 23:32:11 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb: keep curdir unexpanded.
|
* lib/mkmf.rb: keep curdir unexpanded.
|
||||||
|
|
|
@ -1940,8 +1940,10 @@ module Tk
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
# NOTE::
|
||||||
# See tcltklib.c for the reason of why the following methods are disabled.
|
# If no eventloop-thread is running, "thread_update" method is same
|
||||||
|
# to "update" method. Else, "thread_update" method waits to complete
|
||||||
|
# idletask operation on the eventloop-thread.
|
||||||
def Tk.thread_update(idle=nil)
|
def Tk.thread_update(idle=nil)
|
||||||
if idle
|
if idle
|
||||||
tk_call_without_enc('thread_update', 'idletasks')
|
tk_call_without_enc('thread_update', 'idletasks')
|
||||||
|
@ -1952,7 +1954,6 @@ module Tk
|
||||||
def Tk.thread_update_idletasks
|
def Tk.thread_update_idletasks
|
||||||
thread_update(true)
|
thread_update(true)
|
||||||
end
|
end
|
||||||
=end
|
|
||||||
|
|
||||||
def Tk.lower_window(win, below=None)
|
def Tk.lower_window(win, below=None)
|
||||||
tk_call('lower', _epath(win), _epath(below))
|
tk_call('lower', _epath(win), _epath(below))
|
||||||
|
@ -4194,7 +4195,7 @@ end
|
||||||
#Tk.freeze
|
#Tk.freeze
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
RELEASE_DATE = '2005-07-05'.freeze
|
RELEASE_DATE = '2005-07-13'.freeze
|
||||||
|
|
||||||
autoload :AUTO_PATH, 'tk/variable'
|
autoload :AUTO_PATH, 'tk/variable'
|
||||||
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Oct. 24, 1997 Y. Matsumoto
|
* Oct. 24, 1997 Y. Matsumoto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TCLTKLIB_RELEASE_DATE "2005-07-05"
|
#define TCLTKLIB_RELEASE_DATE "2005-07-13"
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "rubysig.h"
|
#include "rubysig.h"
|
||||||
|
@ -1790,7 +1790,7 @@ lib_do_one_event_core(argc, argv, self, is_ip)
|
||||||
int flags;
|
int flags;
|
||||||
int found_event;
|
int found_event;
|
||||||
|
|
||||||
if (eventloop_thread) {
|
if (!NIL_P(eventloop_thread)) {
|
||||||
rb_raise(rb_eRuntimeError, "eventloop is already running");
|
rb_raise(rb_eRuntimeError, "eventloop is already running");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3084,7 +3084,8 @@ ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rb_thread_alone() || eventloop_thread == current_thread) {
|
if (rb_thread_alone()
|
||||||
|
|| NIL_P(eventloop_thread) || eventloop_thread == current_thread) {
|
||||||
#if TCL_MAJOR_VERSION >= 8
|
#if TCL_MAJOR_VERSION >= 8
|
||||||
DUMP1("call ip_rbUpdateObjCmd");
|
DUMP1("call ip_rbUpdateObjCmd");
|
||||||
return ip_rbUpdateObjCmd(clientData, interp, objc, objv);
|
return ip_rbUpdateObjCmd(clientData, interp, objc, objv);
|
||||||
|
@ -5477,10 +5478,10 @@ tk_funcall(func, argc, argv, obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
||||||
if (eventloop_thread) {
|
if (NIL_P(eventloop_thread)) {
|
||||||
DUMP2("tk_funcall from current eventloop %lx", current);
|
|
||||||
} else {
|
|
||||||
DUMP2("tk_funcall from thread:%lx but no eventloop", current);
|
DUMP2("tk_funcall from thread:%lx but no eventloop", current);
|
||||||
|
} else {
|
||||||
|
DUMP2("tk_funcall from current eventloop %lx", current);
|
||||||
}
|
}
|
||||||
result = (func)(ip_obj, argc, argv);
|
result = (func)(ip_obj, argc, argv);
|
||||||
if (rb_obj_is_kind_of(result, rb_eException)) {
|
if (rb_obj_is_kind_of(result, rb_eException)) {
|
||||||
|
@ -5792,10 +5793,10 @@ ip_eval(self, str)
|
||||||
rb_thread_critical = thr_crit_bup;
|
rb_thread_critical = thr_crit_bup;
|
||||||
|
|
||||||
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
||||||
if (eventloop_thread) {
|
if (NIL_P(eventloop_thread)) {
|
||||||
DUMP2("eval from current eventloop %lx", current);
|
|
||||||
} else {
|
|
||||||
DUMP2("eval from thread:%lx but no eventloop", current);
|
DUMP2("eval from thread:%lx but no eventloop", current);
|
||||||
|
} else {
|
||||||
|
DUMP2("eval from current eventloop %lx", current);
|
||||||
}
|
}
|
||||||
result = ip_eval_real(self, RSTRING(str)->ptr, RSTRING(str)->len);
|
result = ip_eval_real(self, RSTRING(str)->ptr, RSTRING(str)->len);
|
||||||
if (rb_obj_is_kind_of(result, rb_eException)) {
|
if (rb_obj_is_kind_of(result, rb_eException)) {
|
||||||
|
@ -6961,10 +6962,10 @@ ip_invoke_with_position(argc, argv, obj, position)
|
||||||
rb_raise(rb_eArgError, "command name missing");
|
rb_raise(rb_eArgError, "command name missing");
|
||||||
}
|
}
|
||||||
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
if (NIL_P(eventloop_thread) || current == eventloop_thread) {
|
||||||
if (eventloop_thread) {
|
if (NIL_P(eventloop_thread)) {
|
||||||
DUMP2("invoke from current eventloop %lx", current);
|
|
||||||
} else {
|
|
||||||
DUMP2("invoke from thread:%lx but no eventloop", current);
|
DUMP2("invoke from thread:%lx but no eventloop", current);
|
||||||
|
} else {
|
||||||
|
DUMP2("invoke from current eventloop %lx", current);
|
||||||
}
|
}
|
||||||
result = ip_invoke_real(argc, argv, ip_obj);
|
result = ip_invoke_real(argc, argv, ip_obj);
|
||||||
if (rb_obj_is_kind_of(result, rb_eException)) {
|
if (rb_obj_is_kind_of(result, rb_eException)) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче