XLib (specifically, the swig xlib wrapper)

Discussion in 'Ruby' started by Axis Sivitz, Aug 24, 2006.

  1. Axis Sivitz

    Axis Sivitz Guest

    I want to write a window manager in Ruby (or at least, write some sort
    of prototype to learn how they are made) but all the Xlib bindings
    available are years old and/or incomplete.

    One project, however, uses SWIG and is fairly complete (though it is a
    direct translation of the function calls). I could use it, or at least
    turn it into something more ruby-like, but it's pretty out of date.
    That is, it won't compile on my machine. I spent a while looking into
    the errors, but I've never used SWIG before, so I didn't get very far.

    Would anyone with SWIG experience be willing to bring it up to speed to
    some current-ish version of SWIG? As a head start, there's a patch that
    does some of the work, though it just gives me different errors.

    project page: http://sourceforge.net/projects/ruby-xlib-wrap/

    patch:
    http://sourceforge.net/tracker/index.php?func=detail&aid=756724&group_id=36722&atid=417702

    Thanks
    Axis Sivitz, Aug 24, 2006
    #1
    1. Advertising

  2. On 8/24/06, Axis Sivitz <> wrote:
    > I want to write a window manager in Ruby (or at least, write some sort
    > of prototype to learn how they are made) but all the Xlib bindings
    > available are years old and/or incomplete.
    >
    > One project, however, uses SWIG and is fairly complete (though it is a
    > direct translation of the function calls). I could use it, or at least
    > turn it into something more ruby-like, but it's pretty out of date.
    > That is, it won't compile on my machine. I spent a while looking into
    > the errors, but I've never used SWIG before, so I didn't get very far.
    >
    > Would anyone with SWIG experience be willing to bring it up to speed to
    > some current-ish version of SWIG? As a head start, there's a patch that
    > does some of the work, though it just gives me different errors.
    >
    > project page: http://sourceforge.net/projects/ruby-xlib-wrap/
    >
    > patch:
    > http://sourceforge.net/tracker/index.php?func=detail&aid=756724&group_id=36722&atid=417702
    >


    Hello

    Last time I looked at ruby-xlib-wrap it was far from ideal. The
    problem I found was that some Xlib functions often return repeatedly
    the same pointer/value (ie the value of screen or display normally
    does not change) but swing would wrap it in new objects. This is both
    inefficient and obscures the fact that the value is identical.

    I intended to update some of the wrappers that I would need for my
    program but then I found a working solution that was already written
    in C. So I got no swig experience either.

    Assuming the state of the library did not change much you would have
    to add some hand-crafted code anyway, so you could as well start
    looking into swig.

    I'm looking forward to the ruby wm :)

    Thanks

    Michal
    Michal Suchanek, Aug 28, 2006
    #2
    1. Advertising

  3. Axis Sivitz

    Kero Guest

    >> I want to write a window manager in Ruby (or at least, write some sort
    >> of prototype to learn how they are made) but all the Xlib bindings
    >> available are years old and/or incomplete.


    My Ruby/Wise is indeed incomplete.
    I have no SWIG experience.

    Maybe matju's binding (not Xlib, talks directly to the Xserver) is of use:
    http://artengine.ca/matju/RubyX11/

    > I'm looking forward to the ruby wm :)


    I found out today that wmii plugins are mostly written in Ruby :)

    and I learned of wmii from dutch.rb (which needs a successor).
    Kero, Aug 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. M. Faust
    Replies:
    0
    Views:
    387
    M. Faust
    Oct 18, 2004
  2. Ferry Boender
    Replies:
    0
    Views:
    452
    Ferry Boender
    Dec 13, 2005
  3. Replies:
    0
    Views:
    374
  4. Replies:
    0
    Views:
    240
  5. Tammo Tjarks
    Replies:
    0
    Views:
    93
    Tammo Tjarks
    Feb 7, 2007
Loading...

Share This Page