summaryrefslogtreecommitdiff
path: root/ext/tcltklib/tcltklib.c
AgeCommit message (Collapse)Author
2003-07-30* additional check of Tk interpreters' status for a little more safetynagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* bug fixnagai
* change mainloop_abort_on_no_widget_cmd => mainloop_abort_on_exception ( to avoid thread timing trouble on accessing destroyed widgets ) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29tcltklib.c : use RTEST()nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29tcltklib.c : bug fixnagai
multi-tk.rb : bug fix and pack options are pssed to the safeTk container sample/safe-tk.rb : add example for pack options of safeTk container git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-28tcltklib.c : *bug fixnagai
multi-tk.rb : *bug fix *add methods depend on Tcl's 'interp' command *suppot to control safe-level of each interpreter git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-27multi-tk.rb : (new) library to support multiple Tk interpreters (high level)nagai
tcltklib.c : add some methods to support multiple interpreters (low level) MANUAL.euc : modify descriptions tcltklib/sample/safeTk.rb : (new) sample : how to use safeTk interpreter tk/sample/safe-tk.rb : (new) sample : how to use multi-tk.rb tk.rb, tkafter.rb : bug fix and add feature to supprt multi-tk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25tcltklib.c : add TclTkIp#create_slave , TclTkIp#_make_safe and TclTkIp#safe?nagai
MANUAL.euc : modify descriptions tk.rb : bug fix [ruby-talk:76980] and modify to support multi Tk IPs tkafter.rb : modify to support multi Tk IPs git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23* ext/tcltklib/tcltklib.c (ip_init): need at least one statement after label.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23process.c : unify indentationnagai
configure.in : add --enable-setreuid option tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options' ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) tk.rb : support arguments of TclTkIp.new ( see TkCore::IP_NAME, TkCore::IP_OPTS ) tk*.rb : preparations for multi-Tk interpreter support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-01tk.rb :nagai
* TkWindow include TkWinfo * treat unknown widget classes as subclasses of TkWindow git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21Ruby/Tk libraries except tk.rb :nagai
* remove direct-accesses to a TkComm::INTERP * remove direct-accesses to a TkComm::INITIALIZE_TARGETS * use TkINTERP_SETUP_SCRIPTS constant for setting up the interpreter tcltklib.c : * support to create a safe interpreter with safe-Tk ( Tk8.x ) you can test it by the following --------------------------------------------- require 'tk' safeip = Tk::INTERP._eval('::safe::interpCreate') Tk::INTERP._eval('::safe::loadTk ' + safeip) Tk::INTERP._eval(safeip + ' eval button .b -text SlaveIP -command exit') Tk::INTERP._eval(safeip + ' eval pack .b') Tk.mainloop --------------------------------------------- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-20tcltklib.c :nagai
* Tk interpreter returns TAINTED strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-19tcltklib.c :nagai
* lib_do_one_event() : change default value of the argument * lib_do_one_event() : returns true/false * add TclTkLib::EventFlag::NONE ( == 0 ) * add set_no_event_wait() and get_no_event_wait() * modify MANUAL.euc and README.euc tk.rb : * change default value of TkCore.do_one_event argument * add TkCore.set_no_event_wait(wait) and TkCore.get_no_event_wait * add Tk.exit ( == destroy root widget ) tkafter.rb : * rename TkAfter => TkTimer ( TkAfter is an alias name now. ) * set_callback returns self * continue() raises an exception, if already running or no procedure. * skip() raises an exception, if not running. sample/tktimer2.rb * new sample for TkTimer class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09fix : 100% CPU problem of Tk.mainloopnagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09renew Tk.mainloopnagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-23* eval.c (ruby_finalize): turn off ruby_debug flag before callingmatz
at_exit procs and finalizers. (ruby-bugs-ja:PR473) * ext/tcltklib/tcltklib.c (lib_mainloop_core): OK to block if there's no other thread. (ruby-bugs:PR#861) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21* array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc),usa
file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc), object.c (rb_module_s_alloc, rb_class_allocate_instance), re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc), time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc), ext/tcltklib/tcltklib.c (ip_alloc), ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate) : add prototype to get rid of VC++ warnings. * ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,nobu
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c, ext/stringio/stringio.c, ext/strscan/strscan.c, ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c: use rb_define_alloc_func(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03* bcc32/mkexports.rb: to work on cygwin via telnet.nobu
[ruby-win32:358] * ext/tcltklib/tcltklib.c (ip_invoke): requires command name argument. [ruby-dev:18438] * eval.c (ruby_init, ruby_options): Init_stack() with local location. (ruby-bugs-ja:PR#277) * eval.c (rb_call0): disable trace call. [ruby-dev:18074] * eval.c (eval, rb_load): enable trace call. [ruby-dev:18074] * eval.c (rb_f_require): set source file name for extension libraries. [ruby-dev:18445] * ruby.c (translate_char): translate a character in a string; DOSISH only. [ruby-dev:18274] * ruby.c (ruby_init_loadpath): added argv[0] handling under Human68K. [ruby-dev:18274] * ruby.c (proc_options): translate directory separator in $0 to '/'. [ruby-dev:18274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25* io.c (appendline): forget to terminate with nul.matz
* eval.c (ruby_run): should set toplevel visibility again here. * eval.c (rb_eval): should not rely on ruby_class == rb_cObject check. Besides allow implicit publicity for attribute set methods. * parse.y (primary): need not to check class_nest, just set whether method is an attrset or not. * string.c (rb_str_each_line): p might be at the top of the string. * class.c (rb_make_metaclass): class of metaclass should be metaclass of superclass, unless class itself is a metaclass; class of metaclass of metaclass should point back to self. eh, confusing, isn't it. * class.c (rb_singleton_class): check if its class is singleton AND attached to self. * eval.c (rb_eval): should define class/module under ruby_cbase. * eval.c (rb_eval): should set class/module path based on ruby_cbase, not ruby_class. * eval.c (module_setup): use ruby_cbase instead of ruby_class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08* ext/tcltklib/tcltklib.c: prototype; invoke_queue_handler() to avoidusa
VC++ warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30* ext/Win32API/Win32API.c (Win32API_Call): RSTRING()->ptr may benobu
NULL. * ext/nkf/nkf.c (rb_nkf_guess): ditto. * ext/readline/readline.c (readline_s_set_completion_append_character): ditto. * ext/socket/socket.c (sock_s_getaddrinfo, sock_s_getnameinfo): ditto. * ext/tcltklib/tcltklib.c (ip_toUTF8, ip_fromUTF8): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19* array.c (sort_2): *a - *b may overflow.matz
* array.c (ary_new): len*sizeof(VALUE) may be a positive value. * array.c (rb_ary_initialize): ditto. * object.c (rb_class_allocate_instance): move singleton class check from rb_obj_alloc(). * re.c (rb_reg_initialize): should not modify frozen Regexp. * ext/tcltklib/tcltklib.c (ip_init): allocation framework. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-05* tcltklib.c:nagai
Stop the running zombi-eventloop when mainloop_watchdog is killed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* ext/tcltklib/tcltklib.c (Init_tcltklib): moved the definition before actions.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* tkfont.rb: Fix bugs on TkFont.init_widget_font for Tk8.x.nagai
* tkafter.rb: Add self to 1st argument of interval- and loop-proc TkAfter#current_interval returns an interval (sleep) time value TkAfter#current_args returns an array of arguments TkAfter#return_value returns a return value of last loop-proc e.g. TkAfter.new( proc{|obj| 500 - obj.current_interval}, 10, [proc{|obj| p obj.current_args}, 'proc', 1], proc{|obj| p obj.current_args; ['return', 2]}, [proc{|obj| p obj.return_value p ['proc', obj.current_args[0].call(obj.return_value[1], obj.current_args[1])]}, proc{|*args| args[0] + args[1]}, 1], proc{p ['proc', 4]} ).start(100) * tk*.rb: Allow to use Symbols for parameters. Allow new notation of constructor (also allow old notation). e.g. TkFrame.new('classname'=>'User'){|base| pack f = TkFrame.new(base, :classname=>'ButtonFrame').pack TkButton.new( :parent => f, :text => 'Quit', :command => proc{exit} ).pack( :fill => :x, :pady => 2 ) } * tkcanvas.rb: (TkcItem) Add 'coords' parameter to the canvas item constructor (for new notation of constructor). e.g. c = TkCanvas.new.pack l = TkcLine.new(c, :coords=>[[0,0], [100,100]]) * tcltklib.c: New 'mainloop' and 'mainloop_watchdog'. The priority of their event-loop can be controlled. They accept an optional argument. If it false, they don't exit although the root widget is destroyed. This function is sometimes useful, if it is used with 'restart'. 'mainloop' can't treat Thread#join/value in a callback routine. (e.g. TkButton.new(:command=>proc{p Thread.new{button.invoke}.value}) ) 'mainloop_watchdog' can treat them, but watchdog thread is always running (so, a little heavier than 'mainloop'). If the purpose of using Thread#join/value is to do something under some safe-level, please use Proc object. (e.g. :command=>proc{$SAFE=1;proc{$SAFE=2;button.invoke}.call;p $SAFE}) * tk.rb: Support functions of new 'mainloop' and 'mainloop_watchdog'. * tk.rb: (Tk.restart) Add 'app-name' paramater and 'use' parameter. 'app-name' specifies the name and the resource class of the application. If 'app-name' is specified to 'xxx', the application class on the resource database is set to 'Xxx' and the application name is changed by the same rule of Tk.appname method. 'use' specifies the main window for embedding the root widget instead of generating a new window. * tk.rb: Add new parameter 'widgetname' to the widget constructor to support effective use of Resource Database. For example, the resource 'Xxx*quit.text: QUIT' can set the text of the button generated by the following code. e.g. Tk.restart('Xxx') TkButton.new(nil, 'widgetname'=>'quit', 'command'=>proc{exit}).pack Tk.mainloop * tk.rb: TkOption::get always returns a tainted string. Add TkOption::new_proc_class. It generates a class to import procedures defined on the resource database. For example, there is a following resource file. ----< resource-test >------------ *CMD.foo: {|*args| p [$SAFE, :foo, args]} *CMD.XXX.bar: {|*args| p [$SAFE, :bar, args]} *Button.command: ruby {p self; p $SAFE; TkOption::CMD::XXX.bar(1,2,3)} --------------------------------- The following code is a sample of use of the resource file. e.g. require 'tk' TkOption.readfile 'resource-test' p TkOption.new_proc_class(:CMD, [:foo], 1) p TkOption.new_proc_class(:XXX, [:bar], 2, false, TkOption::CMD) TkButton.new(:text=>'test').pack Tk.mainloop git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01* ext/racc/cparse/cparse.c: prototype; call_scaniter().usa
* ext/sdbm/init.c: prototype; each_pair(). * ext/tcltklib/tcltklib.c: prototypes; _timer_for_tcl() and ip_ruby(), Nobu's patch at [ruby-dev:14483]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08* eval.c (cvar_cbase): utility function to find innermost nonmatz
singleton cbase. * eval.c (is_defined): adopt new cvar behavior. * eval.c (rb_eval): ditto. * eval.c (assign): ditto. * class.c (rb_mod_clone): should not call rb_obj_clone(), since Module does not provide "allocate". * class.c (rb_singleton_class): should crate new singleton class if obj is a class or module and attached object is different, which means metaclass of singleton class is sought. * time.c (time_s_alloc): now follows allocation framework. * eval.c (rb_eval): should initialize outer class variables from methods in singleton class definitions. * eval.c (assign): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-29* parse.y (str_extend): shuould allow interpolation of $-x.matz
* variable.c (rb_cvar_set): empty iv_tbl may cause infinite loop. * variable.c (rb_cvar_get): ditto. * variable.c (cvar_override_check): ditto. * bignum.c (rb_big_eq): convert Bignum to Float, instead of reverse. * time.c (time_localtime): getting tm should not be prohibited for frozen time objects. * time.c (time_gmtime): ditto. * version.c (Init_version): freeze RUBY_VERSION, RUBY_RELEASE_DATE, and RUBY_PLATFORM. * file.c (Init_File): freeze File::SEPARATOR, ALT_SEPARATOR and PATH_SEPARATOR. * file.c (rb_stat_cmp): should check operand type before calling get_stat(). * eval.c (rb_eval_cmd): should not invoke "call" with a block on any occasion. * numeric.c (fix_aref): idx may be a Bignum. * numeric.c (num_remainder): a bug in Numeric#remainder. * eval.c (rb_exec_end_proc): END might be called within END block. * class.c (rb_mod_clone): should not copy class name, since clone should remain anonymous. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-11* bignum.c (bigdivrem): access boundary bug.matz
* marshal.c (w_object): prohibit dumping out singleton classes. * object.c (rb_mod_to_s): distinguish singleton classes. * variable.c (rb_class2name): it's ok to reveal NilClass, TrueClass, FalseClass. * eval.c (rb_yield_0): preserve and restore ruby_cref as well. * eval.c (is_defined): core dumped during instance_eval for special constants. * eval.c (rb_eval): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-06forgot some checkins.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-08ebaneban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-06matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-13support mingw32.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-012000-02-01matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13remove marshal/gtk/kconvmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-01-20This commit was generated by cvs2svn to compensate for changes in r372,matz
which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16Initial revisionmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e