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

---:how to enable new signal for a widget:---



hi tim thanx for ur reply.

basically i have drawing area. where i need to draw
some pixels when some data comes in serial port.there
is a thread which reads the serial port,when data
comes it needs to inform gtk application which has to
display serial port data on to drawing area.

when focus comes to drawing area  thread starts
reading  serial port. For every data in the serial
port thread generates a signal, which is caught by the
drawing area and displays the data in the drawing
area.it has to display pixels (data) simultaneously
when some data comes in serial port.

problem is drawing area is not getting exposed
(refreshed) when i write a pixel every time on it.pls
give me some ideas.

 i saw the scrible codes ,he writes pixels accroding
to mouse movements, same thing i need here also,but
for the serial port data.
              -manu
 

--- Tim Müller <zen18864@zen.co.uk> wrote: > On
Thursday 11 March 2004 14:45, manu aradhya wrote:
> 
> > I a defined a new signal using gtk_signal_new()
> > then i am emiting it by
> > gtk_signal_emit_by_name(GTK_OBJECT(drawingarea1),
> > "my_signal", NULL);
> >
> > before that i think i need to call
> >
> > gtk_widget_set_events(drawingarea1,
> GDK_EXPOSURE_MASK
> >
> > | GDK_LEAVE_NOTIFY_MASK |
> >
> >            GDK_POINTER_MOTION_MASK |
> > GDK_POINTER_MOTION_HINT_MASK);
> >
> > how to set the mask for my own defined signal so
> that
> > widget receives the signal.any ideas.
> 
> I think you might want to have a look at the
> difference between events and 
> signals (see for example:
> http://www.gtk.org/faq/#AEN556 ).
> 
> Also, you should be using GObject functions instead
> of the deprecated 
> GtkObject functions (g_signal_new instead of
> gtk_signal_new etc.) if you're 
> using Gtk+-2.x.
> 
> You'll probably get better responses if you give
> some more details of what are 
> you trying to do exactly.
> 
> Cheers
>  -Tim
> 
> 
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
>
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list 

________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html



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