Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
On Sun, 2016-01-31 at 09:19 -0500, Robert Schroll wrote: > My first thought would have been to trigger that callback via a > g_idle_add() [1] call Thanks for your responses. I think the idea of using "call gtk_main_iteration() in a while loop with gtk_events_pending()" is OK for now. Later I may

Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Robert Schroll
On Sun, Jan 31, 2016 at 8:10 AM, Stefan Salewski wrote: Do you know an not too complicated example where code in a callback is called which may block for about one second? In the long term I may switch to a asyncroneously design, but currently I have no idea how to do that best. Have you a hint

Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
On Sun, 2016-01-31 at 11:41 +, Chris Vine wrote: > On Sun, 31 Jan 2016 10:45:18 +0100 > Stefan Salewski wrote: > > https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-iteration > > > > I have some problems to understand and correctly use this functi

Re: gtk-main-iteration -- use and understanding

2016-01-31 Thread Chris Vine
On Sun, 31 Jan 2016 10:45:18 +0100 Stefan Salewski wrote: > https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-iteration > > I have some problems to understand and correctly use this function. > > Last week I wrote a toy chess game from scratch in Nim language

gtk-main-iteration -- use and understanding

2016-01-31 Thread Stefan Salewski
https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-iteration I have some problems to understand and correctly use this function. Last week I wrote a toy chess game from scratch in Nim language, just to get some more experience with Nim and to have one more test and example for my

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-09-02 Thread Michael Torrie
http://irrepupavel.com/documents/gtk/gtk_threads.html ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-09-02 Thread Michael Torrie
Cristi Cobzarenco wrote: > Those are the options that I am using, but it doesn't work for me. I really > appreciate the answer, I forgot to say, however, that I'm using MinGW under > MS Windows. I now remember seeing somewhere that GTK multithreading only > works on the X11 backend, so that might b

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
t;> >> int main(int a_argc,char **a_argv) >> { >> GThread *l_th; >> >>g_thread_init(NULL); >>gdk_threads_init(); >>gtk_init(&a_argc,&a_argv); >>l_th = g_thread_create(_gtkthread,NULL,TRUE,NULL); >

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Jorge Opaso Pazos
d_join(l_th); return 0; } Atentamente, Jorge Opaso Pazos AUTOLogic LTDA El 29-08-2009, a las 7:35, Cristi Cobzarenco escribió: Hi, I've been using GTK for a pretty long time but I've never used threads with it and I'm not able to properly run the GTK main loop in a

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
>l_th = g_thread_create(_gtkthread,NULL,TRUE,NULL); >g_thread_join(l_th); > >return 0; > } > > > Atentamente, > > Jorge Opaso Pazos > AUTOLogic LTDA > > > > > El 29-08-2009, a las 7:35, Cristi Cobzarenco escribió: > >

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Jorge Opaso Pazos
ió: Hi, I've been using GTK for a pretty long time but I've never used threads with it and I'm not able to properly run the GTK main loop in a separate thread. More to the point if I create a window, for example, in a thread other than the GTK one, it becomes unresponsive. Oth

Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
Hi, I've been using GTK for a pretty long time but I've never used threads with it and I'm not able to properly run the GTK main loop in a separate thread.More to the point if I create a window, for example, in a thread other than the GTK one, it becomes unresponsive. Other GTK ca

Re: Synchronize GTK main loop with a Motif window

2007-03-19 Thread Paul Davis
On Mon, 2007-03-19 at 09:46 -0700, Andrea Maiolo wrote: > Hello Folks, > I'm new to GTK programing so be nice with me if I'm asking something > silly ;-) > > Is there a way to synchronize a Motif window with the GTK main look the > same way I could do

Synchronize GTK main loop with a Motif window

