Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
All right, I missed that!
Thank you!
Luca

2018-08-14 18:56 GMT+02:00 Emmanuele Bassi :

> Hi;
>
> On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list <
> gtk-app-devel-list@gnome.org> wrote:
>
>> Hi, does anyone know what meaning has the return value from expose event
>> handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea?
>>
>> When one should return TRUE, and when FALSE?
>>
>> I can't find any information in the reference manual
>>
>
> The "expose-event" signal in GTK+ 2.x comes from GtkWidget:
>
>   https://developer.gnome.org/gtk2/stable/GtkWidget.html#
> GtkWidget-expose-event
>
> The "draw" signal in GTK+ 3.x comes from GtkWidget:
>
>   https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-draw
>
> They have similar semantics as other signals in GTK+, like the
> input-related ones: returning TRUE means "I handled this signal emission,
> so do not propagate it further to other signal handlers"; returning FALSE
> means "I did not handle this signal emission, so propagate it further to
> other signal handlers".
>
> What "handling" means it depends on what you want to achieve.
>
> When using GTK+ 3.x, you're strongly encouraged to use the symbolic
> constants "GDK_EVENT_PROPAGATE" and "GDK_EVENT_STOP", instead, as they make
> the code easier to read.
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Emmanuele Bassi via gtk-app-devel-list
Hi;

On Tue, 14 Aug 2018 at 17:30, Luca Bacci via gtk-app-devel-list <
gtk-app-devel-list@gnome.org> wrote:

> Hi, does anyone know what meaning has the return value from expose event
> handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea?
>
> When one should return TRUE, and when FALSE?
>
> I can't find any information in the reference manual
>

The "expose-event" signal in GTK+ 2.x comes from GtkWidget:


https://developer.gnome.org/gtk2/stable/GtkWidget.html#GtkWidget-expose-event

The "draw" signal in GTK+ 3.x comes from GtkWidget:

  https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-draw

They have similar semantics as other signals in GTK+, like the
input-related ones: returning TRUE means "I handled this signal emission,
so do not propagate it further to other signal handlers"; returning FALSE
means "I did not handle this signal emission, so propagate it further to
other signal handlers".

What "handling" means it depends on what you want to achieve.

When using GTK+ 3.x, you're strongly encouraged to use the symbolic
constants "GDK_EVENT_PROPAGATE" and "GDK_EVENT_STOP", instead, as they make
the code easier to read.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


return value from expose event / draw signal of GtkDrawingArea

2018-08-14 Thread Luca Bacci via gtk-app-devel-list
Hi, does anyone know what meaning has the return value from expose event
handler (for gtk2) and draw signal (for gtk3) of GtkDrawingArea?

When one should return TRUE, and when FALSE?

I can't find any information in the reference manual

Thank you!
Luca
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list