This is the mail archive of the
guile-gtk@sourceware.cygnus.com
mailing list for the Guile project.
Re: obtaining the selection: gtk_selection_convert?
sen_ml@eccosys.com writes:
> > What is the meaning of format, data and length?
>
> well, i can quote what i saw in the gtk tutorial ('Managing Selection"):
>
> format gives the length of the units (for instance characters) in
> bits. Usually, you don't care about this when receiving data. data is
> a pointer to the returned data, and length gives the length of the
> returned data, in bytes.
Ok, thanks. I think we should make two accessor functions: one for
returning the data as a string (because that should be a very common
need) and one for returning a vector of integers.
> > > (pointer data)
> >
> > and `pointer' should not be used.
>
> what should be used instead? "pointer" was a blind guess -- the type in
> gtkwidget.h is guchar*
We can't access data and length as fields. Their semantics are too
complex for fields (or fields are too stupid). We have to write C
functions that can be then be wrapped with define-func. I'd have to
review what build-guile-gtk can actually do with vectors to say more.
> i wish i could say that i had the skill, but alas...
It's not so much skill, it's the sorry state of the guile-gtk
documentation.
- Marius