struct ilm_control_context {
struct wayland_context main_ctx;
- struct wayland_context child_ctx;
int32_t valid;
uint32_t num_screen;
struct screen_context *ctx_scrn;
struct screen_context *next;
- wl_list_for_each_safe(ctx_scrn, next, &ctx->child_ctx.list_screen, link) {
+ wl_list_for_each_safe(ctx_scrn, next, &ctx->main_ctx.list_screen, link) {
if (ctx_scrn->output != NULL) {
wl_list_remove(&ctx_scrn->link);
wl_output_destroy(ctx_scrn->output);
free(ctx_scrn);
}
}
- if (ctx->child_ctx.controller != NULL) {
- ivi_controller_destroy(ctx->child_ctx.controller);
- ctx->child_ctx.controller = NULL;
+ if (ctx->main_ctx.controller != NULL) {
+ ivi_controller_destroy(ctx->main_ctx.controller);
+ ctx->main_ctx.controller = NULL;
}
- wl_display_flush(ctx->child_ctx.display);
+ wl_display_flush(ctx->main_ctx.display);
- if (ctx->child_ctx.display != NULL) {
- ctx->child_ctx.display = NULL;
- }
+ wl_event_queue_destroy(ctx->main_ctx.queue);
+ ctx->main_ctx.queue = NULL;
if (0 != pthread_mutex_destroy(&ctx->mutex)) {
fprintf(stderr, "failed to destroy pthread_mutex\n");
if (pOpacity != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, surfaceId);
if (ctx_surf) {
*pOpacity = ctx_surf->prop.opacity;
returnValue = ILM_SUCCESS;
if (pPosition != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, surfaceId);
if (ctx_surf) {
*pPosition = ctx_surf->prop.destX;
*(pPosition + 1) = ctx_surf->prop.destY;
if (pOrientation != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, surfaceId);
if (ctx_surf) {
*pOrientation = ctx_surf->prop.orientation;
returnValue = ILM_SUCCESS;
if (pPixelformat != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, surfaceId);
if (ctx_surf) {
*pPixelformat = ctx_surf->prop.pixelformat;
returnValue = ILM_SUCCESS;
struct layer_context *ctx_layer = NULL;
ctx_layer = (struct layer_context*)wayland_controller_get_layer_context(
- &ctx->child_ctx, (uint32_t)layer);
+ &ctx->main_ctx, (uint32_t)layer);
if (ctx_layer == NULL) {
returnValue = ILM_ERROR_INVALID_ARGUMENTS;
} else {
struct surface_context *ctx_surf = NULL;
ctx_surf = (struct surface_context*)get_surface_context(
- &ctx->child_ctx, (uint32_t)surface);
+ &ctx->main_ctx, (uint32_t)surface);
if (ctx_surf == NULL) {
returnValue = ILM_ERROR_INVALID_ARGUMENTS;
} else {
if (pSurfaceProperties != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, (uint32_t)surfaceID);
+ ctx_surf = get_surface_context(&ctx->main_ctx, (uint32_t)surfaceID);
if (ctx_surf != NULL) {
*pSurfaceProperties = ctx_surf->prop;
if (pDimension != NULL) {
struct surface_context *ctx_surf = NULL;
- ctx_surf = get_surface_context(&ctx->child_ctx, (uint32_t)surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, (uint32_t)surfaceId);
if (ctx_surf != NULL) {
*pDimension = (t_ilm_uint)ctx_surf->prop.destWidth;
*(pDimension + 1) = (t_ilm_uint)ctx_surf->prop.destHeight;
struct surface_context *ctx_surf = NULL;
if (pVisibility != NULL) {
- ctx_surf = get_surface_context(&ctx->child_ctx, (uint32_t)surfaceId);
+ ctx_surf = get_surface_context(&ctx->main_ctx, (uint32_t)surfaceId);
if (ctx_surf != NULL) {
*pVisibility = (t_ilm_bool)ctx_surf->prop.visibility;
returnValue = ILM_SUCCESS;