From d2828aac27fc3abe9889bdd8b921a9d026f7a4c9 Mon Sep 17 00:00:00 2001 From: Janos Kovacs Date: Thu, 27 Nov 2014 19:40:26 +0200 Subject: [PATCH] downstream: fix camel case notation and function signature changes Change-Id: Id7dd17e8c23768da5ff58b45e371792b8bd8407b --- weston-ivi-shell/src/ivi-controller.c | 223 ++++++++++++++++--------------- weston-ivi-shell/src/ivi-layout-export.h | 27 ++-- 2 files changed, 129 insertions(+), 121 deletions(-) diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c index 12f42eb..fdda183 100755 --- a/weston-ivi-shell/src/ivi-controller.c +++ b/weston-ivi-shell/src/ivi-controller.c @@ -163,6 +163,11 @@ struct ivishell { }; static void surface_event_remove(struct ivi_layout_surface *, void *); +static struct ivi_layout_layer_properties no_layer_props; +static struct ivi_layout_surface_properties no_surface_props; + + + static void destroy_ivicontroller_surface(struct wl_resource *resource) { @@ -206,7 +211,7 @@ destroy_ivicontroller_layer(struct wl_resource *resource) struct ivicontroller_layer *next = NULL; uint32_t id_layer = 0; - id_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer); + id_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer); wl_list_for_each_safe(ctrllayer, next, &shell->list_controller_layer, link) { @@ -226,7 +231,7 @@ destroy_ivicontroller_layer(struct wl_resource *resource) if ((ivilayer->layout_layer != NULL) && (ivilayer->controller_layer_count == 0) && (ivilayer->layer_canbe_removed == 1)) { - ivi_layout_layerRemove(ivilayer->layout_layer); + ivi_layout_layer_remove(ivilayer->layout_layer); } } @@ -275,7 +280,7 @@ get_surface(struct wl_list *list_surf, uint32_t id_surface) uint32_t ivisurf_id = 0; wl_list_for_each(ivisurf, list_surf, link) { - ivisurf_id = ivi_layout_getIdOfSurface(ivisurf->layout_surface); + ivisurf_id = ivi_layout_get_id_of_surface(ivisurf->layout_surface); if (ivisurf_id == id_surface) { return ivisurf; } @@ -291,7 +296,7 @@ get_layer(struct wl_list *list_layer, uint32_t id_layer) uint32_t ivilayer_id = 0; wl_list_for_each(ivilayer, list_layer, link) { - ivilayer_id = ivi_layout_getIdOfLayer(ivilayer->layout_layer); + ivilayer_id = ivi_layout_get_id_of_layer(ivilayer->layout_layer); if (ivilayer_id == id_layer) { return ivilayer; } @@ -365,8 +370,8 @@ send_surface_add_event(struct ivisurface *ivisurf, struct wl_client *surface_client = wl_resource_get_client(resource); int found = 0; - ans = ivi_layout_getLayersUnderSurface(ivisurf->layout_surface, - &length, &pArray); + ans = ivi_layout_get_layers_under_surface(ivisurf->layout_surface, + &length, &pArray); if (0 != ans) { weston_log("failed to get layers at send_surface_add_event\n"); return; @@ -393,7 +398,7 @@ send_surface_add_event(struct ivisurface *ivisurf, } id_layout_layer = - ivi_layout_getIdOfLayer(ivilayer->layout_layer); + ivi_layout_get_id_of_layer(ivilayer->layout_layer); wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) { if (id_layout_layer != ctrllayer->id_layer) { continue; @@ -416,7 +421,7 @@ send_surface_add_event(struct ivisurface *ivisurf, static void send_surface_event(struct wl_resource *resource, struct ivisurface *ivisurf, - struct ivi_layout_SurfaceProperties *prop, + struct ivi_layout_surface_properties *prop, uint32_t mask) { if (mask & IVI_NOTIFICATION_OPACITY) { @@ -425,13 +430,13 @@ send_surface_event(struct wl_resource *resource, } if (mask & IVI_NOTIFICATION_SOURCE_RECT) { ivi_controller_surface_send_source_rectangle(resource, - prop->sourceX, prop->sourceY, - prop->sourceWidth, prop->sourceHeight); + prop->source_x, prop->source_y, + prop->source_width, prop->source_height); } if (mask & IVI_NOTIFICATION_DEST_RECT) { ivi_controller_surface_send_destination_rectangle(resource, - prop->destX, prop->destY, - prop->destWidth, prop->destHeight); + prop->dest_x, prop->dest_y, + prop->dest_width, prop->dest_height); } if (mask & IVI_NOTIFICATION_ORIENTATION) { ivi_controller_surface_send_orientation(resource, @@ -441,10 +446,12 @@ send_surface_event(struct wl_resource *resource, ivi_controller_surface_send_visibility(resource, prop->visibility); } +#ifdef SUPPORT_PIXELFORMAT_PROPERTY if (mask & IVI_NOTIFICATION_PIXELFORMAT) { ivi_controller_surface_send_pixelformat(resource, prop->pixelformat); } +#endif if (mask & IVI_NOTIFICATION_KEYBOARD_FOCUS) { ivi_controller_surface_send_input_focus(resource, IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD, @@ -468,8 +475,8 @@ update_surface_prop(struct ivisurface *ivisurf, int i = 0; struct ivishell *shell = ivisurf->shell; - ans = ivi_layout_getLayersUnderSurface(ivisurf->layout_surface, - &length, &pArray); + ans = ivi_layout_get_layers_under_surface(ivisurf->layout_surface, + &length, &pArray); if (0 != ans) { weston_log("failed to get layers at send_surface_add_event\n"); return; @@ -515,7 +522,7 @@ update_surface_prop(struct ivisurface *ivisurf, static void send_surface_prop(struct ivi_layout_surface *layout_surface, - struct ivi_layout_SurfaceProperties *prop, + struct ivi_layout_surface_properties *prop, enum ivi_layout_notification_mask mask, void *userdata) { @@ -524,7 +531,7 @@ send_surface_prop(struct ivi_layout_surface *layout_surface, struct ivicontroller_surface *ctrlsurf = NULL; uint32_t id_surface = 0; - id_surface = ivi_layout_getIdOfSurface(layout_surface); + id_surface = ivi_layout_get_id_of_surface(layout_surface); wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) { if (id_surface != ctrlsurf->id_surface) { @@ -552,8 +559,8 @@ send_layer_add_event(struct ivilayer *ivilayer, struct wl_client *client = wl_resource_get_client(resource); struct wl_resource *resource_output = NULL; - ans = ivi_layout_getScreensUnderLayer(ivilayer->layout_layer, - &length, &pArray); + ans = ivi_layout_get_screens_under_layer(ivilayer->layout_layer, + &length, &pArray); if (0 != ans) { weston_log("failed to get screens at send_layer_add_event\n"); return; @@ -595,7 +602,7 @@ send_layer_add_event(struct ivilayer *ivilayer, static void send_layer_event(struct wl_resource *resource, struct ivilayer *ivilayer, - struct ivi_layout_LayerProperties *prop, + struct ivi_layout_layer_properties *prop, uint32_t mask) { if (mask & IVI_NOTIFICATION_OPACITY) { @@ -604,17 +611,17 @@ send_layer_event(struct wl_resource *resource, } if (mask & IVI_NOTIFICATION_SOURCE_RECT) { ivi_controller_layer_send_source_rectangle(resource, - prop->sourceX, - prop->sourceY, - prop->sourceWidth, - prop->sourceHeight); + prop->source_x, + prop->source_y, + prop->source_width, + prop->source_height); } if (mask & IVI_NOTIFICATION_DEST_RECT) { ivi_controller_layer_send_destination_rectangle(resource, - prop->destX, - prop->destY, - prop->destWidth, - prop->destHeight); + prop->dest_x, + prop->dest_y, + prop->dest_width, + prop->dest_height); } if (mask & IVI_NOTIFICATION_ORIENTATION) { ivi_controller_layer_send_orientation(resource, @@ -642,8 +649,8 @@ update_layer_prop(struct ivilayer *ivilayer, struct link_screen *link_scrn = NULL; struct link_screen *next = NULL; - ans = ivi_layout_getScreensUnderLayer(ivilayer->layout_layer, - &length, &pArray); + ans = ivi_layout_get_screens_under_layer(ivilayer->layout_layer, + &length, &pArray); if (0 != ans) { weston_log("failed to get screens at send_layer_add_event\n"); return; @@ -691,7 +698,7 @@ update_layer_prop(struct ivilayer *ivilayer, static void send_layer_prop(struct ivi_layout_layer *layer, - struct ivi_layout_LayerProperties *prop, + const struct ivi_layout_layer_properties *prop, enum ivi_layout_notification_mask mask, void *userdata) { @@ -700,7 +707,7 @@ send_layer_prop(struct ivi_layout_layer *layer, struct ivishell *shell = ivilayer->shell; uint32_t id_layout_layer = 0; - id_layout_layer = ivi_layout_getIdOfLayer(layer); + id_layout_layer = ivi_layout_get_id_of_layer(layer); wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) { if (id_layout_layer != ctrllayer->id_layer) { continue; @@ -718,7 +725,7 @@ controller_surface_set_opacity(struct wl_client *client, { struct ivisurface *ivisurf = wl_resource_get_user_data(resource); (void)client; - ivi_layout_surfaceSetOpacity(ivisurf->layout_surface, + ivi_layout_surface_set_opacity(ivisurf->layout_surface, wl_fixed_to_double(opacity)); } @@ -732,7 +739,7 @@ controller_surface_set_source_rectangle(struct wl_client *client, { struct ivisurface *ivisurf = wl_resource_get_user_data(resource); (void)client; - ivi_layout_surfaceSetSourceRectangle(ivisurf->layout_surface, + ivi_layout_surface_set_source_rectangle(ivisurf->layout_surface, (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height); } @@ -748,11 +755,11 @@ controller_surface_set_destination_rectangle(struct wl_client *client, (void)client; // TODO: create set transition type protocol - ivi_layout_surfaceSetTransition( ivisurf->layout_surface, - IVI_LAYOUT_TRANSITION_NONE, - 300); // ms + ivi_layout_surface_set_transition(ivisurf->layout_surface, + IVI_LAYOUT_TRANSITION_NONE, + 300); // ms - ivi_layout_surfaceSetDestinationRectangle(ivisurf->layout_surface, + ivi_layout_surface_set_destination_rectangle(ivisurf->layout_surface, (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height); } @@ -763,7 +770,7 @@ controller_surface_set_visibility(struct wl_client *client, { struct ivisurface *ivisurf = wl_resource_get_user_data(resource); (void)client; - ivi_layout_surfaceSetVisibility(ivisurf->layout_surface, visibility); + ivi_layout_surface_set_visibility(ivisurf->layout_surface, visibility); } static void @@ -785,7 +792,7 @@ controller_surface_set_orientation(struct wl_client *client, { struct ivisurface *ivisurf = wl_resource_get_user_data(resource); (void)client; - ivi_layout_surfaceSetOrientation(ivisurf->layout_surface, (uint32_t)orientation); + ivi_layout_surface_set_orientation(ivisurf->layout_surface, (uint32_t)orientation); } static int @@ -946,7 +953,7 @@ clear_viewlist_but_specified_surface(struct weston_compositor *compositor, } static void -get_gl_surface_rectangle(struct ivi_layout_SurfaceProperties *prop, +get_gl_surface_rectangle(struct ivi_layout_surface_properties *prop, int32_t *x, int32_t *y, int32_t *width, @@ -956,10 +963,10 @@ get_gl_surface_rectangle(struct ivi_layout_SurfaceProperties *prop, return; } - *x = prop->sourceX; - *y = prop->sourceY; - *width = prop->sourceWidth; - *height = prop->sourceHeight; + *x = prop->source_x; + *y = prop->source_y; + *width = prop->source_width; + *height = prop->source_height; } static int @@ -972,7 +979,7 @@ gl_surface_screenshot(struct ivisurface *ivisurf, struct weston_view *view = NULL; struct weston_output *output = NULL; struct iviscreen *link_scrn = NULL; - struct ivi_layout_SurfaceProperties prop = {}; + const struct ivi_layout_surface_properties *prop; int32_t x = 0; int32_t y = 0; int32_t width = 0; @@ -989,7 +996,7 @@ gl_surface_screenshot(struct ivisurface *ivisurf, return -1; } - if (ivi_layout_getPropertiesOfSurface(ivisurf->layout_surface, &prop) != 0) { + if (!(prop = ivi_layout_get_properties_of_surface(ivisurf->layout_surface))) { fprintf(stderr, "Failed to get surface properties."); return -1; } @@ -1002,7 +1009,7 @@ gl_surface_screenshot(struct ivisurface *ivisurf, view->plane = &compositor->primary_plane; } - get_gl_surface_rectangle(&prop, &x, &y, &width, &height); + get_gl_surface_rectangle(prop, &x, &y, &width, &height); dump_surface(link_scrn->output, compositor, filename, @@ -1031,13 +1038,13 @@ controller_surface_screenshot(struct wl_client *client, int32_t height = 0; int32_t stride = 0; - weston_surface = ivi_layout_surfaceGetWestonSurface(ivisurf->layout_surface); + weston_surface = ivi_layout_surface_get_weston_surface(ivisurf->layout_surface); if (weston_surface == NULL) { fprintf(stderr, "Failed to get weston surface.\n"); return; } - if (ivi_layout_surfaceGetSize(ivisurf->layout_surface, &width, &height, &stride) != 0) { + if (ivi_layout_surface_get_size(ivisurf->layout_surface, &width, &height, &stride) != 0) { fprintf(stderr, "Failed to get surface size.\n"); return; } @@ -1107,8 +1114,8 @@ controller_surface_set_input_focus(struct wl_client *client, if (device & IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD) { if (enabled) { - uint32_t id = ivi_layout_getIdOfSurface(ivisurf->layout_surface); - ivi_layout_SetKeyboardFocusOn(&id, 1); + uint32_t id = ivi_layout_get_id_of_surface(ivisurf->layout_surface); + ivi_layout_set_keyboard_focus_on(&id, 1); send_all_keyboard_focus(ivisurf->shell); } } @@ -1138,7 +1145,7 @@ controller_layer_set_source_rectangle(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetSourceRectangle(ivilayer->layout_layer, + ivi_layout_layer_set_source_rectangle(ivilayer->layout_layer, (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height); } @@ -1152,7 +1159,7 @@ controller_layer_set_destination_rectangle(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetDestinationRectangle(ivilayer->layout_layer, + ivi_layout_layer_set_destination_rectangle(ivilayer->layout_layer, (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height); } @@ -1163,7 +1170,7 @@ controller_layer_set_visibility(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetVisibility(ivilayer->layout_layer, visibility); + ivi_layout_layer_set_visibility(ivilayer->layout_layer, visibility); } static void @@ -1173,8 +1180,8 @@ controller_layer_set_opacity(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetOpacity(ivilayer->layout_layer, - wl_fixed_to_double(opacity)); + ivi_layout_layer_set_opacity(ivilayer->layout_layer, + wl_fixed_to_double(opacity)); } static void @@ -1197,7 +1204,7 @@ controller_layer_set_orientation(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetOrientation(ivilayer->layout_layer, (uint32_t)orientation); + ivi_layout_layer_set_orientation(ivilayer->layout_layer, (uint32_t)orientation); } static void @@ -1206,7 +1213,7 @@ controller_layer_clear_surfaces(struct wl_client *client, { struct ivilayer *ivilayer = wl_resource_get_user_data(resource); (void)client; - ivi_layout_layerSetRenderOrder(ivilayer->layout_layer, NULL, 0); + ivi_layout_layer_set_render_order(ivilayer->layout_layer, NULL, 0); } static void @@ -1217,7 +1224,7 @@ controller_layer_add_surface(struct wl_client *client, struct ivilayer *ivilayer = wl_resource_get_user_data(resource); struct ivisurface *ivisurf = wl_resource_get_user_data(surface); (void)client; - ivi_layout_layerAddSurface(ivilayer->layout_layer, ivisurf->layout_surface); + ivi_layout_layer_add_surface(ivilayer->layout_layer, ivisurf->layout_surface); } static void @@ -1228,7 +1235,7 @@ controller_layer_remove_surface(struct wl_client *client, struct ivilayer *ivilayer = wl_resource_get_user_data(resource); struct ivisurface *ivisurf = wl_resource_get_user_data(surface); (void)client; - ivi_layout_layerRemoveSurface(ivilayer->layout_layer, ivisurf->layout_surface); + ivi_layout_layer_remove_surface(ivilayer->layout_layer, ivisurf->layout_surface); } static void @@ -1259,7 +1266,7 @@ controller_layer_set_render_order(struct wl_client *client, wl_array_for_each(id_surface, id_surfaces) { wl_list_for_each(ivisurf, &ivilayer->shell->list_surface, link) { - id_layout_surface = ivi_layout_getIdOfSurface(ivisurf->layout_surface); + id_layout_surface = ivi_layout_get_id_of_surface(ivisurf->layout_surface); if (*id_surface == id_layout_surface) { layoutsurf_array[i] = ivisurf->layout_surface; i++; @@ -1268,8 +1275,8 @@ controller_layer_set_render_order(struct wl_client *client, } } - ivi_layout_layerSetRenderOrder(ivilayer->layout_layer, - layoutsurf_array, i); + ivi_layout_layer_set_render_order(ivilayer->layout_layer, + layoutsurf_array, i); free(layoutsurf_array); } @@ -1282,7 +1289,7 @@ controller_layer_destroy(struct wl_client *client, struct ivishell *shell = ivilayer->shell; struct ivicontroller_layer *ctrllayer = NULL; struct ivicontroller_layer *next = NULL; - uint32_t id_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer); + uint32_t id_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer); (void)client; (void)destroy_scene_object; @@ -1319,7 +1326,7 @@ controller_screen_destroy(struct wl_client *client, struct iviscreen *iviscrn = wl_resource_get_user_data(resource); struct ivicontroller_screen *ctrlscrn = NULL; struct ivicontroller_screen *next = NULL; -// uint32_t id_screen = ivi_layout_getIdOfScreen(iviscrn->layout_screen); +// uint32_t id_screen = ivi_layout_get_id_of_screen(iviscrn->layout_screen); (void)client; wl_list_for_each_safe(ctrlscrn, next, @@ -1342,7 +1349,7 @@ controller_screen_clear(struct wl_client *client, { struct iviscreen *iviscrn = wl_resource_get_user_data(resource); (void)client; - ivi_layout_screenSetRenderOrder(iviscrn->layout_screen, NULL, 0); + ivi_layout_screen_set_render_order(iviscrn->layout_screen, NULL, 0); } static void @@ -1353,7 +1360,7 @@ controller_screen_add_layer(struct wl_client *client, struct iviscreen *iviscrn = wl_resource_get_user_data(resource); struct ivilayer *ivilayer = wl_resource_get_user_data(layer); (void)client; - ivi_layout_screenAddLayer(iviscrn->layout_screen, ivilayer->layout_layer); + ivi_layout_screen_add_layer(iviscrn->layout_screen, ivilayer->layout_layer); } static void @@ -1372,7 +1379,7 @@ controller_screen_screenshot(struct wl_client *client, int32_t stride = 0; uint8_t *readpixs = NULL; - output = ivi_layout_screenGetOutput(iviscrn->layout_screen); + output = ivi_layout_screen_get_output(iviscrn->layout_screen); --output->disable_planes; width = output->current_mode->width; @@ -1416,7 +1423,7 @@ controller_screen_set_render_order(struct wl_client *client, wl_array_for_each(id_layer, id_layers) { wl_list_for_each(ivilayer, &iviscrn->shell->list_layer, link) { - id_layout_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer); + id_layout_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer); if (*id_layer == id_layout_layer) { layoutlayer_array[i] = ivilayer->layout_layer; i++; @@ -1425,8 +1432,8 @@ controller_screen_set_render_order(struct wl_client *client, } } - ivi_layout_screenSetRenderOrder(iviscrn->layout_screen, - layoutlayer_array, i); + ivi_layout_screen_set_render_order(iviscrn->layout_screen, + layoutlayer_array, i); free(layoutlayer_array); } @@ -1447,7 +1454,7 @@ controller_commit_changes(struct wl_client *client, (void)client; (void)resource; - ans = ivi_layout_commitChanges(); + ans = ivi_layout_commit_changes(); if (ans < 0) { weston_log("Failed to commit changes at controller_commit_changes\n"); } @@ -1466,11 +1473,11 @@ controller_layer_create(struct wl_client *client, struct ivi_layout_layer *layout_layer = NULL; struct ivicontroller_layer *ctrllayer = NULL; struct ivilayer *ivilayer = NULL; - struct ivi_layout_LayerProperties prop; + const struct ivi_layout_layer_properties *prop; ivilayer = get_layer(&shell->list_layer, id_layer); if (ivilayer == NULL) { - layout_layer = ivi_layout_layerCreateWithDimension(id_layer, + layout_layer = ivi_layout_layer_create_with_dimension(id_layer, (uint32_t)width, (uint32_t)height); if (layout_layer == NULL) { weston_log("id_layer is already created\n"); @@ -1512,11 +1519,11 @@ controller_layer_create(struct wl_client *client, &controller_layer_implementation, ivilayer, destroy_ivicontroller_layer); - memset(&prop, 0, sizeof prop); + if (!(prop = ivi_layout_get_properties_of_layer(ivilayer->layout_layer))) + prop = &no_layer_props; - ivi_layout_getPropertiesOfLayer(ivilayer->layout_layer, &prop); send_layer_event(ctrllayer->resource, ivilayer, - &prop, IVI_NOTIFICATION_ALL); + prop, IVI_NOTIFICATION_ALL); } static void @@ -1540,7 +1547,7 @@ controller_surface_create(struct wl_client *client, struct ivicontroller *ctrl = wl_resource_get_user_data(resource); struct ivishell *shell = ctrl->shell; struct ivicontroller_surface *ctrlsurf = NULL; - struct ivi_layout_SurfaceProperties prop; + const struct ivi_layout_surface_properties *prop; struct ivisurface *ivisurf = NULL; struct ivicontroller_surface *ctrl_link = NULL; @@ -1590,13 +1597,13 @@ controller_surface_create(struct wl_client *client, ctrlsurf->implementation_set = 1; - memset(&prop, 0, sizeof prop); + if (!(prop = ivi_layout_get_properties_of_surface(ivisurf->layout_surface))) + prop = &no_surface_props; - ivi_layout_getPropertiesOfSurface(ivisurf->layout_surface, &prop); - ivi_layout_surfaceSetContentObserver(ivisurf->layout_surface, surface_event_content, shell); + ivi_layout_surface_set_content_observer(ivisurf->layout_surface, surface_event_content, shell); send_surface_event(ctrlsurf->resource, ivisurf, - &prop, IVI_NOTIFICATION_ALL); + prop, IVI_NOTIFICATION_ALL); } static void @@ -1646,7 +1653,7 @@ controller_set_keyboard_focus(struct wl_client *client, struct wl_array *surfaces) { struct ivicontroller *ctrl = wl_resource_get_user_data(resource); - ivi_layout_SetKeyboardFocusOn(surfaces->data, surfaces->size); + ivi_layout_set_keyboard_focus_on(surfaces->data, surfaces->size); send_all_keyboard_focus(ctrl->shell); } @@ -1692,14 +1699,14 @@ add_client_to_resources(struct ivishell *shell, } wl_list_for_each_reverse(ivilayer, &shell->list_layer, link) { id_layout_layer = - ivi_layout_getIdOfLayer(ivilayer->layout_layer); + ivi_layout_get_id_of_layer(ivilayer->layout_layer); ivi_controller_send_layer(controller->resource, id_layout_layer); } wl_list_for_each_reverse(ivisurf, &shell->list_surface, link) { layout_surface = ivisurf->layout_surface; - id_layout_surface = ivi_layout_getIdOfSurface(layout_surface); + id_layout_surface = ivi_layout_get_id_of_surface(layout_surface); get_wl_shell_info(layout_surface, id_layout_surface, &pid, &window_title); @@ -1753,7 +1760,7 @@ create_screen(struct ivishell *shell, struct weston_output *output) iviscrn->output = output; // TODO : Only Single display - iviscrn->layout_screen = ivi_layout_getScreenFromId(0); + iviscrn->layout_screen = ivi_layout_get_screen_from_id(0); wl_list_init(&iviscrn->link); @@ -1786,7 +1793,7 @@ create_layer(struct ivishell *shell, wl_list_insert(&shell->list_layer, &ivilayer->link); ivilayer->layout_layer = layout_layer; - ivi_layout_layerAddNotification(layout_layer, send_layer_prop, ivilayer); + ivi_layout_layer_add_notification(layout_layer, send_layer_prop, ivilayer); wl_list_for_each(controller, &shell->list_controller, link) { ivi_controller_send_layer(controller->resource, id_layer); @@ -1830,8 +1837,8 @@ create_surface(struct ivishell *shell, id_surface, pid, window_title); } - ivi_layout_surfaceAddNotification(layout_surface, - send_surface_prop, ivisurf); + ivi_layout_surface_add_notification(layout_surface, + send_surface_prop, ivisurf); return ivisurf; } @@ -1844,7 +1851,7 @@ layer_event_create(struct ivi_layout_layer *layout_layer, struct ivilayer *ivilayer = NULL; uint32_t id_layer = 0; - id_layer = ivi_layout_getIdOfLayer(layout_layer); + id_layer = ivi_layout_get_id_of_layer(layout_layer); ivilayer = create_layer(shell, layout_layer, id_layer); if (ivilayer == NULL) { @@ -1855,7 +1862,7 @@ layer_event_create(struct ivi_layout_layer *layout_layer, static void layer_event_remove(struct ivi_layout_layer *layout_layer, - void *userdata) + void *userdata) { struct ivishell *shell = userdata; struct ivicontroller_layer *ctrllayer = NULL; @@ -1878,7 +1885,7 @@ layer_event_remove(struct ivi_layout_layer *layout_layer, } if (is_removed) { - id_layer = ivi_layout_getIdOfLayer(layout_layer); + id_layer = ivi_layout_get_id_of_layer(layout_layer); wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) { if (id_layer != ctrllayer->id_layer) { @@ -1899,7 +1906,7 @@ surface_event_create(struct ivi_layout_surface *layout_surface, uint32_t id_surface = 0; struct ivicontroller_surface *ctrlsurf = NULL; - id_surface = ivi_layout_getIdOfSurface(layout_surface); + id_surface = ivi_layout_get_id_of_surface(layout_surface); ivisurf = create_surface(shell, layout_surface, id_surface); if (ivisurf == NULL) { @@ -1945,7 +1952,7 @@ surface_event_remove(struct ivi_layout_surface *layout_surface, } if (is_removed) { - id_surface = ivi_layout_getIdOfSurface(layout_surface); + id_surface = ivi_layout_get_id_of_surface(layout_surface); wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) { if (id_surface != ctrlsurf->id_surface) { @@ -1964,10 +1971,10 @@ surface_event_configure(struct ivi_layout_surface *layout_surface, struct ivishell *shell = userdata; struct ivisurface *ivisurf = NULL; struct ivicontroller_surface *ctrlsurf = NULL; - struct ivi_layout_SurfaceProperties prop; + struct ivi_layout_surface_properties *prop; uint32_t id_surface = 0; - id_surface = ivi_layout_getIdOfSurface(layout_surface); + id_surface = ivi_layout_get_id_of_surface(layout_surface); ivisurf = get_surface(&shell->list_surface, id_surface); if (ivisurf == NULL) { @@ -1975,15 +1982,15 @@ surface_event_configure(struct ivi_layout_surface *layout_surface, return; } - memset(&prop, 0, sizeof prop); - ivi_layout_getPropertiesOfSurface(layout_surface, &prop); + if (!(prop = ivi_layout_get_properties_of_surface(layout_surface))) + prop = &no_surface_props; wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) { if (id_surface != ctrlsurf->id_surface) { continue; } send_surface_event(ctrlsurf->resource, ivisurf, - &prop, IVI_NOTIFICATION_ALL); + prop, IVI_NOTIFICATION_ALL); } } @@ -1997,7 +2004,7 @@ check_layout_layers(struct ivishell *shell) uint32_t i = 0; int32_t ret = 0; - ret = ivi_layout_getLayers(&length, &pArray); + ret = ivi_layout_get_layers(&length, &pArray); if(ret != 0) { weston_log("failed to get layers at check_layout_layers\n"); return -1; @@ -2009,7 +2016,7 @@ check_layout_layers(struct ivishell *shell) } for (i = 0; i < length; i++) { - id_layer = ivi_layout_getIdOfLayer(pArray[i]); + id_layer = ivi_layout_get_id_of_layer(pArray[i]); ivilayer = create_layer(shell, pArray[i], id_layer); if (ivilayer == NULL) { weston_log("failed to create layer"); @@ -2032,7 +2039,7 @@ check_layout_surfaces(struct ivishell *shell) uint32_t i = 0; int32_t ret = 0; - ret = ivi_layout_getSurfaces(&length, &pArray); + ret = ivi_layout_get_surfaces(&length, &pArray); if(ret != 0) { weston_log("failed to get surfaces at check_layout_surfaces\n"); return -1; @@ -2044,7 +2051,7 @@ check_layout_surfaces(struct ivishell *shell) } for (i = 0; i < length; i++) { - id_surface = ivi_layout_getIdOfSurface(pArray[i]); + id_surface = ivi_layout_get_id_of_surface(pArray[i]); ivisurf = create_surface(shell, pArray[i], id_surface); if (ivisurf == NULL) { weston_log("failed to create surface"); @@ -2093,12 +2100,12 @@ init_ivi_shell(struct weston_compositor *ec, struct ivishell *shell) weston_log("failed to check_layout_surfaces"); } - ivi_layout_addNotificationCreateLayer(layer_event_create, shell); - ivi_layout_addNotificationRemoveLayer(layer_event_remove, shell); + ivi_layout_add_notification_create_layer(layer_event_create, shell); + ivi_layout_add_notification_remove_layer(layer_event_remove, shell); - ivi_layout_addNotificationCreateSurface(surface_event_create, shell); - ivi_layout_addNotificationRemoveSurface(surface_event_remove, shell); - ivi_layout_addNotificationConfigureSurface(surface_event_configure, shell); + ivi_layout_add_notification_create_surface(surface_event_create, shell); + ivi_layout_add_notification_remove_surface(surface_event_remove, shell); + ivi_layout_add_notification_configure_surface(surface_event_configure, shell); } WL_EXPORT int diff --git a/weston-ivi-shell/src/ivi-layout-export.h b/weston-ivi-shell/src/ivi-layout-export.h index f073826..9962932 100644 --- a/weston-ivi-shell/src/ivi-layout-export.h +++ b/weston-ivi-shell/src/ivi-layout-export.h @@ -104,19 +104,20 @@ struct ivi_layout_layer_properties }; enum ivi_layout_notification_mask { - IVI_NOTIFICATION_NONE = 0, - IVI_NOTIFICATION_OPACITY = (1 << 1), - IVI_NOTIFICATION_SOURCE_RECT = (1 << 2), - IVI_NOTIFICATION_DEST_RECT = (1 << 3), - IVI_NOTIFICATION_DIMENSION = (1 << 4), - IVI_NOTIFICATION_POSITION = (1 << 5), - IVI_NOTIFICATION_ORIENTATION = (1 << 6), - IVI_NOTIFICATION_VISIBILITY = (1 << 7), - IVI_NOTIFICATION_PIXELFORMAT = (1 << 8), - IVI_NOTIFICATION_ADD = (1 << 9), - IVI_NOTIFICATION_REMOVE = (1 << 10), - IVI_NOTIFICATION_CONFIGURE = (1 << 11), - IVI_NOTIFICATION_ALL = 0xFFFF + IVI_NOTIFICATION_NONE = 0, + IVI_NOTIFICATION_OPACITY = (1 << 1), + IVI_NOTIFICATION_SOURCE_RECT = (1 << 2), + IVI_NOTIFICATION_DEST_RECT = (1 << 3), + IVI_NOTIFICATION_DIMENSION = (1 << 4), + IVI_NOTIFICATION_POSITION = (1 << 5), + IVI_NOTIFICATION_ORIENTATION = (1 << 6), + IVI_NOTIFICATION_VISIBILITY = (1 << 7), + IVI_NOTIFICATION_PIXELFORMAT = (1 << 8), + IVI_NOTIFICATION_ADD = (1 << 9), + IVI_NOTIFICATION_REMOVE = (1 << 10), + IVI_NOTIFICATION_CONFIGURE = (1 << 11), + IVI_NOTIFICATION_KEYBOARD_FOCUS = (1 << 12), + IVI_NOTIFICATION_ALL = 0xFFFF }; enum ivi_layout_transition_type{ -- 2.7.4