Skip to content

Discussion: Clipboard API #704

Closed
Closed

Description

@Osspial

As per #162 and #695, we've decided that Winit should support clipboard handling. This issue is intended to house discussion on the API.

Discussion points:

  • In most cases, data that can be copied can also be dragged and dropped. To what extent should this be unified with the drag/drop API?
  • Clipboards can contain quite a few types of content (e.g. text, images, sounds, files). How do we want to handle these clipboard data formats? When do we want to distinguish between formats, and when do we want to map multiple OS formats onto one exposed format?
    • Additionally, some OSes support data sub-types. How do we want to expose those?
      • Windows lets you copy HTML snippets for rich text, and Wayland supports full MIME specification.
  • Oftentimes, clipboard data can include the same data in multiple formats (e.g. words in a plain-text vs a rich-text format). How do we handle this?
    • Similarly, how do we allow people to upload the same data in different formats to the clipboard?

Activity

  1. Osspial commented on Nov 14, 2018

    @Osspial
    ContributorAuthor

    Also, how do we want to handle custom clipboard data formats? Supporting this would allow applications to use the system clipboard to store non-standard data, like mesh data in a 3D modeling app, which can be quite useful. It can also be used to embed application-specific metadata alongside standard formats - for example, Sublime Text embeds language information in a sublime-text-extra format.

  2. added
    S - api
    C - needs discussion
    on Nov 17, 2018
  3. Osspial commented on Dec 31, 2018

    @Osspial
    ContributorAuthor

    I'm closing this, since we've since decided against having a clipboard API.

  4. madsmtm commented on Jan 27, 2022

    @madsmtm
    Member

    We're discussing this again in #2156, for the people following this issue, feel free to drop by and give input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionS - api

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions