Re: How to trap mouse motion, mouse up, and wheel events?

2006-03-31 Thread Michael L Torrie
On Fri, 2006-03-31 at 16:38 -0500, Dov Kruger wrote: > I do not see examples of how to use g_signal_connect and would > appreciate some help, perhaps an example? Use it the same way you used the gtk_signal_connect calls. Just replace one with the other. > > Right now, the code does not trap m

How to trap mouse motion, mouse up, and wheel events?

2006-03-31 Thread Dov Kruger
I posted yesterday, but perhaps I was not clear. I have code that works trapping mouse and key presses. It registers for callbacks using the following line: gtk_widget_set_events(GTK_WIDGET(glarea),GDK_ALL_EVENTS_MASK); The following signal connect requests are made: gtk_signal_connect (GTK_

Re: acces to a member of the principal widget

2006-03-31 Thread Olexiy Avramchenko
> Ok I understand I can give more than one argument to a callback function. > But my question remains, how can I access to my list. The most used ways: 1. Allocate the structure and pass it to signal's callback, in your case: typedef struct _MyCallbackArgs { GtkWidget *window; GtkWidget *d

Re: run time issue- on gtk_widget_show()- Xlib:unexpected async reply

2006-03-31 Thread Gus Koppel
"shibu alampatta" wrote: > during runtime I'm getting the message > > Xlib:unexpected async reply (sequence 0xbe8) > > while trying to show a window. > > The senario is , In my multi window application,from a thread i'm calling a > function, which contains the lines as below > > >

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Gus Koppel
Gus Koppel wrote: > Vladimir wrote: > > > There are two uses of GTK+ in non-main threads: > > 1. error reporting via message boxes and > > 2. adding text (which comes from network) to GUI windows. > > Btw, if you don't use modal message box dialogs then there is absolutely > no need to use mult

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Gus Koppel
Vladimir wrote: > There are two uses of GTK+ in non-main threads: > 1. error reporting via message boxes and > 2. adding text (which comes from network) to GUI windows. Btw, if you don't use modal message box dialogs then there is absolutely no need to use multiple threads (aka one to receive, t

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Gus Koppel
Vladimir wrote: > Gus Koppel wrote: > > > There shouldn't be any additional buffer copying required just because > > dealing with it moves from one thread to another. You know, all threads > > have the same access to all program data. > > Yes, but in my case buffers are reused to recv next packe

run time issue- on gtk_widget_show()- Xlib:unexpected async reply

2006-03-31 Thread shibu alampatta
during runtime I'm getting the message Xlib:unexpected async reply (sequence 0xbe8) while trying to show a window. The senario is , In my multi window application,from a thread i'm calling a function, which contains the lines as below GtkWidget *mywindow; . mywindow=c

Re: callback and menu item

2006-03-31 Thread zz
On Thursday 30 March 2006 14:49, Jerome Le Saux wrote: > 2006/3/30, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > On Thursday 30 March 2006 12:15, Jerome Le Saux wrote: > > If you want to do this at program startup you have to call > > OnOpenDskFile by yourself in main() > > > > Ciao, > > Tito >

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Vladimir
Gus Koppel wrote: > There shouldn't be any additional buffer copying required just because > dealing with it moves from one thread to another. You know, all threads > have the same access to all program data. Yes, but in my case buffers are reused to recv next packets from network, so copying (or

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Gus Koppel
Vladimir wrote: > Thanks a lot for comprehensive explanations. > > There are two uses of GTK+ in non-main threads: > 1. error reporting via message boxes and > 2. adding text (which comes from network) to GUI windows. > > I can do both of it in main thread but this involves copying text to > dy

Re: gdk_threads_leave in gtk callback ?

2006-03-31 Thread Vladimir
Thanks a lot for comprehensive explanations. There are two uses of GTK+ in non-main threads: 1. error reporting via message boxes and 2. adding text (which comes from network) to GUI windows. I can do both of it in main thread but this involves copying text to dynamically allocated buffers. BTW