Re: Emit signal




Ankit Mohan <ankit@mail.com> writes: 
> The changeit function as called whenever the scale value is changed. It
> make some changes to the (gpointer)im sent to it. I want this to be
> reflected on the screen. How do I force the "expose_event" of "darea" to
> occur while still inside the changeit function. This is prettu easy
> using qt, as it involves emiting the corresponding signal, which will
> fall in the correct slot automatically.
> 
> Is my approach correct? Or am i fundamentally wrong somewhere?
> 

Why do you want the expose event to occur while still inside changeit?
Your expose handler is required to work properly when you get exposes
from outside changeit anyway, so it's no extra work.

If you just want the expose to happen period, and don't care if it's
while changeit is on the stack, you can call gtk_widget_queue_draw()
on the drawing area for the changed area; this will be more efficient
than doing things immediately.

Havoc



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