Re: What are map_event and unmap_event?



> --- Paul Davis <paul linuxaudiosystems com> wrote: > >So, say in Gimp
>for example, when does the drawing area widget emit
>> the
>> >map event?
>> 
>> whenever the window is made visible on the screen after it was
>> created
>> or unmapped.
>> 
>> by contrast, expose_event is emitted for any necessary redraw.
>> 
>> you generally don't need map_event - its useful for obscure hacks and
>> not a lot else.
>> 
>> --p 
>
>So you are saying as long as the drawing_area_widget is on the screen,
>it will emit the map_event? 

no. it is emitted once per mapping-onto-screen. this
mapping-onto-screen occurs after it has been realized+shown, and then
might occur again if it is hidden and then shown again.

>So say if I want to display animation with the drawing_area_widget, I
>don't need to set the gtk_idle function to the rendering function.
>Instead I just create the rendering function as the callback function
>for the map_event, since map_event is constantly being emitted by the
>widget as long as it's visible. Correct?

no. you would need to use a timer function or an idle function or both
depending on how you want to approach it. map_event has nothing to do
with this.

--p



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