Re: New GtkWidget And Expose (and other) Event



On Mon, 13 Dec 2004 19:46:29 +0100, pax <pxmail o2 pl> wrote:
Hello.
I have a problem with my new gtk widget (it's gtk xine widget). I'm
creating a new widget based on GtkWidget, and then I'm connecting a
signal to it : g_signal_connect (GTK_OBJECT (widget), "expose-event",
G_CALLBACK (rf_media_xine_expose),NULL);

But my widget don't revice any events :/
How to revice events (expose, mouse move etc.) for new written widget
using GdkEvent from gtk_main_event_loop (or something like that ?)

Here is a full source of a widget:

Hmmm,
   not the full source, I'm missing "rf_media_xine_get_type ()"...
and potentialy rf_media_xine_class_init()

Basicly, if your widget is "GTK_NO_WINDOW()", then it doesn't need
a rf_media_xine_realize(), otherwise you need to implement the realize
method yourself, events come from the GdkWindow (GTK_WIDGET(widget)->window)
and are either propagated through the GtkContainerClass if the widget is
GTK_NO_WINDOW, or is recieved directly by the GtkWidget in question.

Cheers,
                                              -Tristan



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