diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-13 17:07:26 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-13 17:07:26 +0000 |
| commit | e30d25667318f6d758b82da704f06b631623a50e (patch) | |
| tree | f606c681180beb846a65b950cfddf9b7d989df2b /ext/tk/lib | |
| parent | 25d28732cbe56e1123de9479fff0732a0ad46912 (diff) | |
| download | ruby-e30d25667318f6d758b82da704f06b631623a50e.tar.gz ruby-e30d25667318f6d758b82da704f06b631623a50e.tar.xz ruby-e30d25667318f6d758b82da704f06b631623a50e.zip | |
* ext/tk/tkutil/tkutil.c: add TkUtil::CallbackSubst.subst_arg(m, ...)
& _define_attribute_aliases(hash) to get substitution-argument from
attributes (e.g. subst_arg(:x,:y,:num,:button) --> "%x %y %b %b ").
* ext/tk/lib/tk/event.rb: use _define_attribute_aliases().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
| -rw-r--r-- | ext/tk/lib/tk/event.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/event.rb b/ext/tk/lib/tk/event.rb index dd01ba630..35d2beecd 100644 --- a/ext/tk/lib/tk/event.rb +++ b/ext/tk/lib/tk/event.rb @@ -130,6 +130,7 @@ module TkEvent # [] #end +=begin alias button num alias delta wheel_delta alias root rootwin_id @@ -138,6 +139,19 @@ module TkEvent alias rooty y_root alias root_y y_root alias sendevent send_event +=end + ALIAS_TBL = { + :button => :num, + :delta => :wheel_delta, + :root => :rootwin_id, + :rootx => :x_root, + :root_x => :x_root, + :rooty => :y_root, + :root_y => :y_root, + :sendevent => :send_event + } + + _define_attribute_aliases(ALIAS_TBL) end |
