help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Gtk+ and GNU Smalltalk


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Gtk+ and GNU Smalltalk
Date: Tue, 14 Jan 2003 09:45:16 +0100
User-agent: Mutt/1.4i

> Here is a patch I have been working on for the blox/gtk
> directory. It leaves control in Gtk+'s main loop, and control only
> returns to Smalltalk when an event happens that the program is
> listening for.

This will eventually need to be changed, but it is a good start.
In general I appreciate your work a lot even though it has some
problems, so here is a review of your patches.

It's good to see things moving on blox-gtk, I hope to make it the
definitive back-end one day.

> +  lt_dlinit();
> +  supportHandle = lt_dlopen(".libs/blox-gtk-support.so");

I don't see the need for this support module (besides, the correct
way is not to pass .libs, but to add the proper path to LD_LIBRARY_PATH
until gst is installed).  Just link the files together.

> +bloxgtk_header_in = BloxGTK.h.in
> +bloxgtk_header_file = BloxGTK.h
> +bloxgtk_generated_c_files = BloxGTKSignalFuncs.c BloxGTKInitCallbackHash.c

BUILT_SOURCES = BloxGTK.h signal_funcs.c callback_hash.c

(It might be good to switch to blox-gtk.[hc] as well, I don't like mixed
case names even though it was me who wrote BloxGTK.c; feel free to do
that yourself).

> +CLEANFILES = $(noinst_SCRIPTS) $(bloxgtk_DATA) $(bloxgtk_header_file) 
> $(bloxgtk_generated_c_files)

CLEANFILES = ... $(BUILT_SOURCES)

> +blox_gtk_la_SOURCES = BloxGTK.c

blox_gtk_la_SOURCES = BloxGTK.c signal_funcs.c callback_hash.c

>  GtkDecl.st: $(srcdir)/GtkDecl.st.in $(noinst_PROGRAMS) .order structs funcs
>       (echo \"Don\'t modify this file, edit GtkDecl.st.in instead\!\"; \
> -       sed -ne '/\$/q' -e p $<; \
> +       sed -ne '/^\$$/q' -e p $< && \
>         builddir=`pwd`; \
>         cd $(GTK_HEADERS) && \
>         $$builddir/structs `cat $$builddir/.order` && \
>         $$builddir/enums && \
> -       $$builddir/funcs `cat $$builddir/.order`;
> -       sed '1,/\$/d' $<) > $@
> +       $$builddir/funcs `cat $$builddir/.order` && \
> +       sed '1,/^\$$/d' $$builddir/$<) > $@

Ok.  Probably better to switch to something more sensible like $data than
a lone dollar (again, my mistake).

> +BloxGTK.h:
> +BloxGTKSignalFuncs.c: make_signal_funcs make_callback_hash .order
> +     sed -ne '/^\$$/q' -e p $(bloxgtk_header_in) > $(bloxgtk_header_file)
> +     (builddir=`pwd`; \
> +     cd $(GTK_HEADERS) && \
> +     $$builddir/make_signal_funcs -v 
> header_file=$$builddir/$(bloxgtk_header_file) \
> +       `cat $$builddir/.order`) > $@
> +     sed '1,/^\$$/d' $(bloxgtk_header_in) >> $(bloxgtk_header_file)
> +
> +BloxGTKInitCallbackHash.c: make_callback_hash .order
> +     (builddir=`pwd`; \
> +     cd $(GTK_HEADERS) && \
> +     $$builddir/make_callback_hash `cat $$builddir/.order`) > $@
> +

Good, again apart from the file names.

> -      decl = decl " self"
> +      decl = decl " #self"
>  
>      else if (substr(tst, 1, 3) == "...")
> -      decl = decl " variadic"
> +      decl = decl " #variadic"

Obviously.

> Only in smalltalk-2.0.9/blox/gtk: make_signal_funcs.awk

Please use diff -rNu (also for make_callback_hash.awk) so that the
files are included.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]