[PATCH weston v2] ivi-shell: add screen_remove_layer API

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Tue Feb 7 12:33:47 UTC 2017


Hi,

My bad I will fix it.

Best regards

Emre Ucan
Software Group I (ADITG/SW1)

Tel. +49 5121 49 6937

> -----Original Message-----
> From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> Sent: Montag, 6. Februar 2017 11:19
> To: Ucan, Emre (ADITG/SW1)
> Cc: wayland-devel at lists.freedesktop.org
> Subject: Re: [PATCH weston v2] ivi-shell: add screen_remove_layer API
> 
> On Mon, 30 Jan 2017 15:08:19 +0000
> "Ucan, Emre (ADITG/SW1)" <eucan at de.adit-jv.com> wrote:
> 
> > It is analagous to layer_remove_surface API.
> > The API removes a layer from the render order of
> > the screen.
> >
> > v2:
> > add the new vfunc at the end of
> > the ivi_layout_interface struct.
> >
> > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > ---
> >  ivi-shell/ivi-layout-export.h |   10 ++++++++++
> >  ivi-shell/ivi-layout.c        |   28 +++++++++++++++++++++++++++-
> >  2 files changed, 37 insertions(+), 1 deletion(-)
> >
> > diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
> > index 2317d6e..50649e7 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 to 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);
> > +
> > +	/**
> >  	 * \brief Sets render order of ivi_layers on a weston_output
> >  	 *
> >  	 * \return IVI_SUCCEEDED if the method call was successful
> 
> Hi,
> 
> nope, it's still in the middle here. It is the struct that matters, not
> the order in which its members are initialized.
> 
> In fact, the order of setting the fields below is irrelevant, so there
> you can pick any order that makes the most sense to you.
> 
> 
> Thanks,
> pq
> 
> > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
> > index b3edddd..21e4c1e 100644
> > --- a/ivi-shell/ivi-layout.c
> > +++ b/ivi-shell/ivi-layout.c
> > @@ -1663,6 +1663,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)
> > @@ -2083,7 +2104,7 @@ static struct ivi_layout_interface
> ivi_layout_interface = {
> >  	.layer_set_transition			=
> ivi_layout_layer_set_transition,
> >
> >  	/**
> > -	 * screen controller interfaces
> > +	 * screen controller interfaces part1
> >  	 */
> >  	.get_screens_under_layer	=
> ivi_layout_get_screens_under_layer,
> >  	.screen_add_layer		= ivi_layout_screen_add_layer,
> > @@ -2100,6 +2121,11 @@ static struct ivi_layout_interface
> ivi_layout_interface = {
> >  	 */
> >  	.surface_get_size		= ivi_layout_surface_get_size,
> >  	.surface_dump			= ivi_layout_surface_dump,
> > +
> > +	/**
> > +	 * screen controller interfaces part2
> > +	 */
> > +	.screen_remove_layer		= ivi_layout_screen_remove_layer,
> >  };
> >
> >  int



More information about the wayland-devel mailing list