unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Questions about embedding Guile
@ 2002-08-13 20:38 Jesse Marlin
  2002-08-13 21:17 ` Marius Vollmer
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Marlin @ 2002-08-13 20:38 UTC (permalink / raw)



I am not sure if this is the right list for this kind of question.

I am considering embedding guile in an application, and have some
questions about doing this.  The application will be using GTK.
I see three possible ways of doing this one of which may not be a
way at all:

1.  Using GTK's event loop for control and processing guile events
    either one at a time or a glob.

2.  Using Guile's event loop (or whatever it is referred to) and
    processing GTK events either one at a time or a glob.

3.  Run Guile in a seperate thread.


I am pretty sure 2 is possible and 1 is not.  I do not see a way in Guile
to control the flow of the interpreter.  GTK does provide such a mechanism
so 2 should be possible.  3 seems possible but may increase the complexity
of the design.

The application will have certain drawing primitives which I wish to be
user extendable using Guile, and possibly also extending the UI as well.

What would be ideal is to have my own event loop something like:

while (1)
{
	/* Process GTK events */
	gtk_main_iteration ();

	/* Process guile events */
	gh_process_events ();
}

Is this possible or does anybody have any suggestions for doing this?
Thanks for any help.



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Questions about embedding Guile
  2002-08-13 20:38 Questions about embedding Guile Jesse Marlin
@ 2002-08-13 21:17 ` Marius Vollmer
  2002-08-13 22:31   ` Jesse Marlin
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Vollmer @ 2002-08-13 21:17 UTC (permalink / raw)
  Cc: Guile Devel, guile-user

Jesse Marlin <jlm@compgen.com> writes:

> I am not sure if this is the right list for this kind of question.

<guile-user@gnu.org> would also be more appropriate.  I have CCed us
there.

> I am considering embedding guile in an application, and have some
> questions about doing this.  The application will be using GTK.

Do you know about guile-gtk?

> I see three possible ways of doing this one of which may not be a
> way at all:
> 
> 1.  Using GTK's event loop for control and processing guile events
>     either one at a time or a glob.

Guile does not have events just like C does not have events.  You
don't need to do something special to 'keep Guile running'.  However,
you need to take the same care in your Scheme programs to keep Gtk
running as you need to in C code.

> 2.  Using Guile's event loop (or whatever it is referred to) and
>     processing GTK events either one at a time or a glob.

Guile-gtk offers this option...

> 3.  Run Guile in a seperate thread.

and also this.  Guile-gtk can run the Gtk event loop in a separate
Guile thread.

Does this help?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Questions about embedding Guile
  2002-08-13 21:17 ` Marius Vollmer
@ 2002-08-13 22:31   ` Jesse Marlin
  0 siblings, 0 replies; 3+ messages in thread
From: Jesse Marlin @ 2002-08-13 22:31 UTC (permalink / raw)
  Cc: jlm, Guile Devel, guile-user

Marius Vollmer writes:
 > Jesse Marlin <jlm@compgen.com> writes:
 > 
 > > I am not sure if this is the right list for this kind of question.
 > 
 > <guile-user@gnu.org> would also be more appropriate.  I have CCed us
 > there.
 > 
 > > I am considering embedding guile in an application, and have some
 > > questions about doing this.  The application will be using GTK.
 > 
 > Do you know about guile-gtk?

No.  I will have to look into it.  It looks promising.

 > 
 > > I see three possible ways of doing this one of which may not be a
 > > way at all:
 > > 
 > > 1.  Using GTK's event loop for control and processing guile events
 > >     either one at a time or a glob.
 > 
 > Guile does not have events just like C does not have events.  You
 > don't need to do something special to 'keep Guile running'.  However,
 > you need to take the same care in your Scheme programs to keep Gtk
 > running as you need to in C code.
 > 
 > > 2.  Using Guile's event loop (or whatever it is referred to) and
 > >     processing GTK events either one at a time or a glob.
 > 
 > Guile-gtk offers this option...
 > 
 > > 3.  Run Guile in a seperate thread.
 > 
 > and also this.  Guile-gtk can run the Gtk event loop in a separate
 > Guile thread.
 > 
 > Does this help?

Yes, thanks.

 > 
 > -- 
 > GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405
 > 
 > 
 > _______________________________________________
 > Guile-devel mailing list
 > Guile-devel@gnu.org
 > http://mail.gnu.org/mailman/listinfo/guile-devel




_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-13 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-13 20:38 Questions about embedding Guile Jesse Marlin
2002-08-13 21:17 ` Marius Vollmer
2002-08-13 22:31   ` Jesse Marlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).