This is the mail archive of the guile-gtk@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: obtaining the selection: gtk_selection_convert?



thanks for the response.  my comments follow.

> sen_ml@eccosys.com writes:
> 
> > my guess would have been to add:
> > 
> >   (define-func gtk_selection_convert
> >     int
> >     ((GtkWidget widget)
> >      (GdkAtom selection)
> >      (GdkAtom target)
> >      (uint time)))
> 
> Ok, I have done this now in CVS.  Can you test it?

sorry to be slow -- it took a day to set up a development machine ;-)

gtk-selection-convert itself seems to work -- the problem now appears
to be that when you register a callback for "selection_received",
one of the arguments to the callback is GtkSelectionData.  when the
callback call is attempted, there appear to be problems because
GtkSelectionData doesn't seem to have a guile-gtk manifestation yet.

GtkSelectionData's definition (or the underscore version) is:

struct _GtkSelectionData
   {
     GdkAtom selection;
     GdkAtom target;
     GdkAtom type;
     gint    format;
     guchar *data;
     gint    length;
   };

not really knowing what to do, i tried adding:

(define-object GtkSelectionData ()
  (fields
    (atom selection)
    (atom target)
    (atom type)
    (uint format)
    (pointer data)
    (int length)))

to gtk-1.2.defs, but make ended in:

...
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I/usr/include -I/usr/lib/glib/include -I/usr/X11R6/include -g -O2 -Wp,-MD,.deps/gtk-glue.pp -c gtk-glue.c
 -fPIC -DPIC -o .libs/gtk-glue.lo
gtk-glue.c:799: `gtk_selection_data_get_type' undeclared here (not in a function)
gtk-glue.c:799: initializer element is not constant
gtk-glue.c:799: (near initialization for `sgtk_gtk_selection_data_info.init_func')
gtk-glue.c:14462: parse error before `:'
make: *** [gtk-glue.lo] Error 1

does this mean there are some related function definitions i should
add as well?

p.s. what is the recommended procedure for building guile-gtk from a fresh
checkout via cvs?  right now i'm doing:

  % sh autogen.sh
  % ./configure
  % make

i only figured out the bit about autogen.sh by looking through the archives.
is there an important bit of documentation i am missing?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]