summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/ico-uxf-weston-plugin.changes7
-rw-r--r--packaging/ico-uxf-weston-plugin.spec2
-rw-r--r--protocol/ico_window_mgr.xml1
-rw-r--r--settings/weston.ini8
-rw-r--r--src/ico_ivi_common.h1
-rw-r--r--src/ico_ivi_shell.c24
-rw-r--r--src/ico_window_animation.c383
-rw-r--r--src/ico_window_mgr.c174
-rw-r--r--src/ico_window_mgr.h6
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/test-common.h3
-rw-r--r--tests/test-homescreen.c90
-rw-r--r--tests/test-thumbnail.c175
-rw-r--r--tests/testdata/hs_animatest.dat167
-rw-r--r--tests/testdata/hs_slide.dat4
-rwxr-xr-xtests/weston-plugin-test.anima1
-rwxr-xr-xtests/weston-plugin-test.homescreen9
-rwxr-xr-xtests/weston-plugin-test.input8
-rwxr-xr-xtests/weston-plugin-test.map1
-rwxr-xr-xtests/weston-plugin-test.notouch9
-rwxr-xr-xtests/weston-plugin-test.resize_flower9
-rwxr-xr-xtests/weston-plugin-test.resize_native9
-rwxr-xr-xtests/weston-plugin-test.resize_smoke9
-rwxr-xr-xtests/weston-plugin-test.resize_smoke29
-rwxr-xr-xtests/weston-plugin-test.send_input1
-rwxr-xr-xtests/weston-plugin-test.slide9
-rwxr-xr-xtests/weston-plugin-test_gdb7
-rw-r--r--tests/weston.ini3
28 files changed, 859 insertions, 272 deletions
diff --git a/packaging/ico-uxf-weston-plugin.changes b/packaging/ico-uxf-weston-plugin.changes
index 82ad280..ccda2d7 100644
--- a/packaging/ico-uxf-weston-plugin.changes
+++ b/packaging/ico-uxf-weston-plugin.changes
@@ -1,3 +1,10 @@
+* Fri Sep 06 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/tizen/20130828.211548@1c6b247
+- 0.9.02 release.
+-- Fix for TIVI-1693 - Wayland Terminal is not visibile in application layer or on-screen layer.
+ It was not visible if application did not create EGL buffer at the time of wayland surface creation.
+-- fix for - Indication to the second display is impossible.
+-- fix for - Some examination scripts do not work.
+
* Fri Aug 30 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/tizen/20130828.211548@4cf16ef
- 0.9.01 release
-- The change of the configuration(weston.ini) with the version up of HomeScreen(0.7.x->0.9.x).
diff --git a/packaging/ico-uxf-weston-plugin.spec b/packaging/ico-uxf-weston-plugin.spec
index c36fdfb..7b266fd 100644
--- a/packaging/ico-uxf-weston-plugin.spec
+++ b/packaging/ico-uxf-weston-plugin.spec
@@ -1,6 +1,6 @@
Name: ico-uxf-weston-plugin
Summary: Weston Plugins for IVI
-Version: 0.9.01
+Version: 0.9.02
Release: 1.1
Group: Graphics & UI Framework/Automotive UI
License: MIT
diff --git a/protocol/ico_window_mgr.xml b/protocol/ico_window_mgr.xml
index 45fda9f..5446767 100644
--- a/protocol/ico_window_mgr.xml
+++ b/protocol/ico_window_mgr.xml
@@ -10,6 +10,7 @@
General values for ico_window_mgr.
</description>
<entry name="nochange" value="0x8000" summary="no change value"/>
+ <entry name="mainsurface" value="0x8000" summary="main serface id"/>
</enum>
<enum name="declare_manager">
diff --git a/settings/weston.ini b/settings/weston.ini
index bd71def..8d51f06 100644
--- a/settings/weston.ini
+++ b/settings/weston.ini
@@ -14,10 +14,10 @@ name=HDMI3
mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
transform=90
-[output]
-name=HDMI2
+#[output]
+#name=HDMI2
#mode=1280x480
-mode=100.00 1280 1300 1400 1400 480 500 600 700 -hsync +vsync
+#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
#[output]
#name=LVDS1
@@ -27,6 +27,7 @@ mode=100.00 1280 1300 1400 1400 480 500 600 700 -hsync +vsync
#[output]
#name=VGA1
#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
+#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
#transform=90
#[output]
@@ -63,6 +64,7 @@ fps=30
[ivi-debug]
# debug flags
# bit.0 0=hide on surface create(for with HomeScreen)/1=show on surface create
+# bit.1 0=not show if display not exist/1=show if display not exist
flag=0
# 0=no debug log write(1=err/2=warn/3=info/4=trace/5=debug)
diff --git a/src/ico_ivi_common.h b/src/ico_ivi_common.h
index 64e2ef1..1fd0ad4 100644
--- a/src/ico_ivi_common.h
+++ b/src/ico_ivi_common.h
@@ -58,6 +58,7 @@
/* Debug flags */
#define ICO_IVI_DEBUG_SHOW_SURFACE 0x01 /* new surface show on create */
+#define ICO_IVI_DEBUG_SHOW_NODISP 0x02 /* show if display not exist */
/* Function prototype */
int ico_ivi_get_mynode(void); /* Get my node numner */
diff --git a/src/ico_ivi_shell.c b/src/ico_ivi_shell.c
index 25e8698..3b88783 100644
--- a/src/ico_ivi_shell.c
+++ b/src/ico_ivi_shell.c
@@ -1333,7 +1333,7 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time)
height += wl_fixed_to_int(to_y - from_y);
}
- uifw_trace("resize_grab_motion: send configure %08x %x w/h=%d/%d",
+ uifw_debug("resize_grab_motion: send configure %08x %x w/h=%d/%d",
(int)shsurf->surface, resize->edges, width, height);
shsurf->client->send_configure(shsurf->surface,
resize->edges, width, height);
@@ -1907,7 +1907,7 @@ shell_surface_set_maximized(struct wl_client *client,
panel_height = get_output_panel_height(shell, shsurf->output);
edges = WL_SHELL_SURFACE_RESIZE_TOP|WL_SHELL_SURFACE_RESIZE_LEFT;
- uifw_trace("shell_surface_set_maximized: send %08x %x w/h=%d/%d",
+ uifw_debug("shell_surface_set_maximized: send %08x %x w/h=%d/%d",
(int)shsurf->surface, edges, shsurf->output->width,
shsurf->output->height - panel_height);
shsurf->client->send_configure(shsurf->surface, edges,
@@ -1935,7 +1935,7 @@ create_black_surface(struct weston_compositor *ec,
surface->configure = black_surface_configure;
surface->configure_private = fs_surface;
- uifw_trace("create_black_surface: configure %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("create_black_surface: configure %08x x/y=%d/%d w/h=%d/%d",
(int)surface, (int)x, (int)y, w, h);
weston_surface_configure(surface, x, y, w, h);
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
@@ -2025,7 +2025,7 @@ shell_configure_fullscreen(struct shell_surface *shsurf)
weston_surface_set_position(surface,
output->x - surf_x,
output->y - surf_y);
- uifw_trace("shell_configure_fullscreen: configure %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("shell_configure_fullscreen: configure %08x x/y=%d/%d w/h=%d/%d",
(int)shsurf->fullscreen.black_surface, (int)(output->x - surf_x),
(int)(output->y - surf_y), output->width, output->height);
weston_surface_configure(shsurf->fullscreen.black_surface,
@@ -2102,7 +2102,7 @@ set_fullscreen(struct shell_surface *shsurf,
shsurf->fullscreen.framerate = framerate;
shsurf->next_type = SHELL_SURFACE_FULLSCREEN;
- uifw_trace("set_fullscreen: send %08x 0 w/h=%d/%d",
+ uifw_debug("set_fullscreen: send %08x 0 w/h=%d/%d",
(int)shsurf->surface, shsurf->output->width, shsurf->output->height);
shsurf->client->send_configure(shsurf->surface, 0,
shsurf->output->width,
@@ -2616,7 +2616,7 @@ configure_static_surface(struct weston_surface *es, struct weston_layer *layer,
}
}
- uifw_trace("configure_static_surface: configure %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("configure_static_surface: configure %08x x/y=%d/%d w/h=%d/%d",
(int)es, (int)es->output->x, (int)es->output->y, width, height);
weston_surface_configure(es, es->output->x, es->output->y, width, height);
@@ -2659,7 +2659,7 @@ desktop_shell_set_background(struct wl_client *client,
surface->configure = background_configure;
surface->configure_private = shell;
surface->output = wl_resource_get_user_data(output_resource);
- uifw_trace("desktop_shell_set_background: send %08x 0 w/h=%d/%d",
+ uifw_debug("desktop_shell_set_background: send %08x 0 w/h=%d/%d",
(int)surface, surface->output->width, surface->output->height);
desktop_shell_send_configure(resource, 0,
surface_resource,
@@ -2695,7 +2695,7 @@ desktop_shell_set_panel(struct wl_client *client,
surface->configure = panel_configure;
surface->configure_private = shell;
surface->output = wl_resource_get_user_data(output_resource);
- uifw_trace("desktop_shell_set_panel: send %08x 0 w/h=%d/%d",
+ uifw_debug("desktop_shell_set_panel: send %08x 0 w/h=%d/%d",
(int)surface, surface->output->width, surface->output->height);
desktop_shell_send_configure(resource, 0,
surface_resource,
@@ -2711,7 +2711,7 @@ lock_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy, i
if (width == 0)
return;
- uifw_trace("lock_surface_configure: change %08x w/h=%d/%d", (int)surface, width, height);
+ uifw_debug("lock_surface_configure: change %08x w/h=%d/%d", (int)surface, width, height);
surface->geometry.width = width;
surface->geometry.height = height;
center_on_output(surface, get_default_output(shell->compositor));
@@ -3324,7 +3324,7 @@ shell_fade_create_surface(struct desktop_shell *shell)
if (!surface)
return NULL;
- uifw_trace("shell_fade_create_surface: configure %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("shell_fade_create_surface: configure %08x x/y=%d/%d w/h=%d/%d",
(int)surface, 0, 0, 8192, 8192);
weston_surface_configure(surface, 0, 0, 8192, 8192);
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0);
@@ -3528,7 +3528,7 @@ center_on_output(struct weston_surface *surface, struct weston_output *output)
x = output->x + (output->width - width) / 2 - surf_x / 2;
y = output->y + (output->height - height) / 2 - surf_y / 2;
- uifw_trace("center_on_output: %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("center_on_output: %08x x/y=%d/%d w/h=%d/%d",
(int)output, (int)x, (int)y, width, height);
weston_surface_configure(surface, x, y, width, height);
}
@@ -4014,7 +4014,7 @@ input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy, in
y = ip_surface->output->y + ip_surface->output->height - height;
}
- uifw_trace("input_panel_configure: configure %08x x/y=%d/%d w/h=%d/%d",
+ uifw_debug("input_panel_configure: configure %08x x/y=%d/%d w/h=%d/%d",
(int)surface, (int)x, (int)y, width, height);
weston_surface_configure(surface,
x, y,
diff --git a/src/ico_window_animation.c b/src/ico_window_animation.c
index 12ff474..8d008b4 100644
--- a/src/ico_window_animation.c
+++ b/src/ico_window_animation.c
@@ -46,10 +46,18 @@
/* Animation type */
#define ANIMA_ZOOM 1 /* ZoomIn/ZoomOut */
#define ANIMA_FADE 2 /* FadeIn/FadeOut */
-#define ANIMA_SLIDE_TORIGHT 3 /* SlideIn left to right/SlideOut right to left*/
-#define ANIMA_SLIDE_TOLEFT 4 /* SlideIn right to left/SlideOut left to right*/
-#define ANIMA_SLIDE_TOBOTTOM 5 /* SlideIn top to bottom/SlideOut bottom to top*/
-#define ANIMA_SLIDE_TOTOP 6 /* SlideIn bottom to top/SlideOut top to bottom*/
+#define ANIMA_SLIDE_TORIGHT 11 /* SlideIn left to right/SlideOut right to left */
+#define ANIMA_SLIDE_TOLEFT 12 /* SlideIn right to left/SlideOut left to right */
+#define ANIMA_SLIDE_TOBOTTOM 13 /* SlideIn top to bottom/SlideOut bottom to top */
+#define ANIMA_SLIDE_TOTOP 14 /* SlideIn bottom to top/SlideOut top to bottom */
+#define ANIMA_WIPE_TORIGHT 21 /* WipeIn left to right/WipeOut right to left */
+#define ANIMA_WIPE_TOLEFT 22 /* WipeIn right to left/WipeOut left to right */
+#define ANIMA_WIPE_TOBOTTOM 23 /* WipeIn top to bottom/WipeOut bottom to top */
+#define ANIMA_WIPE_TOTOP 24 /* WipeIn bottom to top/WipeOut top to bottom */
+#define ANIMA_SWING_TORIGHT 31 /* SwingIn left to right/SwingOut right to left */
+#define ANIMA_SWING_TOLEFT 32 /* SwingIn right to left/SwingOut left to right */
+#define ANIMA_SWING_TOBOTTOM 33 /* SwingIn top to bottom/SwingOut bottom to top */
+#define ANIMA_SWING_TOTOP 34 /* SwingIn bottom to top/SwingOut top to bottom */
/* Visible control at end of animation */
#define ANIMA_NOCONTROL_AT_END 0 /* no need surface show/hide at end of animation*/
@@ -73,10 +81,43 @@ static int animation_fps; /* animation frame rate(frame/sec)
static int animation_time; /* default animation time(ms) */
static struct animation_data *free_data; /* free data list */
+/* support animation names */
+static const struct _supprt_animaetions {
+ char *name;
+ int animaid;
+} supprt_animaetions[] = {
+ { "fade", ANIMA_FADE },
+ { "zoom", ANIMA_ZOOM },
+ { "slide", ANIMA_SLIDE_TOTOP },
+ { "slide.toleft", ANIMA_SLIDE_TOLEFT },
+ { "slide.toright", ANIMA_SLIDE_TORIGHT },
+ { "slide.totop", ANIMA_SLIDE_TOTOP },
+ { "slide.tobottom", ANIMA_SLIDE_TOBOTTOM },
+ { "wipe", ANIMA_WIPE_TOTOP },
+ { "wipe.toleft", ANIMA_WIPE_TOLEFT },
+ { "wipe.toright", ANIMA_WIPE_TORIGHT },
+ { "wipe.totop", ANIMA_WIPE_TOTOP },
+ { "wipe.tobottom", ANIMA_WIPE_TOBOTTOM },
+ { "swing", ANIMA_SWING_TOTOP },
+ { "swing.toleft", ANIMA_SWING_TOLEFT },
+ { "swing.toright", ANIMA_SWING_TORIGHT },
+ { "swing.totop", ANIMA_SWING_TOTOP },
+ { "swing.tobottom", ANIMA_SWING_TOBOTTOM },
+ { "\0", -1 }
+};
+
/* static function */
/* slide animation */
static void animation_slide(struct weston_animation *animation,
struct weston_output *output, uint32_t msecs);
+ /* wipe animation */
+static void animation_wipe(struct weston_animation *animation,
+ struct weston_output *output, uint32_t msecs);
+ /* swing animation */
+static void animation_swing(struct weston_animation *animation,
+ struct weston_output *output, uint32_t msecs);
+ /* swing animation end */
+static void animation_swing_end(struct weston_animation *animation);
/* fade animation */
static void animation_fade(struct weston_animation *animation,
struct weston_output *output, uint32_t msecs);
@@ -110,36 +151,19 @@ ico_window_animation(const int op, void *data)
{
struct uifw_win_surface *usurf;
struct weston_output *output;
+ int idx;
int ret;
uint32_t nowsec;
int animaid;
if (op == ICO_WINDOW_MGR_ANIMATION_NAME) {
/* convert animation name to animation type value */
- if (strcasecmp((char *)data, "fade") == 0) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_FADE);
- return ANIMA_FADE;
- }
- else if (strcasecmp((char *)data, "zoom") == 0) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_ZOOM);
- return ANIMA_ZOOM;
- }
- else if (strcasecmp((char *)data, "slide.toleft") == 0) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOLEFT);
- return ANIMA_SLIDE_TOLEFT;
- }
- else if (strcasecmp((char *)data, "slide.toright") == 0) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TORIGHT);
- return ANIMA_SLIDE_TORIGHT;
- }
- else if ((strcasecmp((char *)data, "slide.totop") == 0) ||
- (strcasecmp((char *)data, "slide") == 0)) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOTOP);
- return ANIMA_SLIDE_TOTOP;
- }
- else if (strcasecmp((char *)data, "slide.tobottom") == 0) {
- uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOBOTTOM);
- return ANIMA_SLIDE_TOBOTTOM;
+ for (idx = 0; supprt_animaetions[idx].animaid > 0; idx++) {
+ if (strcasecmp(supprt_animaetions[idx].name, (char *)data) == 0) {
+ uifw_trace("ico_window_animation: Type %s(%d)",
+ (char *)data, supprt_animaetions[idx].animaid);
+ return supprt_animaetions[idx].animaid;
+ }
}
uifw_warn("ico_window_animation: Unknown Type %s", (char *)data);
return ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
@@ -150,7 +174,7 @@ ico_window_animation(const int op, void *data)
if (op == ICO_WINDOW_MGR_ANIMATION_DESTROY) {
if ((usurf->animation.state != ICO_WINDOW_MGR_ANIMATION_STATE_NONE) ||
(usurf->animation.animadata != NULL)) {
- uifw_trace("ico_window_animation: Destroy %08x", (int)usurf);
+ uifw_trace("ico_window_animation: Destroy %08x", usurf->surfaceid);
animation_end(usurf, 0);
}
return ICO_WINDOW_MGR_ANIMATION_RET_ANIMA;
@@ -260,6 +284,18 @@ ico_window_animation(const int op, void *data)
usurf->restrain_configure = 1;
(*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 1);
}
+ else if ((animaid == ANIMA_WIPE_TOLEFT) || (animaid == ANIMA_WIPE_TORIGHT) ||
+ (animaid == ANIMA_WIPE_TOTOP) || (animaid == ANIMA_WIPE_TOBOTTOM)) {
+ usurf->animation.animation.frame = animation_wipe;
+ usurf->restrain_configure = 1;
+ (*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 1);
+ }
+ else if ((animaid == ANIMA_SWING_TOLEFT) || (animaid == ANIMA_SWING_TORIGHT) ||
+ (animaid == ANIMA_SWING_TOTOP) || (animaid == ANIMA_SWING_TOBOTTOM)) {
+ usurf->animation.animation.frame = animation_swing;
+ usurf->restrain_configure = 1;
+ (*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 1);
+ }
else if (animaid == ANIMA_FADE) {
usurf->animation.animation.frame = animation_fade;
usurf->restrain_configure = 1;
@@ -476,8 +512,8 @@ animation_slide(struct weston_animation *animation,
}
par = usurf->animation.current;
- uifw_trace("animation_slide: usurf=%08x count=%d %d%% anima=%d state=%d",
- (int)usurf, animation->frame_counter, par,
+ uifw_trace("animation_slide: %08x count=%d %d%% anima=%d state=%d",
+ usurf->surfaceid, animation->frame_counter, par,
usurf->animation.anima, usurf->animation.state);
es = usurf->surface;
@@ -557,6 +593,277 @@ animation_slide(struct weston_animation *animation,
/*--------------------------------------------------------------------------*/
/**
+ * @brief animation_wipe: wipe animation
+ *
+ * @param[in] animation weston animation table
+ * @param[in] outout weston output table
+ * @param[in] mseces current time(unused)
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+animation_wipe(struct weston_animation *animation,
+ struct weston_output *output, uint32_t msecs)
+{
+ struct uifw_win_surface *usurf;
+ struct weston_surface *es;
+ int par;
+ int x;
+ int y;
+ int width;
+ int height;
+
+ usurf = container_of(animation, struct uifw_win_surface, animation.animation);
+
+ par = animation_cont(animation, output, msecs);
+ if (par > 0) {
+ /* continue animation */
+ if( par <= 100) {
+ weston_compositor_schedule_repaint(weston_ec);
+ }
+ return;
+ }
+ par = usurf->animation.current;
+
+ uifw_trace("animation_wipe: %08x count=%d %d%% anima=%d state=%d",
+ usurf->surfaceid, animation->frame_counter, par,
+ usurf->animation.anima, usurf->animation.state);
+
+ es = usurf->surface;
+ x = usurf->x;
+ y = usurf->y;
+ width = usurf->width;
+ height = usurf->width;
+
+ if (par < 100) {
+ switch (usurf->animation.anima) {
+ case ANIMA_WIPE_TORIGHT: /* wipe in left to right */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* wipe in left to right */
+ width = ((float)width) * ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* wipe out right to left */
+ width = width - (((float)width) * ((float)par + 5.0f) / 105.0f);
+ }
+ if (width <= 0) width = 1;
+ break;
+ case ANIMA_WIPE_TOLEFT: /* wipe in right to left */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* wipe in right to left */
+ width = ((float)width) * ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* wipe out left to right */
+ width = width - (((float)width) * ((float)par + 5.0f) / 105.0f);
+ }
+ if (width <= 0) width = 1;
+ x = x + (usurf->width - width);
+ break;
+ case ANIMA_WIPE_TOBOTTOM: /* wipe in top to bottom */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* wipe in top to bottom */
+ height = ((float)height) * ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* wipe out bottom to top */
+ height = height - (((float)height) * ((float)par + 5.0f) / 105.0f);
+ }
+ if (height <= 0) height = 1;
+ break;
+ default: /*ANIMA_WIPE_TOTOP*/ /* wipe in bottom to top */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* wipe in bottom to top */
+ height = ((float)height) * ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* wipe out top to bottom */
+ height = height - (((float)height) * ((float)par + 5.0f) / 105.0f);
+ }
+ if (height <= 0) height = 1;
+ y = y + (usurf->height - height);
+ break;
+ }
+ }
+
+ es->geometry.x = usurf->node_tbl->disp_x + x;
+ es->geometry.y = usurf->node_tbl->disp_y + y;
+ es->geometry.width = width;
+ es->geometry.height = height;
+ if ((es->output) && (es->buffer_ref.buffer)) {
+ weston_surface_geometry_dirty(es);
+ weston_surface_damage(es);
+ }
+ if (par >= 100) {
+ /* end of animation */
+ animation_end(usurf, 1);
+ uifw_trace("animation_wipe: End of animation");
+ }
+ else {
+ /* continue animation */
+ weston_compositor_schedule_repaint(weston_ec);
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief animation_swing: swing animation
+ *
+ * @param[in] animation weston animation table
+ * @param[in] outout weston output table
+ * @param[in] mseces current time(unused)
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+animation_swing(struct weston_animation *animation,
+ struct weston_output *output, uint32_t msecs)
+{
+ struct uifw_win_surface *usurf;
+ struct weston_surface *es;
+ struct animation_data *animadata;
+ int par;
+ int x;
+ int y;
+ float scalex;
+ float scaley;
+
+ usurf = container_of(animation, struct uifw_win_surface, animation.animation);
+
+ par = animation_cont(animation, output, msecs);
+ if (par > 0) {
+ /* continue animation */
+ if( par <= 100) {
+ weston_compositor_schedule_repaint(weston_ec);
+ }
+ return;
+ }
+
+ uifw_trace("animation_swing: %08x count=%d %d%% anima=%d state=%d",
+ usurf->surfaceid, animation->frame_counter, par,
+ usurf->animation.anima, usurf->animation.state);
+
+ animadata = (struct animation_data *)usurf->animation.animadata;
+ es = usurf->surface;
+ par = usurf->animation.current;
+ if (animation->frame_counter == 1) {
+ if (animadata->transform_set == 0) {
+ animadata->transform_set = 1;
+ weston_matrix_init(&animadata->transform.matrix);
+ wl_list_init(&animadata->transform.link);
+ wl_list_insert(&es->geometry.transformation_list,
+ &animadata->transform.link);
+ }
+ animadata->end_function = animation_swing_end;
+ }
+
+ x = usurf->x;
+ y = usurf->y;
+ scalex = 1.0;
+ scaley = 1.0;
+
+ if (par < 100) {
+ switch (usurf->animation.anima) {
+ case ANIMA_SWING_TORIGHT: /* swing in left to right */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* swing in left to right */
+ scalex = ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* swing out right to left */
+ scalex = 1.0 - (((float)par + 5.0f) / 105.0f);
+ }
+ if (scalex <= 0.0) scalex = 0.01;
+ break;
+ case ANIMA_SWING_TOLEFT: /* seing in right to left */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* swing in right to left */
+ scalex = ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* swing out left to right */
+ scalex = 1.0 - (((float)par + 5.0f) / 105.0f);
+ }
+ if (scalex <= 0.0) scalex = 0.01;
+ x = x + (int)((float)usurf->width * (1.0f - scalex));
+ break;
+ case ANIMA_SWING_TOBOTTOM: /* swing in top to bottom */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* swing in top to bottom */
+ scaley = ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* swing out bottom to top */
+ scalex = 1.0 - (((float)par + 5.0f) / 105.0f);
+ }
+ if (scaley <= 0.0) scaley = 0.01;
+ break;
+ default: /*ANIMA_SWING*/ /* swing in bottom to top */
+ if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
+ /* wipe in bottom to top */
+ scaley = ((float)par + 5.0f) / 105.0f;
+ }
+ else {
+ /* wipe out top to bottom */
+ scalex = 1.0 - (((float)par + 5.0f) / 105.0f);
+ }
+ if (scaley <= 0.0) scaley = 0.01;
+ y = y + (int)((float)usurf->height * (1.0f - scaley));
+ break;
+ }
+ }
+
+ es->geometry.x = usurf->node_tbl->disp_x + x;
+ es->geometry.y = usurf->node_tbl->disp_y + y;
+ weston_matrix_init(&animadata->transform.matrix);
+ weston_matrix_translate(&animadata->transform.matrix,
+ -0.5f * usurf->width, -0.5f * usurf->height, 0);
+ weston_matrix_scale(&animadata->transform.matrix, scalex, scaley, 1.0f);
+ weston_matrix_translate(&animadata->transform.matrix,
+ 0.5f * usurf->width, 0.5f * usurf->height, 0);
+
+ if ((es->output) && (es->buffer_ref.buffer)) {
+ weston_surface_geometry_dirty(es);
+ weston_surface_damage(es);
+ }
+ if (par >= 100) {
+ /* end of animation */
+ animation_end(usurf, 1);
+ uifw_trace("animation_swing: End of animation");
+ }
+ else {
+ /* continue animation */
+ weston_compositor_schedule_repaint(weston_ec);
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief animation_swing_end: swing animation end
+ *
+ * @param[in] animation weston animation table
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+animation_swing_end(struct weston_animation *animation)
+{
+ struct uifw_win_surface *usurf;
+ struct weston_surface *es;
+
+ usurf = container_of(animation, struct uifw_win_surface, animation.animation);
+ if (usurf && usurf->surface) {
+ es = usurf->surface;
+ es->alpha = 1.0;
+
+ if ((es->output) && (es->buffer_ref.buffer)) {
+ weston_surface_damage(es);
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief animation_fade: fade animation
*
* @param[in] animation weston animation table
@@ -636,8 +943,8 @@ animation_fade(struct weston_animation *animation,
if (es->alpha < 0.0) es->alpha = 0.0;
else if (es->alpha > 1.0) es->alpha = 1.0;
- uifw_trace("animation_fade: usurf=%08x count=%d %d%% alpha=%1.2f anima=%d state=%d",
- (int)usurf, animation->frame_counter, par, es->alpha,
+ uifw_trace("animation_fade: %08x count=%d %d%% alpha=%1.2f anima=%d state=%d",
+ usurf->surfaceid, animation->frame_counter, par, es->alpha,
usurf->animation.anima, usurf->animation.state);
if ((es->output) && (es->buffer_ref.buffer) &&
@@ -764,8 +1071,8 @@ animation_zoom(struct weston_animation *animation,
+ (((float)usurf->width * scalex) - (float)usurf->width) / 2.0f;
y = (((float)usurf->animation.pos_y) - ((float)usurf->y)) * fp + (float)usurf->y
+ (((float)usurf->height * scaley) - (float) usurf->height) / 2.0f;
- uifw_trace("animation_zoom: usurf=%08x %d%% x=%d/%d y=%d/%d",
- (int)usurf, par, x, usurf->x, y, usurf->y);
+ uifw_trace("animation_zoom: %08x %d%% x=%d/%d y=%d/%d",
+ usurf->surfaceid, par, x, usurf->x, y, usurf->y);
uifw_trace("animation_zoom: sx=%4.2f sy=%4.2f x=%d->%d y=%d->%d cur=%d,%d",
scalex, scaley, usurf->animation.pos_x, usurf->x,
usurf->animation.pos_y, usurf->y, x, y);
@@ -777,9 +1084,9 @@ animation_zoom(struct weston_animation *animation,
weston_matrix_scale(&animadata->transform.matrix, scalex, scaley, 1.0f);
weston_matrix_translate(&animadata->transform.matrix,
0.5f * usurf->width, 0.5f * usurf->height, 0);
-
- uifw_trace("animation_zoom: usurf=%08x count=%d %d%% w=%d/%d h=%d/%d anima=%d state=%d",
- (int)usurf, animation->frame_counter, par,
+
+ uifw_trace("animation_zoom: %08x count=%d %d%% w=%d/%d h=%d/%d anima=%d state=%d",
+ usurf->surfaceid, animation->frame_counter, par,
(int)(usurf->width * scalex), usurf->width,
(int)(usurf->height * scaley), usurf->height,
usurf->animation.anima, usurf->animation.state);
diff --git a/src/ico_window_mgr.c b/src/ico_window_mgr.c
index 608f842..0e6c811 100644
--- a/src/ico_window_mgr.c
+++ b/src/ico_window_mgr.c
@@ -68,12 +68,14 @@
/* show/hide animation with position */
#define ICO_WINDOW_MGR_ANIMATION_POS 0x10000000
-/* wl_drm_buffer (inport from mesa-9.1.3/src/egl/wayland/wayland-drm/wayland-drm.h) */
+/* wl_buffer (inport from wayland-1.2.0/src/wayland-server.h) */
struct uifw_wl_buffer {
struct wl_resource resource;
int32_t width, height;
uint32_t busy_count;
};
+
+/* wl_drm_buffer (inport from mesa-9.1.3/src/egl/wayland/wayland-drm/wayland-drm.h) */
struct uifw_drm_buffer {
struct uifw_wl_buffer buffer;
void *drm; /* struct wl_drm */
@@ -517,6 +519,44 @@ ico_window_mgr_get_usurf(const uint32_t surfaceid)
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_window_mgr_get_usurf_client: find UIFW surface by surface id/or client
+ *
+ * @param[in] surfaceid UIFW surface id
+ * @param[in] client Wayland client
+ * @return UIFW surface table address
+ * @retval !=NULL success(surface table address)
+ * @retval NULL error(surface id or client dose not exist)
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT struct uifw_win_surface *
+ico_window_mgr_get_usurf_client(const uint32_t surfaceid, struct wl_client *client)
+{
+ struct uifw_win_surface *usurf;
+ struct uifw_client *uclient;
+
+ if (surfaceid == ICO_WINDOW_MGR_V_MAINSURFACE) {
+ uclient = find_client_from_client(client);
+ if (uclient) {
+ if (&uclient->surface_link != uclient->surface_link.next) {
+ usurf = container_of(uclient->surface_link.next,
+ struct uifw_win_surface, client_link);
+ }
+ else {
+ usurf = NULL;
+ }
+ }
+ else {
+ usurf = NULL;
+ }
+ }
+ else {
+ usurf = ico_window_mgr_get_usurf(surfaceid);
+ }
+ return usurf;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief find_uifw_win_surface_by_ws: find UIFW surface by weston surface
*
* @param[in] wsurf Weston surface
@@ -770,8 +810,6 @@ win_mgr_get_client_appid(struct uifw_client *uclient)
int j;
char procpath[128];
- uifw_trace("win_mgr_get_client_appid: Enter(pid=%d)", uclient->pid);
-
memset(uclient->appid, 0, ICO_IVI_APPID_LENGTH);
i = aul_app_get_appid_bypid(uclient->pid, uclient->appid, ICO_IVI_APPID_LENGTH);
uifw_trace("win_mgr_get_client_appid: aul_app_get_appid_bypid ret=%d "
@@ -781,11 +819,8 @@ win_mgr_get_client_appid(struct uifw_client *uclient)
uclient->fixed_appid = ICO_WINDOW_MGR_APPID_FIXCOUNT;
}
else {
- uclient->fixed_appid ++;
/* client dose not exist in AppCore, search Linux process table */
- uifw_trace("win_mgr_get_client_appid: pid=%d dose not exist in AppCore(AUL)",
- uclient->pid);
-
+ uclient->fixed_appid ++;
memset(uclient->appid, 0, ICO_IVI_APPID_LENGTH);
snprintf(procpath, sizeof(procpath)-1, "/proc/%d/cmdline", uclient->pid);
fd = open(procpath, O_RDONLY);
@@ -835,8 +870,6 @@ win_mgr_get_client_appid(struct uifw_client *uclient)
sprintf(uclient->appid, "?%d?", uclient->pid);
}
}
- uifw_trace("win_mgr_get_client_appid: Leave(pid=%d,appid=%s)",
- uclient->pid, uclient->appid);
}
/*--------------------------------------------------------------------------*/
@@ -1122,8 +1155,8 @@ ico_window_mgr_restack_layer(struct uifw_win_surface *usurf, const int omit_touc
num_visible ++;
}
else {
- new_x = (float)(ICO_IVI_MAX_COORDINATE+1);
- new_y = (float)(ICO_IVI_MAX_COORDINATE+1);
+ new_x = (float)(es->x + es->node_tbl->disp_x + es->xadd);
+ new_y = (float)(es->y + es->node_tbl->disp_y + es->yadd);
}
wl_list_insert(wlayer->surface_list.prev, &es->surface->layer_link);
if ((new_x != es->surface->geometry.x) ||
@@ -1133,8 +1166,9 @@ ico_window_mgr_restack_layer(struct uifw_win_surface *usurf, const int omit_touc
weston_surface_damage(es->surface);
}
#if 0 /* too many debug log */
- uifw_trace("ico_window_mgr_restack_layer: %08x x/y=%d/%d w/h=%d/%d",
- es->surfaceid,
+ uifw_debug("ico_window_mgr_restack_layer:%3d(%d).%08x(%d) "
+ "x/y=%d/%d w/h=%d/%d",
+ el->layer, el->visible, es->surfaceid, es->visible,
(int)es->surface->geometry.x, (int)es->surface->geometry.y,
es->surface->geometry.width, es->surface->geometry.height);
#endif
@@ -1235,8 +1269,8 @@ win_mgr_set_layer(struct uifw_win_surface *usurf, const uint32_t layer)
struct uifw_win_layer *el;
struct uifw_win_layer *new_el;
- uifw_trace("win_mgr_set_layer: Enter([%08x],%08x,%x)",
- (int)usurf, (int)usurf->surface, layer);
+ uifw_trace("win_mgr_set_layer: Enter(%08x,%08x,%x)",
+ usurf->surfaceid, (int)usurf->surface, layer);
/* check if same layer */
if ((usurf->win_layer != NULL) && (usurf->win_layer->layer == layer)) {
@@ -1437,11 +1471,9 @@ uifw_declare_manager(struct wl_client *client, struct wl_resource *resource, int
/*--------------------------------------------------------------------------*/
/**
- * @brief uifw_set_window_layer: set layer id to surface
+ * @brief win_mgr_set_layer: set(or change) surface layer
*
- * @param[in] client Weyland client
- * @param[in] resource resource of request
- * @param[in] surfaceid UIFW surface id
+ * @param[in] usurf UIFW surface
* @param[in] layer layer id
* @return none
*/
@@ -1450,10 +1482,10 @@ static void
uifw_set_window_layer(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, uint32_t layer)
{
- uifw_trace("uifw_set_window_layer: Enter res=%08x surfaceid=%08x layer=%d",
- (int)resource, surfaceid, layer);
+ struct uifw_win_layer *el;
+ struct uifw_win_layer *new_el;
- struct uifw_win_surface *usurf = ico_window_mgr_get_usurf(surfaceid);
+ struct uifw_win_surface *usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
if (! usurf) {
uifw_trace("uifw_set_window_layer: Leave(No Surface(id=%08x))", surfaceid);
@@ -1464,7 +1496,28 @@ uifw_set_window_layer(struct wl_client *client, struct wl_resource *resource,
win_mgr_change_surface(usurf->surface, -1, 1);
}
- uifw_trace("uifw_set_window_layer: Leave");
+
+ if (&el->link == &_ico_win_mgr->ivi_layer_list) {
+ /* layer not exist, create new layer */
+ uifw_trace("win_mgr_set_layer: New Layer %d", layer);
+ new_el = win_mgr_create_layer(usurf, layer);
+ if (! new_el) {
+ uifw_trace("win_mgr_set_layer: Leave(No Memory)");
+ return;
+ }
+ }
+ else {
+ uifw_trace("win_mgr_set_layer: Add surface to Layer %d", layer);
+ wl_list_remove(&usurf->ivi_layer);
+ wl_list_insert(&el->surface_list, &usurf->ivi_layer);
+ usurf->win_layer = el;
+ }
+
+ /* rebild compositor surface list */
+ if (usurf->visible) {
+ ico_window_mgr_restack_layer(usurf, 0);
+ }
+ uifw_trace("win_mgr_set_layer: Leave");
}
/*--------------------------------------------------------------------------*/
@@ -1489,6 +1542,7 @@ uifw_set_positionsize(struct wl_client *client, struct wl_resource *resource,
int32_t width, int32_t height, int32_t flags)
{
struct uifw_client *uclient;
+ struct uifw_win_surface *usurf;
struct weston_surface *es;
int op;
int retanima;
@@ -1496,16 +1550,28 @@ uifw_set_positionsize(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_set_positionsize: Enter surf=%08x node=%x x/y/w/h=%d/%d/%d/%d flag=%x",
surfaceid, node, x, y, width, height, flags);
+ usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
+ if (! usurf) {
+ uifw_trace("uifw_set_positionsize: Leave(surf=%08x NOT Found)", surfaceid);
+ return;
+ }
+
+ uclient = find_client_from_client(client);
+
+ usurf->disable = 0;
if (((int)node) >= _ico_num_nodes) {
uifw_trace("uifw_set_positionsize: node=%d dose not exist(max=%d)",
node, _ico_num_nodes);
+ if ((ico_ivi_debugflag() & ICO_IVI_DEBUG_SHOW_SURFACE) == 0) {
+ usurf->disable = 1;
+ }
node = 0;
}
- struct uifw_win_surface *usurf = ico_window_mgr_get_usurf(surfaceid);
+ usurf->node_tbl = &_ico_node_table[node];
- if (usurf && (usurf->surface)) {
+ es = usurf->surface;
+ if (es) {
/* weston surface exist */
- usurf->node_tbl = &_ico_node_table[node];
es = usurf->surface;
retanima = ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
@@ -1523,9 +1589,9 @@ uifw_set_positionsize(struct wl_client *client, struct wl_resource *resource,
return;
}
- uclient = find_client_from_client(client);
if (uclient) {
- if (! uclient->manager) uclient = NULL;
+ if ((surfaceid != ICO_WINDOW_MGR_V_MAINSURFACE) &&
+ (uclient->manager == 0)) uclient = NULL;
}
if (! uclient) {
if ((usurf->width > 0) && (usurf->height > 0)) {
@@ -1601,7 +1667,11 @@ uifw_set_positionsize(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_set_positionsize: Leave(OK,output=%08x)", (int)es->output);
}
else {
- uifw_trace("uifw_set_positionsize: Leave(surf=%08x NOT Found)", surfaceid);
+ usurf->x = x;
+ usurf->y = y;
+ usurf->width = width;
+ usurf->height = height;
+ uifw_trace("uifw_set_positionsize: Leave(OK,but no buffer)");
}
}
@@ -1630,9 +1700,16 @@ uifw_set_visible(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_set_visible: Enter(surf=%08x,%d,%d,%x)",
surfaceid, visible, raise, flags);
+ usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
+ if ((! usurf) || (! usurf->surface)) {
+ uifw_trace("uifw_set_visible: Leave(Surface Not Exist)");
+ return;
+ }
+
uclient = find_client_from_client(client);
if (uclient) {
- if (! uclient->manager) {
+ if ((surfaceid != ICO_WINDOW_MGR_V_MAINSURFACE) &&
+ (uclient->manager == 0)) {
uifw_trace("uifw_set_visible: Request from App(%s), not Manager",
uclient->appid);
uclient = NULL;
@@ -1645,15 +1722,9 @@ uifw_set_visible(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_set_visible: Request from Unknown App, not Manager");
}
- usurf = ico_window_mgr_get_usurf(surfaceid);
-
- if ((! usurf) || (! usurf->surface)) {
- uifw_trace("uifw_set_visible: Leave(Surface Not Exist)");
- return;
- }
restack = 0;
- if (visible == ICO_WINDOW_MGR_VISIBLE_SHOW) {
+ if ((usurf->disable == 0) && (visible == ICO_WINDOW_MGR_VISIBLE_SHOW)) {
if (! usurf->visible) {
usurf->visible = 1;
@@ -1791,7 +1862,7 @@ uifw_set_animation(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, int32_t type, const char *animation, int32_t time)
{
int animaid;
- struct uifw_win_surface *usurf = ico_window_mgr_get_usurf(surfaceid);
+ struct uifw_win_surface *usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
uifw_trace("uifw_set_transition: Enter(surf=%08x,type=%x,anim=%s,time=%d)",
surfaceid, type, animation, time);
@@ -1870,7 +1941,7 @@ static void
uifw_set_attributes(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, uint32_t attributes)
{
- struct uifw_win_surface *usurf = ico_window_mgr_get_usurf(surfaceid);
+ struct uifw_win_surface *usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
uifw_trace("uifw_set_attributes: Enter(surf=%08x,attributes=%x)", surfaceid, attributes);
@@ -1915,7 +1986,7 @@ uifw_visible_animation(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_visible_animation: Enter(%08x,%d,x/y=%d/%d,w/h=%d/%d)",
surfaceid, visible, x, y, width, height);
- usurf = ico_window_mgr_get_usurf(surfaceid);
+ usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
if ((! usurf) || (! usurf->surface)) {
uifw_trace("uifw_visible_animation: Leave(Surface Not Exist)");
@@ -1957,7 +2028,7 @@ uifw_set_active(struct wl_client *client, struct wl_resource *resource,
if ((surfaceid > 0) &&
((active & (ICO_WINDOW_MGR_ACTIVE_POINTER|ICO_WINDOW_MGR_ACTIVE_KEYBOARD)) != 0)) {
- usurf = ico_window_mgr_get_usurf(surfaceid);
+ usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
}
else {
usurf = NULL;
@@ -2357,7 +2428,7 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
es = usurf->surface;
/* check if buffered */
- if (es == NULL) {
+ if ((es == NULL) || (es->buffer_ref.buffer == NULL)) {
/* surface has no buffer, error */
ico_window_mgr_send_map_surface(resource, ICO_WINDOW_MGR_MAP_SURFACE_EVENT_ERROR,
surfaceid, 3, 0, 0, 0, 0, 0);
@@ -2367,15 +2438,13 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
/* check buffer type */
gl_state = (struct uifw_gl_surface_state *)es->renderer_state;
- if (gl_state) {
- if (gl_state->buffer_type == BUFFER_TYPE_SHM) {
- /* wl_shm_buffer not support */
- ico_window_mgr_send_map_surface(resource, ICO_WINDOW_MGR_MAP_SURFACE_EVENT_ERROR,
- surfaceid, 4, 0, 0, 0, 0, 0);
- uifw_trace("uifw_map_surface: Leave(surface(%08x) is wl_shm_buffer, "
- "not support)", surfaceid);
- return;
- }
+ if ((gl_state == NULL) || (gl_state->buffer_type == BUFFER_TYPE_SHM)) {
+ /* wl_shm_buffer not support */
+ ico_window_mgr_send_map_surface(resource, ICO_WINDOW_MGR_MAP_SURFACE_EVENT_ERROR,
+ surfaceid, 4, 0, 0, 0, 0, 0);
+ uifw_trace("uifw_map_surface: Leave(surface(%08x) is wl_shm_buffer, "
+ "not support)", surfaceid);
+ return;
}
/* create map table */
@@ -2405,8 +2474,7 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
wl_list_insert(usurf->surf_map.prev, &sm->surf_link);
buffer = es->buffer_ref.buffer;
- if ((buffer != NULL) && (gl_state != NULL) &&
- (gl_state->buffer_type == BUFFER_TYPE_EGL)) {
+ if (gl_state->buffer_type == BUFFER_TYPE_EGL) {
sm->width = buffer->width;
sm->height = buffer->height;
drm_buffer = (struct uifw_drm_buffer *)buffer->legacy_buffer;
diff --git a/src/ico_window_mgr.h b/src/ico_window_mgr.h
index 551bf28..3add4ad 100644
--- a/src/ico_window_mgr.h
+++ b/src/ico_window_mgr.h
@@ -113,13 +113,14 @@ struct uifw_win_surface {
uint16_t conf_height; /* Height that notified to client */
uint32_t attributes; /* surface attributes */
char winname[ICO_IVI_WINNAME_LENGTH];/* Window name */
+ char disable; /* can not display */
char visible; /* visibility */
char raise; /* raise(top of the layer) */
char created; /* sended created event to manager */
char mapped; /* end of map */
char restrain_configure; /* restrant configure event */
char set_transform; /* surface transform flag */
- char res[2]; /* (unused) */
+ char res; /* (unused) */
struct _uifw_win_surface_animation { /* wndow animation */
struct weston_animation animation; /* weston animation control */
uint16_t type; /* current animation type */
@@ -204,6 +205,9 @@ void ico_window_mgr_change_surface(struct uifw_win_surface *usurf,
struct uifw_client *ico_window_mgr_get_uclient(const char *appid);
/* get UIFW surface table */
struct uifw_win_surface *ico_window_mgr_get_usurf(const uint32_t surfaceid);
+ /* get UIFW surface table */
+struct uifw_win_surface *ico_window_mgr_get_usurf_client(const uint32_t surfaceid,
+ struct wl_client *client);
/* get application surface */
struct uifw_win_surface *ico_window_mgr_get_client_usurf(const char *appid,
const char *winname);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5b664ea..f024ebc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -25,7 +25,7 @@ test_wayland_client = -lwayland-client
test_send_event_SOURCES = test-send_event.c $(test_common_src)
test_send_event_LDADD = $(SIMPLE_CLIENT_LIBS) $(test_wayland_client)
-test_homescreen_SOURCES = test-homescreen.c $(test_common_src)
+test_homescreen_SOURCES = test-homescreen.c $(test_common_src) test-thumbnail.c
test_homescreen_LDADD = $(SIMPLE_CLIENT_LIBS) $(test_protocol_lib) $(test_wayland_client)
test_client_SOURCES = test-client.c $(test_common_src)
diff --git a/tests/test-common.h b/tests/test-common.h
index 549b8f8..e7b2bc2 100644
--- a/tests/test-common.h
+++ b/tests/test-common.h
@@ -47,6 +47,9 @@ EGLSurface opengl_create_window(struct wl_display *display, struct wl_surface *s
const int width, const int height, const int color);
void opengl_clear_window(const unsigned int color);
void opengl_swap_buffer(struct wl_display *display, EGLDisplay dpy, EGLSurface egl_surface);
+void opengl_thumbnail(struct wl_display *display, uint32_t surfaceid, EGLDisplay dpy,
+ EGLContext ctx, uint32_t name, int width, int height, int stride,
+ uint32_t format);
#endif /*_TEST_COMMON_H_*/
diff --git a/tests/test-homescreen.c b/tests/test-homescreen.c
index 02b4366..bd1f3ea 100644
--- a/tests/test-homescreen.c
+++ b/tests/test-homescreen.c
@@ -78,11 +78,6 @@ struct display {
struct input *input;
int num_output;
struct output *output[MAX_OUTPUT];
-#if 0 /* 2013/08/23 no need shm */
- struct wl_shm *shm;
- void *shm_buf;
- struct wl_shm_pool *shm_pool;
-#endif
struct surface *surface;
struct surface_name *surface_name;
struct surface_name *bgsurface_name;
@@ -242,33 +237,33 @@ static void
touch_handle_down(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time,
struct wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y)
{
- print_log("CLIENT: got touch down %d (%d,%d)", id, x/256, y/256);
+ print_log("HOMESCREEN: got touch down %d (%d,%d)", id, x/256, y/256);
}
static void
touch_handle_up(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time,
int32_t id)
{
- print_log("CLIENT: got touch up %d", id);
+ print_log("HOMESCREEN: got touch up %d", id);
}
static void
touch_handle_motion(void *data, struct wl_touch *wl_touch, uint32_t time,
int32_t id, wl_fixed_t x, wl_fixed_t y)
{
- print_log("CLIENT: got touch motion %d (%d,%d)", id, x/256, y/256);
+ print_log("HOMESCREEN: got touch motion %d (%d,%d)", id, x/256, y/256);
}
static void
touch_handle_frame(void *data, struct wl_touch *wl_touch)
{
- print_log("CLIENT: got touch frame");
+ print_log("HOMESCREEN: got touch frame");
}
static void
touch_handle_cancel(void *data, struct wl_touch *wl_touch)
{
- print_log("CLIENT: got touch cancel");
+ print_log("HOMESCREEN: got touch cancel");
}
static const struct wl_pointer_listener pointer_listener = {
@@ -301,32 +296,40 @@ seat_handle_capabilities(void *data, struct wl_seat *seat,
{
struct input *input = data;
+ print_log("HOMESCREEN: seat_handle_capabilities caps=%x", caps);
+
if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) {
input->pointer = wl_seat_get_pointer(seat);
+ print_log("HOMESCREEN: seat_handle_capabilities add pointer=%x", (int)input->pointer);
wl_pointer_set_user_data(input->pointer, input);
wl_pointer_add_listener(input->pointer, &pointer_listener, input);
}
else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && input->pointer) {
+ print_log("HOMESCREEN: seat_handle_capabilities delete pointer");
wl_pointer_destroy(input->pointer);
input->pointer = NULL;
}
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !input->keyboard) {
input->keyboard = wl_seat_get_keyboard(seat);
+ print_log("HOMESCREEN: seat_handle_capabilities add keyboard=%x", (int)input->keyboard);
wl_keyboard_set_user_data(input->keyboard, input);
wl_keyboard_add_listener(input->keyboard, &keyboard_listener, input);
}
else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && input->keyboard) {
+ print_log("HOMESCREEN: seat_handle_capabilities delete keyboard");
wl_keyboard_destroy(input->keyboard);
input->keyboard = NULL;
}
if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) {
input->touch = wl_seat_get_touch(seat);
+ print_log("HOMESCREEN: seat_handle_capabilities add touch=%x", (int)input->touch);
wl_touch_set_user_data(input->touch, input);
wl_touch_add_listener(input->touch, &touch_listener, input);
}
else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) {
+ print_log("HOMESCREEN: seat_handle_capabilities delete touch");
wl_touch_destroy(input->touch);
input->touch = NULL;
}
@@ -694,6 +697,7 @@ window_map(void *data, struct ico_window_mgr *ico_window_mgr,
int32_t event, uint32_t surfaceid, uint32_t type, uint32_t target,
int32_t width, int32_t height, int32_t stride, uint32_t format)
{
+ struct display *display = data;
char sevt[16];
switch (event) {
@@ -706,13 +710,18 @@ window_map(void *data, struct ico_window_mgr *ico_window_mgr,
case ICO_WINDOW_MGR_MAP_SURFACE_EVENT_UNMAP:
strcpy(sevt, "Unmap"); break;
case ICO_WINDOW_MGR_MAP_SURFACE_EVENT_ERROR:
- sprintf(sevt, "Error %d", target); break;
+ sprintf(sevt, "Error %d", type); break;
default:
sprintf(sevt, "??%d??", event); break;
}
print_log("HOMESCREEN: Event[map_surface] ev=%s(%d) surf=%08x type=%d target=%x "
"w/h/s/f=%d/%d/%d/%x",
sevt, event, (int)surfaceid, type, target, width, height, stride, format);
+ if ((event == ICO_WINDOW_MGR_MAP_SURFACE_EVENT_MAP) ||
+ (event == ICO_WINDOW_MGR_MAP_SURFACE_EVENT_CONTENTS)) {
+ opengl_thumbnail(display->display, surfaceid, display->surface->dpy,
+ display->surface->ctx, target, width, height, stride, format);
+ }
}
static const struct ico_window_mgr_listener window_mgr_listener = {
@@ -817,13 +826,6 @@ handle_global(void *data, struct wl_registry *registry, uint32_t id,
&ico_input_mgr_device_interface, 1);
print_log("HOMESCREEN: created input_device global %p", display->ico_input_device);
}
-#if 0 /* 2013/08/23 no need shm */
- else if (strcmp(interface, "wl_shm") == 0) {
- display->shm = wl_registry_bind(display->registry, id,
- &wl_shm_interface, 1);
- print_log("HOMESCREEN: created wl_shm global %p", display->shm);
- }
-#endif
else if (strcmp(interface, "ico_exinput") == 0) {
display->ico_exinput =
wl_registry_bind(display->registry, id, &ico_exinput_interface, 1);
@@ -1745,58 +1747,6 @@ int main(int argc, char *argv[])
wl_registry_add_listener(display->registry, &registry_listener, display);
wl_display_dispatch(display->display);
-#if 0 /* 2013/08/23 no need shm */
- /* make wl_shm */
- do {
- sleep_with_wayland(display->display, 20);
- } while(! display->shm);
-
- strcpy(buf, "/tmp/test-homescreen-shm-XXXXXX");
-#if 1 /* use mkostemp */
- fd = mkostemp(buf, O_CLOEXEC);
- if (fd < 0) {
- fprintf(stderr, "test-homescreen: can not make temp file for shm\n");
- exit(1);
- }
-#else /* use mkostemp */
- fd = mkstemp(buf);
- if (fd < 0) {
- fprintf(stderr, "test-homescreen: can not make temp file for shm\n");
- exit(1);
- }
- flags = fcntl(fd, F_GETFD);
- if (flags == -1) {
- fprintf(stderr, "test-homescreen: can not get file flags\n");
- close(fd);
- exit(1);
- }
- if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) {
- fprintf(stderr, "test-homescreen: can not set file flags to FD_CLOEXEC\n");
- close(fd);
- exit(1);
- }
-#endif /* use mkostemp */
- unlink(buf);
- if (ftruncate(fd, SHM_SIZE) < 0) {
- fprintf(stderr, "test-homescreen: can not truncate temp file for shm\n");
- close(fd);
- exit(1);
- }
- display->shm_buf = mmap(NULL, SHM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if (display->shm_buf == MAP_FAILED) {
- fprintf(stderr, "test-homescreen: can not mmap temp file for shm\n");
- close(fd);
- exit(1);
- }
- display->shm_pool = wl_shm_create_pool(display->shm, fd, SHM_SIZE);
- close(fd);
- if (! display->shm_pool) {
- fprintf(stderr, "test-homescreen: wayland can not make shm_pool\n");
- exit(1);
- }
- print_log("HOMESCREEN: shm pool=%08x addr=%08x",
- (int)display->shm_pool, (int)display->shm_buf);
-#endif
fd = 0;
while (1) {
diff --git a/tests/test-thumbnail.c b/tests/test-thumbnail.c
new file mode 100644
index 0000000..0677835
--- /dev/null
+++ b/tests/test-thumbnail.c
@@ -0,0 +1,175 @@
+/*
+ * Copyright © 2013 TOYOTA MOTOR CORPORATION
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+/**
+ * @brief Uint test thumbnail routines
+ *
+ * @date Sep-05-2013
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "test-common.h"
+#include <wayland-server.h>
+#include <EGL/eglext.h>
+
+/* wl_buffer (inport from wayland-1.2.0/src/wayland-server.h) */
+struct uifw_wl_buffer {
+ struct wl_resource resource;
+ int32_t width, height;
+ uint32_t busy_count;
+};
+
+/* wl_drm (inport from mesa-9.1.3/src/egl/wayland/wayland-drm/wayland-drm.c) */
+struct uifw_drm {
+ struct wl_display *display;
+ void *user_data;
+ char *device_name;
+ void *callbacks;
+};
+
+/* wl_drm_buffer (inport from mesa-9.1.3/src/egl/wayland/wayland-drm/wayland-drm.h) */
+struct uifw_drm_buffer {
+ struct uifw_wl_buffer buffer;
+ struct uifw_drm *drm; /* struct wl_drm */
+ uint32_t format;
+ const void *driver_format;
+ int32_t offset[3];
+ int32_t stride[3];
+ void *driver_buffer;
+};
+
+/* buffer management table */
+struct _egl_buffer {
+ struct _egl_buffer *next;
+ uint32_t surfaceid;
+ uint32_t target;
+ struct uifw_drm_buffer buffer;
+};
+
+#if 0 /* not yet support */
+static struct _egl_buffer *egl_buffer = NULL;
+static struct uifw_drm drm = { NULL };
+
+/* EGL functions */
+static PFNEGLQUERYWAYLANDBUFFERWL query_buffer = NULL;
+static PFNEGLCREATEIMAGEKHRPROC create_image = NULL;
+static PFNEGLDESTROYIMAGEKHRPROC destroy_image = NULL;
+static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d = NULL;
+#endif
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief opengl_thumbnail: get application buffer thumbnail
+ *
+ * @param[in] display Wayland display
+ * @param[in] surfaceid UIFW surface Id
+ * @param[in] dpy EGL display
+ * @param[in] ctx EGL context
+ * @param[in] target EGL buffer name(Id)
+ * @param[in] width Widown width
+ * @param[in] height Window height
+ * @param[in] stride Window stride
+ * @param[in] format Buffer format
+ * @return nothing
+ */
+/*--------------------------------------------------------------------------*/
+void
+opengl_thumbnail(struct wl_display *display, uint32_t surfaceid, EGLDisplay dpy,
+ EGLContext ctx, uint32_t target, int width, int height,
+ int stride, uint32_t format)
+{
+#if 0 /* not yet support */
+ struct _egl_buffer *buffer; /* EGL buffer management table */
+ GLuint texture; /* texture */
+ EGLImageKHR image; /* image */
+ EGLint attribs[3]; /* attributes */
+
+ /* search created buffers */
+ if (! egl_buffer) {
+ memset(&drm, 0, sizeof(drm));
+ drm.display = wl_display;
+ drm.device_name = "intel";
+ }
+ buffer = egl_buffer;
+ while(buffer) {
+ if ((buffer->surfaceid == surfaceid) &&
+ (buffer->target == target)) break;
+ }
+ if (! buffer) {
+ /* create new buffer */
+ buffer = malloc(sizeof(struct _egl_buffer));
+ if (! buffer) {
+ print_log("opengl_thumbnail: ERROR can not alloc buffer table");
+ return;
+ }
+ memset(buffer, 0, sizeof(struct _egl_buffer));
+ buffer->next = egl_buffer;
+ egl_buffer = buffer;
+
+ buffer->buffer.width = width;
+ buffer->buffer.height = height;
+ buffer->drm = &drm;
+ buffer->format = format;
+ }
+
+ if (! query_buffer) {
+ query_buffer = (void *) eglGetProcAddress("eglQueryWaylandBufferWL");
+ create_image = (void *) eglGetProcAddress("eglCreateImageKHR");
+ destory_image = (void *) eglGetProcAddress("eglDestroyImageKHR");
+ image_target_texture_2d = (void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");
+
+ if ((! query_buffer) || (! create_image) ||
+ (! destory_image) || (! image_target_texture_2d)) {
+ print_log("opengl_thumbnail: ERROR can not get EGL extension cwfunctions");
+ query_buffer = NULL;
+ return;
+ }
+ }
+
+ /* get image from EGL buffer */
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ attribs[0] = EGL_WAYLAND_PLANE_WL;
+ attribs[1] = 0;
+ attribs[2] = EGL_NONE;
+ image = create_image(dpy, NULL, EGL_WAYLAND_BUFFER_WL, egl_buffers[idx].buffer, attribs);
+ if (! image) {
+ print_log("opengl_thumbnail: ERROR can not create image");
+ return;
+ }
+
+ /* create texture from image */
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ image_target_texture_2d(GL_TEXTURE_2D, image);
+
+ /* texture to surface */
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+#endif
+}
+
diff --git a/tests/testdata/hs_animatest.dat b/tests/testdata/hs_animatest.dat
index a507f05..09d7ed4 100644
--- a/tests/testdata/hs_animatest.dat
+++ b/tests/testdata/hs_animatest.dat
@@ -3,48 +3,173 @@
#
# 1. Surface animation
sleep 1
-launch ../tests/test-eflapp @1 -color=0xe02040ff 2> ../tests/testlog/test-eflapp.log 1>&2
+launch ../tests/test-client < ../tests/testdata/cl_surface4.dat 2> ../tests/testlog/test-client04.log
waitcreate 2
-resize test-eflapp@1 400 300
-move test-eflapp@1 300 350 0
-show test-eflapp@1
+resize test-client 200 300
+move test-client 300 350 0
+#
+# fade and show/hide
+animation test-client fade 400
+#
+show test-client 1
+sleep 0.5
+hide test-client 1
+sleep 1
+#
+# slide.toleft and show/hide
+animation test-client slide.toleft 400
+show test-client 1
sleep 1
+hide test-client 1
+sleep 2
+#
+# slide.toright and show/hide
+animation test-client slide.toright 400
+show test-client 1
+sleep 2
+hide test-client 1
+sleep 2
+#
+# slide.totop and show/hide
+animation test-client slide.totop 400
+show test-client 1
+sleep 1
+hide test-client 1
+sleep 2
+#
+# slide.tobottom and show/hide
+animation test-client slide.tobottom 400
+show test-client 1
+sleep 1
+hide test-client 1
+sleep 2
#
# zoom and show/hide
-animation test-eflapp@1 zoom 600
-show test-eflapp@1 1
+show test-client
+sleep 1
+animation test-client zoom 600
+show test-client 1
sleep 2
-hide test-eflapp@1 1
+hide test-client 1
sleep 2
#
# zoom and move
-animation test-eflapp@1 zoom 1000
-show test-eflapp@1
+animation test-client zoom 1000
+show test-client
sleep 1
-move test-eflapp@1 100 50 0 1
+move test-client 100 50 0 1
+sleep 2
+move test-client 500 400 0 1
sleep 2
-move test-eflapp@1 500 400 0 1
-#sleep 2
#
# zoom and resize
-animation test-eflapp@1 zoom 1000
-resize test-eflapp@1 80 50 1
+resize test-client 80 50 1
sleep 2
-resize test-eflapp@1 300 200 1
+resize test-client 300 200 1
sleep 2
#
-# zoom and positionsize
-positionsize test-eflapp@1 800 600 120 80 0 1
+# slide and move
+animation test-client slide 600
+move test-client 100 50 0 1
+sleep 1.5
+move test-client 500 400 0 1
sleep 2
-positionsize test-eflapp@1 200 300 80 60
-sleep 2
-positionsize test-eflapp@1 400 500 300 200 0 1
+#
+# fade and resize
+animation test-client fade 600
+resize test-client 80 50 1
+sleep 1.5
+resize test-client 300 200 1
sleep 2
#
+# slide and resize
+animation test-client slide 600
+resize test-client 80 50 1
+sleep 1.5
+resize test-client 300 200 1
+sleep 3
+#
+kill test-client
+waitdestroy 5
sleep 1
-kill test-eflapp@1
+#
+launch ../tests/test-eflapp @1 -color=0xe02040ff 2> ../tests/testlog/test-eflapp.log 1>&2
+waitcreate 2
+#
+move test-eflapp@1 0 150
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 wipe.toleft 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 920 250
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 wipe.toright 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
sleep 1
#
+move test-eflapp@1 400 0
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 wipe.tobottom 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 400 520
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 wipe.totop 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 0 150
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 swing.toleft 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 920 250
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 swing.toright 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 400 0
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 swing.tobottom 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+move test-eflapp@1 400 520
+hide test-eflapp@1
+sleep 1
+animation test-eflapp@1 swing.totop 800
+show test-eflapp@1 1
+sleep 1
+hide test-eflapp@1 1
+sleep 1
+#
+kill test-eflapp@1
+sleep 0.5
#
# 2. End of Test
bye
diff --git a/tests/testdata/hs_slide.dat b/tests/testdata/hs_slide.dat
index db31759..e509679 100644
--- a/tests/testdata/hs_slide.dat
+++ b/tests/testdata/hs_slide.dat
@@ -7,9 +7,9 @@ waitcreate 2
hide test-client
animation test-client Slide.toRight
sleep 1
-show test-client
+show test-client 1
sleep 3
-hide test-client
+hide test-client 1
sleep 3
kill test-client
#
diff --git a/tests/weston-plugin-test.anima b/tests/weston-plugin-test.anima
index 5360a02..bd99581 100755
--- a/tests/weston-plugin-test.anima
+++ b/tests/weston-plugin-test.anima
@@ -16,6 +16,7 @@ sleep 1
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
+export XDG_RUNTIME_DIR=/run/user/5000
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.homescreen b/tests/weston-plugin-test.homescreen
index a44b1d8..77b6478 100755
--- a/tests/weston-plugin-test.homescreen
+++ b/tests/weston-plugin-test.homescreen
@@ -10,17 +10,10 @@ rm -fr ../tests/testlog
mkdir ../tests/testlog
# 2 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.input b/tests/weston-plugin-test.input
index 7c7af36..f669462 100755
--- a/tests/weston-plugin-test.input
+++ b/tests/weston-plugin-test.input
@@ -13,16 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
-#export WAYLAND_DEBUG="1"
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.map b/tests/weston-plugin-test.map
index 1f6202f..6240293 100755
--- a/tests/weston-plugin-test.map
+++ b/tests/weston-plugin-test.map
@@ -13,6 +13,7 @@ rm -fr ../tests/testlog/* 2> /dev/null
sleep 1
# 3 Weston/Wayland Envionment
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
diff --git a/tests/weston-plugin-test.notouch b/tests/weston-plugin-test.notouch
index 4ed6c5e..63bc6ae 100755
--- a/tests/weston-plugin-test.notouch
+++ b/tests/weston-plugin-test.notouch
@@ -13,17 +13,10 @@ mkdir ../tests/testlog
#sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.resize_flower b/tests/weston-plugin-test.resize_flower
index ecf7fba..10f5cb2 100755
--- a/tests/weston-plugin-test.resize_flower
+++ b/tests/weston-plugin-test.resize_flower
@@ -13,17 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.resize_native b/tests/weston-plugin-test.resize_native
index d8ff139..acb37d3 100755
--- a/tests/weston-plugin-test.resize_native
+++ b/tests/weston-plugin-test.resize_native
@@ -13,17 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.resize_smoke b/tests/weston-plugin-test.resize_smoke
index 4816cf3..813f9c8 100755
--- a/tests/weston-plugin-test.resize_smoke
+++ b/tests/weston-plugin-test.resize_smoke
@@ -13,17 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.resize_smoke2 b/tests/weston-plugin-test.resize_smoke2
index 4ecf436..614dc67 100755
--- a/tests/weston-plugin-test.resize_smoke2
+++ b/tests/weston-plugin-test.resize_smoke2
@@ -13,17 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.send_input b/tests/weston-plugin-test.send_input
index f243dd6..5039f68 100755
--- a/tests/weston-plugin-test.send_input
+++ b/tests/weston-plugin-test.send_input
@@ -16,6 +16,7 @@ sleep 1
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
+export XDG_RUNTIME_DIR=/run/user/5000
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test.slide b/tests/weston-plugin-test.slide
index 08c9c2c..75c771b 100755
--- a/tests/weston-plugin-test.slide
+++ b/tests/weston-plugin-test.slide
@@ -12,17 +12,10 @@ else
fi
# 2 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-#export ELM_ENGINE=wayland_shm
-#export ECORE_EVAS_ENGINE=wayland_shm
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston-plugin-test_gdb b/tests/weston-plugin-test_gdb
index 8a420a1..a3b2c6e 100755
--- a/tests/weston-plugin-test_gdb
+++ b/tests/weston-plugin-test_gdb
@@ -13,15 +13,10 @@ mkdir ../tests/testlog
sleep 1
# 3 Weston/Wayland Envionment
-export XDG_RUNTIME_DIR=/tmp/run-root
+export XDG_RUNTIME_DIR=/run/user/5000
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_egl
export ECORE_EVAS_ENGINE=wayland_egl
-export EVAS_FONT_DPI=72
-export ECORE_IMF_MODULE=isf
-export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
-export ELM_SCALE="0.7"
-export ELM_PROFILE=mobile
# 4 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
diff --git a/tests/weston.ini b/tests/weston.ini
index 00bb382..252c1f0 100644
--- a/tests/weston.ini
+++ b/tests/weston.ini
@@ -19,7 +19,7 @@ shell-exe=
#[output]
#name=HDMI2
#mode=1280x480
-#mode=100.00 1280 1300 1400 1400 480 500 600 700 -hsync +vsyn
+#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
#[output]
#name=LVDS1
@@ -29,6 +29,7 @@ shell-exe=
#[output]
#name=VGA1
#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
+#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
#transform=90
#[output]