Rép. : gtkmm-list Digest, Vol 12, Issue 19



Hi,

Some time ago I tried the Dispatcher concept. Here is my solution (not perfect but demonstrating the spirit of dispatcher and threads): 

	startstop.glade: xml file defining the window
	startstop.cc: c++ source code...
	b.cygwin: a script that make the project under cygwin
	b.linux: a script that make the project under linux

I hope it will help you!


>>> gtkmm-list-request gnome org 04/12 12:01 pm >>>
Send gtkmm-list mailing list submissions to
	gtkmm-list gnome org 

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.gnome.org/mailman/listinfo/gtkmm-list 
or, via email, send a message with subject or body 'help' to
	gtkmm-list-request gnome org 

You can reach the person managing the list at
	gtkmm-list-owner gnome org 

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtkmm-list digest..."


Today's Topics:

   1. Re: Use of threads with gtkmm. (Fredrik Arnerup)


----------------------------------------------------------------------

Message: 1
Date: Tue, 12 Apr 2005 15:31:38 +0200
From: Fredrik Arnerup <arnerup kth se>
Subject: Re: Use of threads with gtkmm.
To: Paul Davis <paul linuxaudiosystems com>
Cc: gtkmm-list gnome org 
Message-ID: <1113312698 7768 8 camel localhost localdomain>
Content-Type: text/plain; charset=ISO-8859-1

On mån, 2005-04-11 at 14:17 -0400, Paul Davis wrote:
> >This excerpt from the FAQ sounds like what I'm after:
> >"or alternatively, ensure that only a single thread makes such calls.
> >One common way to do this is to have non-GUI threads send requests to
> >the GUI thread via a pipe. The pipe is hooked into the main glib event
> >loop used by GTK."
> >
> >But I've been unable to find any simple example code for this. Could anyone
> >provide a brief example?
> 
> there is no brief example. there's no "brief" way to do it. i would
> point at Ardour's ViewCVS system, but the code there is complicated by
> the fact that the code used has to be real-time safe, which will make
> it much harder for you to understand how it works.

There is a brief way. Use Glib::Dispatcher, which is a asynchronous
signal that uses a pipe. I'm not sure if there is an example program,
but this is a very common question.

-- 
Fredrik Arnerup <arnerup kth se>



------------------------------

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org 
http://mail.gnome.org/mailman/listinfo/gtkmm-list 


End of gtkmm-list Digest, Vol 12, Issue 19
******************************************

Attachment: startstop.cc
Description: Binary data

Attachment: startstop.glade
Description: Binary data

Attachment: b.cygwin
Description: Binary data

Attachment: b.linux
Description: Binary data



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