int32_t y;
int32_t width;
int32_t height;
+ struct wl_list link;
};
struct link_layer {
uint32_t application_layer_id;
uint32_t workspace_background_layer_id;
uint32_t workspace_layer_id;
+ uint32_t base_layer_id_offset;
int32_t panel_height;
uint32_t transition_duration;
char *ivi_homescreen;
struct hmi_controller {
struct hmi_server_setting *hmi_setting;
- struct hmi_controller_layer base_layer;
+ /* List of struct hmi_controller_layer */
+ struct wl_list base_layer_list;
struct hmi_controller_layer application_layer;
struct hmi_controller_layer workspace_background_layer;
struct hmi_controller_layer workspace_layer;
weston_config_section_get_uint(shell_section, "application-layer-id",
&setting->application_layer_id, 4000);
+ weston_config_section_get_uint(shell_section, "base-layer-id-offset",
+ &setting->base_layer_id_offset, 10000);
+
weston_config_section_get_uint(shell_section, "transition-duration",
&setting->transition_duration, 300);
{
struct link_layer *link = NULL;
struct link_layer *next = NULL;
+ struct hmi_controller_layer *ctrl_layer_link = NULL;
+ struct hmi_controller_layer *ctrl_layer_next = NULL;
struct hmi_controller *hmi_ctrl =
container_of(listener, struct hmi_controller, destroy_listener);
free(link);
}
+ wl_list_for_each_safe(ctrl_layer_link, ctrl_layer_next,
+ &hmi_ctrl->base_layer_list, link) {
+ wl_list_remove(&ctrl_layer_link->link);
+ free(ctrl_layer_link);
+ }
+
wl_array_release(&hmi_ctrl->ui_widgets);
free(hmi_ctrl->hmi_setting);
free(hmi_ctrl->pp_screen);
struct link_layer *tmp_link_layer = NULL;
int32_t panel_height = 0;
struct hmi_controller *hmi_ctrl = MEM_ALLOC(sizeof(*hmi_ctrl));
+ struct hmi_controller_layer *base_layer = NULL;
+
+ int32_t i = 0;
wl_array_init(&hmi_ctrl->ui_widgets);
hmi_ctrl->layout_mode = IVI_HMI_CONTROLLER_LAYOUT_MODE_TILING;
}
iviscrn = get_screen(0, hmi_ctrl);
- ivi_layout_interface->get_screen_resolution(iviscrn, &screen_width,
- &screen_height);
/* init base ivi_layer*/
- hmi_ctrl->base_layer.x = 0;
- hmi_ctrl->base_layer.y = 0;
- hmi_ctrl->base_layer.width = screen_width;
- hmi_ctrl->base_layer.height = screen_height;
- hmi_ctrl->base_layer.id_layer = hmi_ctrl->hmi_setting->base_layer_id;
-
- create_layer(iviscrn, &hmi_ctrl->base_layer);
+ wl_list_init(&hmi_ctrl->base_layer_list);
+ for (i = 0; i < hmi_ctrl->screen_num; i++) {
+ ivi_layout_interface->get_screen_resolution(get_screen(i, hmi_ctrl),
+ &screen_width,
+ &screen_height);
+
+ base_layer = MEM_ALLOC(1 * sizeof(struct hmi_controller_layer));
+ base_layer->x = 0;
+ base_layer->y = 0;
+ base_layer->width = screen_width;
+ base_layer->height = screen_height;
+ base_layer->id_layer =
+ hmi_ctrl->hmi_setting->base_layer_id +
+ (i * hmi_ctrl->hmi_setting->base_layer_id_offset);
+ wl_list_insert(&hmi_ctrl->base_layer_list, &base_layer->link);
+
+ create_layer(get_screen(i, hmi_ctrl), base_layer);
+ }
+ ivi_layout_interface->get_screen_resolution(iviscrn, &screen_width,
+ &screen_height);
panel_height = hmi_ctrl->hmi_setting->panel_height;
/* init application ivi_layer */
uint32_t id_surface)
{
struct ivi_layout_surface *ivisurf = NULL;
- struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
+ struct hmi_controller_layer *base_layer =
+ wl_container_of(hmi_ctrl->base_layer_list.prev,
+ base_layer,
+ link);
+ struct ivi_layout_layer *ivilayer = base_layer->ivilayer;
const int32_t dstx = hmi_ctrl->application_layer.x;
const int32_t dsty = hmi_ctrl->application_layer.y;
const int32_t width = hmi_ctrl->application_layer.width;
uint32_t id_surface)
{
struct ivi_layout_surface *ivisurf = NULL;
- struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
- const int32_t width = hmi_ctrl->base_layer.width;
+ struct hmi_controller_layer *base_layer =
+ wl_container_of(hmi_ctrl->base_layer_list.prev,
+ base_layer,
+ link);
+ struct ivi_layout_layer *ivilayer = base_layer->ivilayer;
+ const int32_t width = base_layer->width;
int32_t ret = 0;
int32_t panel_height = 0;
const int32_t dstx = 0;
panel_height = hmi_ctrl->hmi_setting->panel_height;
- dsty = hmi_ctrl->base_layer.height - panel_height;
+ dsty = base_layer->height - panel_height;
ret = ivi_layout_interface->surface_set_destination_rectangle(
ivisurf, dstx, dsty, width, panel_height);
uint32_t id_surface, int32_t number)
{
struct ivi_layout_surface *ivisurf = NULL;
- struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
+ struct hmi_controller_layer *base_layer =
+ wl_container_of(hmi_ctrl->base_layer_list.prev,
+ base_layer,
+ link);
+ struct ivi_layout_layer *ivilayer = base_layer->ivilayer;
const int32_t width = 48;
const int32_t height = 48;
int32_t ret = 0;
panel_height = hmi_ctrl->hmi_setting->panel_height;
dstx = (60 * number) + 15;
- dsty = (hmi_ctrl->base_layer.height - panel_height) + 5;
+ dsty = (base_layer->height - panel_height) + 5;
ret = ivi_layout_interface->surface_set_destination_rectangle(
ivisurf,dstx, dsty, width, height);
uint32_t id_surface)
{
struct ivi_layout_surface *ivisurf = NULL;
- struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
+ struct hmi_controller_layer *base_layer =
+ wl_container_of(hmi_ctrl->base_layer_list.prev,
+ base_layer,
+ link);
+ struct ivi_layout_layer *ivilayer = base_layer->ivilayer;
int32_t ret = 0;
int32_t size = 48;
int32_t panel_height = hmi_ctrl->hmi_setting->panel_height;
- const int32_t dstx = (hmi_ctrl->base_layer.width - size) / 2;
- const int32_t dsty = (hmi_ctrl->base_layer.height - panel_height) + 5;
+ const int32_t dstx = (base_layer->width - size) / 2;
+ const int32_t dsty = (base_layer->height - panel_height) + 5;
uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
sizeof(*add_surface_id));