2007-03-19 Thread Andrea Maiolo
Hello Folks, I'm new to GTK programing so be nice with me if I'm asking something silly ;-) Is there a way to synchronize a Motif window with the GTK main look the same way I could do in Qt using QMotif ( http://doc.trolltech.com/3.3/qmotif.html )? I have a couple of new thick b

Re: GTK Main Re-execution or Looping

2007-02-26 Thread Richard Boaz
the following may be helpful: http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event- Loop.html#g-timeout-add richard On Feb 22, 2007, at 11:23 PM, Alex Shankle wrote: Hello, I have an application I am building to com with a PLC and then display the PLC info in a Glade built w

GTK Main Re-execution or Looping

2007-02-26 Thread Alex Shankle
Hello, I have an application I am building to com with a PLC and then display the PLC info in a Glade built window. I have it working, except now I want to query the PLC every 5 seconds or so and re-display the PLC info as the PLC state is changing. Is there a GTK function that will allow me to

Re: Nesting GTK main loops

2007-02-20 Thread zentara
On Tue, 20 Feb 2007 19:52:53 +1100 Andrew Cowie <[EMAIL PROTECTED]> wrote: >Can anyone suggest _why_ you'd ever want to nest GTK main loops? > > >Since inner main loops don't prevent things from being re-entered in >what is, in effect, a recursive way, the abil

Nesting GTK main loops

2007-02-20 Thread Andrew Cowie
Can anyone suggest _why_ you'd ever want to nest GTK main loops? I know that GtkDialogs do it as a mechanism to make getting the "result" of the dialog back in a programmatic way, but I also gather that they had to go to some trouble to make that behave. I worked up some sma

gtk-main

2001-06-13 Thread Florian Scandella
Hi ! Is there a possibility to close the resources allocatet by gtk-main, without exiting the program ( gtk-exit ) ? It's not much ( 104 bytes ) but i hate it to have memory leaks in my programs :-) Another question : Can i call gtk_init twice ? thanx

Re: gtk main and slemr main

2000-10-16 Thread Havoc Pennington
ve a busy loop constantly polling to see if GTK has events, since the middleware loop couldn't block on the file descriptors being observed by the GTK main loop. Havoc ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list

Re: gtk main and slemr main

2000-10-15 Thread Guy Harris
On Fri, Oct 13, 2000 at 03:57:31PM -0400, Matt Eisemann wrote: > so am i out of luck. It seems pretty clear that middleware is based upon > the 'X Toolkit' environment and gtk is not. Since they both have main > event loops and I need to use them both in my application, what would be > the be

Re: gtk main and slemr main

2000-10-13 Thread Eric Monsler
Matt Eisemann wrote: > (snip) > To answer Havoc, I do not think the middleware main loop can be a slave to > GTK+ main loop, but I am looking to this possibility but I don't think > there can be any interrupts for middleware's main loop. I have started > looking at th

Re: gtk main and slemr main

2000-10-13 Thread Guy Harris
On Fri, Oct 13, 2000 at 01:54:31PM -0400, Matt Eisemann wrote: > To add one other question, I also want to get the value of XtAppContext if > I can since I need to pass this value into a middleware function that we > use. Can these values be obtained or not. No, because GTK+ doesn't use XtAppC

Re: gtk main and slemr main

2000-10-13 Thread Guy Harris
On Fri, Oct 13, 2000 at 12:04:43PM -0400, Matt Eisemann wrote: > regarding this issue, our 'middleware has specific functions for x window > based applications where we use it for motif > and in the application one is expected to call XtVaAppInitialize - which I > guess initializes the x window

RE: gtk main and slemr main

2000-10-13 Thread Matt Eisemann
'; '[EMAIL PROTECTED]' Subject:RE: gtk main and slemr main regarding this issue, our 'middleware has specific functions for x window based applications where we use it for motif and in the application one is expected to call XtVaAppInitialize - which I guess initializes

RE: gtk main and slemr main

2000-10-13 Thread Matt Eisemann
stuff. Is x - window based application calls like the one above supported by GTK+ or not? To answer Havoc, I do not think the middleware main loop can be a slave to GTK+ main loop, but I am looking to this possibility but I don't think there can be any interrupts for middleware's mai

Re: gtk main and slemr main

2000-10-08 Thread Havoc Pennington
aying is that you need to make the middleware main loop a slave to the GTK main loop. Many libraries with main loops provide hooks that would allow this; essentially the hooks you need are a) the file descriptors middleware is selecting on and b) a function middleware_process_events() that's c

RE: gtk main and slemr main

2000-10-07 Thread Matt Eisemann
t Eisemann Cc: Massato Dom (SMTP); [EMAIL PROTECTED]; Murphy Rodney (SMTP) Subject:Re: gtk main and slemr main Every CORBA implementation I'm aware of provides the ability to use an external event loop for getting notification when file descriptors that are ready for reading. Integrati

Re: gtk main and slemr main

2000-10-06 Thread otaylor
Every CORBA implementation I'm aware of provides the ability to use an external event loop for getting notification when file descriptors that are ready for reading. Integrating this type of thing with GTK+ is easy - when the library requests notification on a file descriptor, you use g_io_add_

gtk main and slemr main

2000-10-06 Thread Matt Eisemann
There may be a problem with using gtk and middleware together in the same application. I was talking with Tom Phelan and he said that I can't have two main loops even though they are both waiting for different events to occur. He mentioned some potenntially tricky scenarios. One, that they