Coder Social home page Coder Social logo

Comments (4)

slluis avatar slluis commented on July 17, 2024

We can add a new overload which only takes an object, but we the Func overload still has a purpose. You can expose a type to be available in the clipboard, but serialize the data only when it is really required.

from xwt.

ermau avatar ermau commented on July 17, 2024

You can expose a type to be available in the clipboard, but serialize the data only when it is really required.

I don't see how. You've explained to me that there's really not a situation in which the execution will not happen, so unless Gtk is executing the callback for the clipboard get_data on another thread, I don't see how anything is really changed here.

from xwt.

ermau avatar ermau commented on July 17, 2024

There was some misunderstanding during our discussion, key piece of understanding:

13:22:28 lluis so, the callback will not be called if there is no actual paste operation

So I think your original solution of giving another overload and using this for basic types would be the best route.

from xwt.

slluis avatar slluis commented on July 17, 2024

Since the backend will have to implement the overload with the callback, I don't think it is necessary to have another overload for doing the same, taking into account that the difference in performance is negligible.

from xwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.