Results 1 to 4 of 4

Thread: Using GTK for ClanLib 0.9 Linux

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default Using GTK for ClanLib 0.9 Linux

    There is currently a lack of clipboard support with the ClanLib 0.9 Linux platform.

    This is for: CL_DisplayWindow::get_clipboard_text()

    As ClanLib "should" work on different window managers, this causes a problem (As XLib does not provide a clipboard.)

    I was thinking that GTK could be an option.

    This works on Gnome. Also i believe it runs on KDE (as kde can run gnome apps).

    See http://www.gtk.org/

    See http://www.vector-seven.com/2007/06/ for an example on how to use it.

    Any recommendations / suggestions?

  2. #2
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    A clipboard is implemented via the window manager. As such, you can get to it using ICCCM via XLib, if the current window manager supports that standard, as modern ones do. But like all things Linux, there's no guarantees.

    Here's a nice bit of sample code with extensive explanatory comments on how to do it through XLib:

    http://mi.eng.cam.ac.uk/~er258/code/...board/paste.cc

    --- Kevin

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I have now implemented: get_clipboard_text()

    The set_clipboard_text() is more of a challenge, as it needs to tie up with processing XEvents.

    See (qt-2.1.0/src/kernel/qclipboard_x11.cpp) for how they do it.

    I do not have time at the moment to look at it further.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Clipboard support is now fully implemented for linux (I hope!)

Similar Threads

  1. Installing ClanLib 0.8 and ClanLib 0.9 on linux
    By rombust in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-15-2008, 09:51 AM
  2. Does ClanLib support the Linux framebuffer or DirectFB?
    By stodge in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-03-2007, 07:47 PM
  3. Patch for ClanLib 0.9 svn 368 (Linux compatibility)
    By rombust in forum Official ClanLib SDK Forums
    Replies: 7
    Last Post: 05-16-2007, 08:02 AM
  4. FQ and Linux
    By jjohn in forum Funeral Quest
    Replies: 0
    Last Post: 09-04-2004, 12:23 AM
  5. Linux port
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 09-12-2002, 05:03 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •