Interaction Techniques and Technologies (ITT), SS 2017
Session 21 (20.07.2016), Raphael Wimmer
These are slides/notes for the lecture, automatically generated from the slide set. Please extend this outline with your own notes.
Overall: Learn more about generic interaction techniques and tracking
Know
Learn
Practice
<small>Shneiderman, B. and Plaisant, C., Designing the User Interface: Strategies for Effective Human-Computer Interaction: Fifth Edition, Addison-Wesley Publ. Co., Reading, MA (2010), 606 pages. online </small>
Questions:
How does a clipboard behave? What do you expect from a typical clipboard?
Qt Clipboard inspector
~~~~ show_clipboard.py #!/usr/bin/python3 from PyQt5.QtWidgets import QApplication app = QApplication(["",""]) clipboard = app.clipboard() mimeData = clipboard.mimeData() print("Current clipboard offers formats: " + str(mimeData.formats())) for f in mimeData.formats(): print("---- %s ----" % f) data = str(mimeData.data(f)) if len(data) > 100: print(data[:100] + " [...]") else: print(data) print("") ~~~~
pbs
accessed via APIsNSString, NSAttributedString, NSImage, NSURL, NSColor, NSSound
), general class NSPasteboardItem
or custom classes adopting NSPasteBoardReading
protocolUniform Type Identifier
(UTI) describes type of data (e.g., public.jpeg
or com.myCompany.myApp.myType
)Pasteboard
class provides convenience methods for copying/pasting images, URLs, …CLIPBOARD
selection.CLIPBOARD
selection.PRIMARY
buffer (holds selected text, pasted via middle click) and SECONDARY
buffer (mostly unused), similar mode of operation as clipboard.Further reading: explanation by Jamie Zawinski, Freedesktop.org clipboard "specification", ICCCM: Peer-to-Peer Communication by Means of Selections
ClipData
object at a time, consisting of:ClipDescription
object containing list of MIME typesClipData.Item
s, all having the same type: text, URI, or Intent[ClipboardManager](http://developer.android.com/reference/android/content/ClipboardManager.html).setPrimaryClip(ClipData)
This stuff is so underdocumented that it isn’t even funny. This document is written so that others might find something when they search the Web.“*