summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkmacpkg.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-01 16:09:54 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-01 16:09:54 +0000
commit4c4631c2daaf7b2418c1f0e39292c8ee27a64813 (patch)
treedfeb96c4772df8caba4e01e749c8f3e1262f8fe0 /ext/tk/lib/tkmacpkg.rb
parentce23680755e4e9ab0eed9dc6adb091ef7f1c58cb (diff)
* renewal Ruby/Tk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkmacpkg.rb')
-rw-r--r--ext/tk/lib/tkmacpkg.rb56
1 files changed, 2 insertions, 54 deletions
diff --git a/ext/tk/lib/tkmacpkg.rb b/ext/tk/lib/tkmacpkg.rb
index 3bac5e6c3e..35560e78ce 100644
--- a/ext/tk/lib/tkmacpkg.rb
+++ b/ext/tk/lib/tkmacpkg.rb
@@ -1,56 +1,4 @@
#
-# tkmacpkg.rb : methods for Tcl/Tk packages for Macintosh
-# 2000/11/22 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
+# tkmacpkg.rb - load tk/macpkg.rb
#
-# ATTENTION !!
-# This is NOT TESTED. Because I have no test-environment.
-#
-#
-require 'tk'
-
-module TkMacResource
- extend Tk
- extend TkMacResource
-
- TkCommandNames = ['resource'.freeze].freeze
-
- tk_call('package', 'require', 'resource')
-
- def close(rsrcRef)
- tk_call('resource', 'close', rsrcRef)
- end
-
- def delete(rsrcType, opts=nil)
- tk_call('resource', 'delete', *(hash_kv(opts) + rsrcType))
- end
-
- def files(rsrcRef=nil)
- if rsrcRef
- tk_call('resource', 'files', rsrcRef)
- else
- tk_split_simplelist(tk_call('resource', 'files'))
- end
- end
-
- def list(rsrcType, rsrcRef=nil)
- tk_split_simplelist(tk_call('resource', 'list', rsrcType, rsrcRef))
- end
-
- def open(fname, access=nil)
- tk_call('resource', 'open', fname, access)
- end
-
- def read(rsrcType, rsrcID, rsrcRef=nil)
- tk_call('resource', 'read', rsrcType, rsrcID, rsrcRef)
- end
-
- def types(rsrcRef=nil)
- tk_split_simplelist(tk_call('resource', 'types', rsrcRef))
- end
-
- def write(rsrcType, data, opts=nil)
- tk_call('resource', 'write', *(hash_kv(opts) + rsrcType + data))
- end
-
- module_function :close, :delete, :files, :list, :open, :read, :types, :write
-end
+require 'tk/macpkg'