Re: New GtkWidget And Expose (and other) Event
- From: pax <pxmail o2 pl>
- To: gtk-app-devel-list gnome org
- Subject: Re: New GtkWidget And Expose (and other) Event
- Date: Tue, 14 Dec 2004 10:39:17 +0100
Dnia 13-12-2004, pon o godzinie 13:56 -0500, Tristan Van Berkom
napisał(a):
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
svn checkout svn://svn.berlios.de/rafesia <- full source
widget is in ./src/plugins/rf-media-xine/
, I'm missing "rf_media_xine_get_type ()"...
and potentialy rf_media_xine_class_init()
I don't creat it. I use my widget like GtkWidget.
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.
I creat my widget with GdkWindow becouse it's needed by xine, but
widget->window is NULL.
I just don't know how to revice events fro my widget in my program
without using extra thread (gxine and totem uses Xlib and new thread to
revice events, I want to use GDK and no new thread becouse I thing gtk
should pass events to my widget).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]