diff options
author | wordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e> | 2009-12-07 13:22:10 (GMT) |
---|---|---|
committer | wordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e> | 2009-12-07 13:22:10 (GMT) |
commit | de2bf115be6498b8bc30a40173239e2b1bdede8f (patch) | |
tree | b5aa24d99f34debe29f6a56f0b9267ea1ca99ce4 | |
parent | 9e864ebf095389ac410c59d71cae56872a918a98 (diff) | |
download | tkdnd-de2bf115be6498b8bc30a40173239e2b1bdede8f.zip tkdnd-de2bf115be6498b8bc30a40173239e2b1bdede8f.tar.gz tkdnd-de2bf115be6498b8bc30a40173239e2b1bdede8f.tar.bz2 |
Updates for Mac drag and drop
-rw-r--r-- | library/tkdnd_macosx.tcl | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/library/tkdnd_macosx.tcl b/library/tkdnd_macosx.tcl new file mode 100644 index 0000000..85e3242 --- /dev/null +++ b/library/tkdnd_macosx.tcl @@ -0,0 +1,44 @@ +# +# tkdnd_macosx.tcl -- +# +# This file implements some utility procedures that are used by the TkDND +# package. +# +# +# The following terms apply to all files associated +# with the software unless explicitly disclaimed in individual files. +# +# The authors hereby grant permission to use, copy, modify, distribute, +# and license this software and its documentation for any purpose, provided +# that existing copyright notices are retained in all copies and that this +# notice is included verbatim in any distributions. No written agreement, +# license, or royalty fee is required for any of the authorized uses. +# Modifications to this software may be copyrighted by their authors +# and need not follow the licensing terms described here, provided that +# the new terms are clearly indicated on the first page of each file where +# they apply. +# +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +# MODIFICATIONS. +# + + +#basic API for Mac Drag and Drop +#generate virtual events: <<MacDragEnter>>, <<MacDragExit>>, <<MacDropPerform>> + +#two data types supported: strings and file paths + +#two commands at C level: ::macdnd::registerdragwidget and ::macdnd::unregisterdragwidget +#::macdnd::registerdragwidget has hard-coded args: path stringtype filetype -- must have all three; if widget does not support strings, put {} there; if does not support files, put {} there; uses string length of that arg position to determine whether drag type is supported + +#data retrieval mechanism: text or file paths are copied from drag clipboard to system clipboard and retrieved via [clipboard get]; array of file paths is converted to single tab-separated string, can be split into Tcl list
\ No newline at end of file |