(no subject)



Thanks Leandro


------------------------------------------------
On Fri, 2004-11-26 at 23:39 +0100, Yolan Chériaux wrote:
I have seen the signal 'button_press_event' of the gtkevent,
and the function 'gtk_widget_move(...)';


GtkImage can't receive mouse events, so you'll need to pack it inside a
GtkEventBox. Connect a function to the "button_press_event" signal that
will add a timeout (see g_timeout_add()) function and set a, say,
"button_pressed" flag. Connect the "button_release_event" to another
function that will reset that flag.

The timeout function will keep moving your window while the
"button_pressed" flag is set.

You can use GDK's functions to get the mouse coords.

To see this implemented (or at least something similar), please read the
gkrellm and xmms source code.


  Leandro






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