libseed-list GIR, compatibility, etc.. (was Re: g_async_queue)



Ok, thanks for making it a bit clearer!

Perhaps you should link to your site from the main seed webpage?

So, does that mean that I need to have the latest checkout of GLib etc to use your GIR files?

Yes, it seems a bit of a slow process... Personally I'm hoping to release a cross-platform (linux & OS X) software built with seed and custom C modules in a couple of months or so, and I'm a bit worried about how to keep everything together and compatible. Any tips?

On OS X I will probably put seed and all the needed g-libs with their GIRs in the app bundle, but linking with the already-installed WebKit/JavaScriptCore..

/Jonatan

Alan Knowles wrote:
Sorry

The API that is exposed to Seed/GJS/Pygi etc.. via GIR's for Glib are
still changing

Probably as they realize how it is currently exposed, and consider
how they would like it to be exposed.

The GIR files on my site, are generated every so often using a git
checkout of the development head - it's a build box set up to
specifically build from git. (although I've forced it to support only
Gtk-2 at present, as otherwise most of the GIR's become useless for
day-to-day work..)

Hence when you use that GIR -it's either the latest intention of what
the API is going to be (with the latest fixes etc.) - or broken due
to someone commiting a borked patch ;)

The 'where do I get my gir' question is a bit problematic eg. a) from
my distro.. - usually out of date, and quite a few of the edge cases
are broken (eg. gtktreeview etc.. are unusable) b) build yourself ..
- best, but most painfull... - jhbuild seems to be the best tool for
this. c) just grab them from my site - not great, but it works most
of the time ;)

g-ir-repository was a stopgap solution until the upstream projects
include GIR's into the build systems. (I got avahi to include theirs
this week)

One of the problems is that since it's all 'source generated' - if
there is a bug in the source, then you have to modify the source, -
send patch to maintainer, wait for release, hope distro's update, and
eventually get it on a machine..

Since alot of the time, it's just a matter of changing a small part
of the GIR, it's rather a long road to go down to get results. I'd
love to see a better solution.. but that takes someone's time....

Regards Alan

--- On 29/Jun/2010, Jonatan Liljedahl wrote:
Alan Knowles wrote:
You might have better luck with the new Gir file http://devel.akbkhome.com/seed/GLib-2.0.gir

Which uses the new API http://devel.akbkhome.com/seed/GLib.AsyncQueue.html
Is the new API == current seed git?

Also, excuse my ignorance but is the new Gir file something
specific for seed or improvements for the official GLib Gir-file?
I'm not sure I entirely understand the system for all this
gir-stuff, but I thought the files where generated from the actual
libs somehow.. Also there was a gir-repository, is that the place
to get them from or how does it work?

pushing/pulling pointers though is going to be difficult to
define an expected behaviour..

We could have some limited support, eg. only supporting gobject
types both ways, but Gobject/structs as in arguments. convert JS
-> void* ==> wrapped Gobject/struct => pointer (this has some
partial support now) convert void* -> JS ==> only support Gobject
types (this is not supported at present)

That way GString could be used to send data as raw data. and
GValues could be used to store/retrieve JS data..
Wouldn't it work to just push the JSValueRef pointer as it is, and
 perhaps protect it from the GC while it's in the queue? Then one
could just push whatever JS value to the queue and get it back as
it was. But I'm surely missing something...

/Jonatan

Regards Alan


--- On 24/Jun/2010, Jonatan Liljedahl wrote:
I'd like to use a GAsyncQueue to communicate between threads,
but:

a = new GLib.AsyncQueue

** (seed:2468): CRITICAL **: Struct/union of type: AsyncQueue
has size 0 in introspection data. Please check GIR Segmentation
fault

Trying the other way:

a = GLib.async_queue_new()
[object seed_struct]
GLib.async_queue_push(a,"hejsan") GLib.async_queue_length(a)
1
GLib.async_queue_push(a,"hejsan") x=GLib.async_queue_pop(a) typeof x
undefined
GLib.async_queue_length(a)
0


How can I get it to work?

It's a bit frustrating that the GLib/GObject bridge is only
working for some stuff, and other times it requires a bit of
guessing to figure out how to use them (like functions
returning things to a pointer supplied as an arg, etc..)

/Jonatan

_______________________________________________ libseed-list
mailing list libseed-list gnome org http://mail.gnome.org/mailman/listinfo/libseed-list
_______________________________________________ libseed-list
mailing list libseed-list gnome org http://mail.gnome.org/mailman/listinfo/libseed-list




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