Hi Pekka,

You are right. I will send second patch and add the function to end of the 
function list.

It is stated in ivi-shell/README that ivi_layout interface is stable. But I 
think should not be stable yet. Because we are missing some important features 
(e.g. output hotplugging) or some existing feautures are IMO unnecessary (e.g. 
orientation).
Furthermore, libweston is changing quite fast. It gets new features in every 
release. If we want to use these new features in ivi-shell, we have to add new 
APIs time to time into ivi_layout interface.

I want to implement a shared library for ivi-shell (libweston-ivi) similar to 
weston-desktop library, when I have time.
Then, it would be easier to handle ABI breakages. Because it will be parallely 
installable.
Another advantage is that adding an API would be just a minor version bump, 
because it would be backwards compatible.

Best regards

Emre Ucan
Software Group I (ADITG/SW1)

Tel. +49 5121 49 6937

> -----Original Message-----
> From: Pekka Paalanen [mailto:[email protected]]
> Sent: Freitag, 27. Januar 2017 16:45
> To: Ucan, Emre (ADITG/SW1)
> Cc: [email protected]
> Subject: Re: [PATCH weston] ivi-shell: add screen_remove_layer API
> 
> On Wed, 18 Jan 2017 16:08:16 +0000
> "Ucan, Emre (ADITG/SW1)" <[email protected]> wrote:
> 
> > It is analagous to layer_remove_surface API.
> > The API removes a layer from the render order of
> > the screen.
> >
> > Signed-off-by: Emre Ucan <[email protected]>
> > ---
> >  ivi-shell/ivi-layout-export.h |   10 ++++++++++
> >  ivi-shell/ivi-layout.c        |   22 ++++++++++++++++++++++
> >  2 files changed, 32 insertions(+)
> >
> > diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
> > index 2317d6e..ea3bf37 100644
> > --- a/ivi-shell/ivi-layout-export.h
> > +++ b/ivi-shell/ivi-layout-export.h
> > @@ -541,6 +541,16 @@ struct ivi_layout_interface {
> >                                 struct ivi_layout_layer *addlayer);
> >
> >     /**
> > +    * \brief Remove a ivi_layer from a weston_output which is currently
> managed
> > +    * by the service
> > +    *
> > +    * \return IVI_SUCCEEDED if the method call was successful
> > +    * \return IVI_FAILED if the method call was failed
> > +    */
> > +   int32_t (*screen_remove_layer)(struct weston_output *output,
> > +                               struct ivi_layout_layer *removelayer);
> > +
> 
> Hi Emre,
> 
> the patch looks good otherwise, except the new vfunc should go to the
> end of the struct by the ABI rules.
> 
> See hmi_controller.c:controller_module_init() for the check we do. I
> thought we had the ABI rules documented somewhere, but I can't seem to
> find it.
> 
> Otherwise this is an ABI break and in principle we should not merge it
> during the major feature freeze if ever.
> 
> 
> Thanks,
> pq
> 
> > +   /**
> >      * \brief Sets render order of ivi_layers on a weston_output
> >      *
> >      * \return IVI_SUCCEEDED if the method call was successful
> > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
> > index 60d05c4..9c1865a 100644
> > --- a/ivi-shell/ivi-layout.c
> > +++ b/ivi-shell/ivi-layout.c
> > @@ -1660,6 +1660,27 @@ ivi_layout_screen_add_layer(struct
> weston_output *output,
> >  }
> >
> >  static int32_t
> > +ivi_layout_screen_remove_layer(struct weston_output *output,
> > +                       struct ivi_layout_layer *removelayer)
> > +{
> > +   struct ivi_layout_screen *iviscrn;
> > +
> > +   if (output == NULL || removelayer == NULL) {
> > +           weston_log("ivi_layout_screen_remove_layer: invalid
> argument\n");
> > +           return IVI_FAILED;
> > +   }
> > +
> > +   iviscrn = get_screen_from_output(output);
> > +
> > +   wl_list_remove(&removelayer->pending.link);
> > +   wl_list_init(&removelayer->pending.link);
> > +
> > +   iviscrn->order.dirty = 1;
> > +
> > +   return IVI_SUCCEEDED;
> > +}
> > +
> > +static int32_t
> >  ivi_layout_screen_set_render_order(struct weston_output *output,
> >                                struct ivi_layout_layer **pLayer,
> >                                const int32_t number)
> > @@ -2084,6 +2105,7 @@ static struct ivi_layout_interface
> ivi_layout_interface = {
> >      */
> >     .get_screens_under_layer        =
> ivi_layout_get_screens_under_layer,
> >     .screen_add_layer               = ivi_layout_screen_add_layer,
> > +   .screen_remove_layer            = ivi_layout_screen_remove_layer,
> >     .screen_set_render_order        =
> ivi_layout_screen_set_render_order,
> >
> >     /**

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to