Interaction Techniques and Technologies (ITT), SS 2025
Raphael Wimmer
These are slides/notes for the lecture, automatically generated from the slide set. Please extend this outline with your own notes.
<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?
[^stolee]: Stolee, Elbaum, & Rothermel (2009) Revealing the Copy and Paste Habits of End Users. [^retzer]: David Retzer (2017) “Implementierung eines Copy&Paste-Mechanismus mit Quellenattribuierung” (Master's Thesis). [^kim]: Kim, Bergman, Lau, & Notkin (2004) An Ethnographic Study of Copy and Paste Programming Practices in OOPL.
[^stolee]: Stolee, Elbaum, & Rothermel (2009) Revealing the Copy and Paste Habits of End Users
How does a clipboard work?
~~~~
from PyQt6.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 gets notified.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, X11: How does “the” clipboard work?
wl_data_source
, receiving application sees it as wl_data_offer
object.offer
for each MIME type that is offered.Further reading: Wayland protocol: data sharing, Wayland clipboard and drag & drop
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)
CLIPBOARD
selection)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.”*
dragdrop_example.py
in GRIPS.