Coder Social home page Coder Social logo

Comments (10)

i-rinat avatar i-rinat commented on June 30, 2024

This part of API is not implemented yet.

from freshplayerplugin.

blackwolf12333 avatar blackwolf12333 commented on June 30, 2024

I wanted to implement this one, is it alright if I try to do that this weekend? Or do you want it earlier?

from freshplayerplugin.

 avatar commented on June 30, 2024

Take your time, it's not really important for me.

from freshplayerplugin.

i-rinat avatar i-rinat commented on June 30, 2024

@blackwolf12333, go ahead. I still have ppb_tcp_socket_private and ppb_graphics3d to do.

from freshplayerplugin.

yjwong avatar yjwong commented on June 30, 2024

For a quick fix, modify ppb_flash_clipboard_write_data (in src/ppb_flash_clipboard.c) to include the following:

GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
for (uintptr k = 0; k < data_item_count; k ++) {
    gtk_clipboard_set_text(clipboard, ppb_var_var_to_utf8(data_items[k], NULL, -1);
}

return PP_OK;

Of course, need to #include <gtk/gtk.h> at the top of the file.

from freshplayerplugin.

blackwolf12333 avatar blackwolf12333 commented on June 30, 2024

It's interesting how I can't find an API I can use for this. Does Linux provide some API that I can use without adding huge dependencies like gtk or Qt?

from freshplayerplugin.

yjwong avatar yjwong commented on June 30, 2024

If I'm not wrong, the plugin already depends on GTK so I thought it's perfectly acceptable to depend on the GTK APIs. There may be lower level APIs (Xlib, perhaps?), but they all require an event loop.

Edit: This may be useful: http://tronche.com/gui/x/icccm/sec-2.html#s-2

from freshplayerplugin.

blackwolf12333 avatar blackwolf12333 commented on June 30, 2024

If it already depends on that I could probably use your solution with some extra work to do the other stuff too.

from freshplayerplugin.

i-rinat avatar i-rinat commented on June 30, 2024

Even with GTK there can be issues with event loop.

from freshplayerplugin.

i-rinat avatar i-rinat commented on June 30, 2024

Implemented in 6350285, 3badc4e, e47a8ea, a1fc32a, and 6d09e79.

from freshplayerplugin.

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.