1 index 68ca68ba..c86cbb11 100644
2 --- a/ivi-shell/ivi-layout-shell.h
3 +++ b/ivi-shell/ivi-layout-shell.h
4 @@ -39,6 +39,14 @@ struct weston_view;
6 struct ivi_layout_surface;
9 +ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
10 + int32_t width, int32_t height);
12 +struct ivi_layout_surface*
13 +ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
14 + uint32_t id_surface);
17 ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
18 int32_t width, int32_t height);
19 diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
20 index 690af742..086d0fd2 100644
21 --- a/ivi-shell/ivi-layout.c
22 +++ b/ivi-shell/ivi-layout.c
23 @@ -1995,20 +1995,8 @@ ivi_layout_surface_dump(struct weston_surface *surface,
24 * methods of interaction between ivi-shell with ivi-layout
28 -ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
29 - int32_t width, int32_t height)
31 - struct ivi_layout *layout = get_instance();
33 - /* emit callback which is set by ivi-layout api user */
34 - wl_signal_emit(&layout->surface_notification.configure_changed,
38 -struct ivi_layout_surface*
39 -ivi_layout_surface_create(struct weston_surface *wl_surface,
40 - uint32_t id_surface)
41 +static struct ivi_layout_surface*
42 +surface_create(struct weston_surface *wl_surface, uint32_t id_surface)
44 struct ivi_layout *layout = get_instance();
45 struct ivi_layout_surface *ivisurf = NULL;
46 @@ -2018,14 +2006,6 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
50 - ivisurf = get_surface(&layout->surface_list, id_surface);
51 - if (ivisurf != NULL) {
52 - if (ivisurf->surface != NULL) {
53 - weston_log("id_surface(%d) is already created\n", id_surface);
58 ivisurf = calloc(1, sizeof *ivisurf);
59 if (ivisurf == NULL) {
60 weston_log("fails to allocate memory\n");
61 @@ -2049,7 +2029,55 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
63 wl_list_insert(&layout->surface_list, &ivisurf->link);
65 - wl_signal_emit(&layout->surface_notification.created, ivisurf);
70 +ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
71 + int32_t width, int32_t height)
73 + struct ivi_layout *layout = get_instance();
75 + /* emit callback which is set by ivi-layout api user */
76 + wl_signal_emit(&layout->surface_notification.configure_desktop_changed,
80 +struct ivi_layout_surface*
81 +ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
82 + uint32_t id_surface)
84 + return surface_create(wl_surface, id_surface);
88 +ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
89 + int32_t width, int32_t height)
91 + struct ivi_layout *layout = get_instance();
93 + /* emit callback which is set by ivi-layout api user */
94 + wl_signal_emit(&layout->surface_notification.configure_changed,
98 +struct ivi_layout_surface*
99 +ivi_layout_surface_create(struct weston_surface *wl_surface,
100 + uint32_t id_surface)
102 + struct ivi_layout *layout = get_instance();
103 + struct ivi_layout_surface *ivisurf = NULL;
105 + ivisurf = get_surface(&layout->surface_list, id_surface);
107 + weston_log("id_surface(%d) is already created\n", id_surface);
111 + ivisurf = surface_create(wl_surface, id_surface);
114 + wl_signal_emit(&layout->surface_notification.created, ivisurf);