> > > > > > > In short, instead of >> > > > > > >> > > > > > bar = wl_foo_get_bar(foo); >> > > > > > wl_proxy_set_queue((struct wl_proxy *) bar, queue); >> > > > > > wl_bar_add_listener(bar, ...); >> > > > > > >> > > > > > with this RFC a client does >> > > > > > >> > > > > > foo_wrapper = wl_proxy_create_wrapper((struct wl_proxy >> *) >> > > foo); >> > > > > > wl_proxy_set_queue((struct wl_proxy *) foo_wrapper, >> queue); >> > > > > > >> > > > > > bar = wl_foo_get(foo_wrapper); >> > > > > > wl_bar_add_listener(bar, ...); >> > > > > > >> > > > > > and the with other idea that is implemented anywhere yet AFAIK >> > > > > > >> > > > > > bar = wl_foo_get_bar_with_queue(foo, queue) >> > > > > > wl_bar_add_listener(bar, ...); >> >> > > > wl_proxy_create_full(..., queue, listener) >> > I would worry that there will be more things that can be done to a proxy besides setting it's queue and listener. So instead of adding lots of arguments to the get_bar wrapper, allow the proxy to be created and everything set up *before* the server object is created:
bar = wl_new_bar(); wl_proxy_set_queue((struct wl_proxy*)bar, queue); // default queue if this not done wl_bar_add_listener(bar, ...); wl_foo_get_bar(foo, bar); Note the last function will have to be renamed to avoid a collision in C but I don't have any good ideas what to name it.
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel