Re: What should be used?

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

 



Hi;

On 29 July 2015 at 12:51, Igor Korot <ikorot01@xxxxxxxxx> wrote:
> Hi, ALL,
> The documentation says:
>
> [quote]
> gtk_widget_set_double_buffered has been deprecated since version 3.14
> and should not be used in newly-written code.
> This function does not work under non-X11 backends or with non-native
> windows. It should not be used in newly written code.
> [/quote]
>
> However it does not say what should be used instead.

Nothing should be used instead.

All widgets inside GTK are double-buffered, and all windowing systems
are double buffering the drawing surfaces used to present things on
the screen.

The only reason why somebody would remove double buffering is when
dealing with native surfaces directly, for instance when using OpenGL
on X11; this not only is generally broken, but also breaks the drawing
internals of GTK unless you constrain your requirements. Since GTK+
3.16, OpenGL is natively supported by GTK in a way that works with the
internal drawing model, so it's not necessary to use any other
external library or external code to use OpenGL — thus
gtk_widget_set_double_buffered() should not be used.

If you have legacy code that requires disabling double buffering, you
should probably invest some time into porting it to a proper solution
integrated with the GTK drawing model; in the meantime, you can still
call set_double_buffered() in your code. The API and its behaviour
won't go away until GTK+ 4.0.

Ciao,
 Emmanuele.

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




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux