Re: 3.0 refactoring issues



On Sat, Oct 9, 2010 at 2:56 AM, Tristan Van Berkom
<tristanvb openismus com> wrote:
> Hi all,
>    So I'm spending some time trying to get Glade to at least build
> on 3.0...
>
> First thing, what is the recommended way of doing
>    gdk_window_set_back_pixmap (from xpm data...) ?
>
> Sure... I'm seeing gdk_window_set_background_pattern()..
> but no way to create the pattern from a pixbuf or such
> (maybe I missed something in the cairo apis...)

Our current migration guide can be found here:
http://library.gnome.org/devel/gtk/2.91/gtk-migrating-2-to-3.html
Sadly, it doesn't have specific information about background handling
yet. If there was a section on background handling, it would likely
involve
gdk_window_create_similar_surface or cairo_image_surface_create,
gdk_cairo_set_source_pixbuf,
cairo_pattern_create_for_surface

> But... please remind me... what is the policy in place that
> allows us to remove ->expose_event() completely ?

I guess the argument here is that after the first phase of
rendering-cleanup, all drawing had to be ported to cairo anyway, so
all an expose_event handler could really be doing is set up a cairo
context and then use cairo for rendering. From there, it is a rather
small
step to a draw handler that takes a ready-made cairo context as a parameter.

> And... please, please... if removing the expose completely
> is acceptable... can we then go ahead and remove ->size_request()
> as well ?

That is a fair question, I'd say, and we should consider it. One
question is how straightforward the conversion is.


Matthias


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