From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Vollmer To: sen_ml@eccosys.com Cc: guile-gtk@sourceware.cygnus.com Subject: Re: obtaining the selection: gtk_selection_convert? Date: Tue, 18 Apr 2000 12:48:00 -0000 Message-id: <874s8zb5hl.fsf@zagadka.ping.de> References: <87wvm385ar.fsf@zagadka.ping.de> <20000414102257V.1000@eccosys.com> <874s91st4c.fsf@zagadka.ping.de> <20000417184107V.1000@eccosys.com> X-SW-Source: 2000-q2/msg00023.html 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