wl_fixed_t opacity);
/**
- * \brief Get the opacity of a ivi_surface.
- *
- * \return opacity if the method call was successful
- * \return wl_fixed_from_double(0.0) if the method call was failed
- */
- wl_fixed_t (*surface_get_opacity)(struct ivi_layout_surface *ivisurf);
-
- /**
* \brief Set the area of a ivi_surface which should be used for the rendering.
*
* \return IVI_SUCCEEDED if the method call was successful
int32_t
ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
wl_fixed_t opacity);
-wl_fixed_t
-ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility);
{
struct ivi_layout_transition *transition;
bool is_visible = surface->prop.visibility;
- wl_fixed_t dest_alpha = ivi_layout_surface_get_opacity(surface);
+ wl_fixed_t dest_alpha = surface->prop.opacity;
struct store_alpha *user_data = NULL;
wl_fixed_t start_alpha = 0.0;
struct fade_view_data *data = NULL;
IVI_LAYOUT_TRANSITION_VIEW_FADE,
surface);
if (transition) {
- start_alpha = ivi_layout_surface_get_opacity(surface);
+ start_alpha = surface->prop.opacity;
user_data = transition->user_data;
data = transition->private_data;
uint32_t duration)
{
struct ivi_layout_transition *transition;
- wl_fixed_t start_alpha = ivi_layout_surface_get_opacity(surface);
+ wl_fixed_t start_alpha = surface->prop.opacity;
struct store_alpha* user_data = NULL;
struct fade_view_data* data = NULL;
return IVI_SUCCEEDED;
}
-wl_fixed_t
-ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf)
-{
- if (ivisurf == NULL) {
- weston_log("ivi_layout_surface_get_opacity: invalid argument\n");
- return wl_fixed_from_double(0.0);
- }
-
- return ivisurf->prop.opacity;
-}
-
int32_t
ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
int32_t x, int32_t y,
.get_surfaces_on_layer = ivi_layout_get_surfaces_on_layer,
.surface_set_visibility = ivi_layout_surface_set_visibility,
.surface_set_opacity = ivi_layout_surface_set_opacity,
- .surface_get_opacity = ivi_layout_surface_get_opacity,
.surface_set_source_rectangle = ivi_layout_surface_set_source_rectangle,
.surface_set_destination_rectangle = ivi_layout_surface_set_destination_rectangle,
.surface_set_position = ivi_layout_surface_set_position,
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
int32_t ret;
- wl_fixed_t opacity;
const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf);
- runner_assert(lyt->surface_get_opacity(ivisurf) ==
- wl_fixed_from_double(1.0));
+ prop = lyt->get_properties_of_surface(ivisurf);
+ runner_assert(prop->opacity == wl_fixed_from_double(1.0));
ret = lyt->surface_set_opacity(ivisurf, wl_fixed_from_double(0.5));
runner_assert(ret == IVI_SUCCEEDED);
- runner_assert(lyt->surface_get_opacity(ivisurf) ==
- wl_fixed_from_double(1.0));
+ runner_assert(prop->opacity == wl_fixed_from_double(1.0));
lyt->commit_changes();
- opacity = lyt->surface_get_opacity(ivisurf);
- runner_assert(opacity == wl_fixed_from_double(0.5));
-
- prop = lyt->get_properties_of_surface(ivisurf);
runner_assert(prop->opacity == wl_fixed_from_double(0.5));
}
{
const struct ivi_layout_interface *lyt = ctx->layout_interface;
struct ivi_layout_surface *ivisurf;
- wl_fixed_t opacity;
+ const struct ivi_layout_surface_properties *prop;
ivisurf = lyt->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
runner_assert(ivisurf != NULL);
lyt->commit_changes();
- opacity = lyt->surface_get_opacity(ivisurf);
- runner_assert(opacity == wl_fixed_from_double(0.3));
+ prop = lyt->get_properties_of_surface(ivisurf);
+ runner_assert(prop->opacity == wl_fixed_from_double(0.3));
runner_assert(lyt->surface_set_opacity(
ivisurf, wl_fixed_from_double(1.1)) == IVI_FAILED);
lyt->commit_changes();
- opacity = lyt->surface_get_opacity(ivisurf);
- runner_assert(opacity == wl_fixed_from_double(0.3));
+ runner_assert(prop->opacity == wl_fixed_from_double(0.3));
runner_assert(lyt->surface_set_opacity(
NULL, wl_fixed_from_double(0.5)) == IVI_FAILED);
lyt->commit_changes();
-
- opacity = lyt->surface_get_opacity(NULL);
- runner_assert(opacity == wl_fixed_from_double(0.0));
}
RUNNER_TEST(ivi_layout_commit_changes)