[Vala] Yet another binding question...



I am (still) working on bindings for X, and I've run into a strange
situation.  It would be natural to wrap an X Window in its own object,
but the window functions all start with:

  win_func(Display *d, Window w, ...)

But (at least, as far as *I* am aware) a window is created on a display
and screen and then cannot be moved to another.  The reason why
supplying both is necessary, though, is that Window is really just an
integer ID, and that doesn't carry with it any display information.

I'm trying to make the bindings as good as possible and working to
eliminate the need to write a wrapper class, is really what my goal
is.  I realize that might not be possible, but I am hoping that awkward
situations like this have been run into before and that maybe someone
has a solution for them.

Window is currently defined as:

  Window is an XID,
  XID is a CARD32,
  CARD32 is a ulong.

Anyway, the basic question is, am I stuck with binding this together in
the (presently ugly, IMHO) way of including all of the window functions
in the display compact class, or is there a way that I can represent
these functions as part of its Vala struct?

        Thanks again,
        Mike

-- 
My sigfile ran away and is on hiatus.
http://www.trausch.us/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]