Re: mouse button, and gtk_main().



On Sun, Dec 01, 2002 at 10:59:53PM +0000, Chris Garrett wrote:

1. Is there an event for a mouse button being down?  I dont mean the event 
for it being pressed - that only works immediately the button is first 
pressed, and does not pick up a button that has been held down for a
while.

That's not an event, it's a state. You can get the state with
gdk_window_get_pointer().

2. Is there a way of adding a function to the gtk_main() loop, so that it is 
executed at each iteration?

g_idle_add_full() at G_PRIORITY_DEFAULT probably does that. But it
also causes infinite iterations.

Maybe you could implement a custom GSource that did something like
that. If nothing else you could just do things in your prepare/check
functions instead of in the dispatch.

Havoc



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