+* Fri May 24 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130520.093312@6f0a9e8
+- 0.5.03 release
+- Fix for TIVI-976 - Sometimes weston failed to be startup with 10% possibility.
+ When there is operation of surface(resize, change of the position, etc) just after surface creation from HomeScreen,
+ Weston falls in segmentation fault.
+- Fix for TIVI-974 - [WLD]Failed to execute Ico-uxf-weston-plugin test script with error "No testlog directory".
+ Create testlog directory in an examination script
+- Work around - Addition of the window animation interface.
+
* Wed May 22 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130520.093312@8ed2bc5
- 0.5.02 release
- Fix for TIVI-803 - Enable new UI in wayland build
Name: ico-uxf-weston-plugin
Summary: Weston Plugins for IVI
-Version: 0.5.02
+Version: 0.5.03
Release: 1.1
Group: System/GUI/Libraries
License: MIT
<arg name="raise" type="int"/>
</request>
- <request name="set_transition">
+ <request name="set_animation">
<arg name="surfaceid" type="uint"/>
- <arg name="transition" type="int"/>
+ <arg name="animation" type="string"/>
</request>
<request name="set_active">
#include <fcntl.h>
#include <unistd.h>
-#if 1 /* Build in old Weston(1.0.6) */
-#include "config-parser.h"
-#else /* Build on new Weston */
#include <weston/config-parser.h>
-#endif
static int
handle_key(const struct config_key *key, const char *value)
if (fd == -1)
return -1;
+
fp = fdopen(dup(fd), "r");
if (fp == NULL) {
- perror("couldn't open config flle");
+ perror("couldn't open config file");
return -1;
}
return 0;
}
-#if 0
-char *
-config_file_path(const char *name)
-{
- const char dotconf[] = "/.config/";
- const char *config_dir;
- const char *home_dir;
- char *path;
- size_t size;
-
- config_dir = getenv("XDG_CONFIG_HOME");
- if (!config_dir) {
- home_dir = getenv("HOME");
- if (!home_dir) {
- fprintf(stderr, "HOME is not set, using cwd.\n");
- return strdup(name);
- }
-
- size = strlen(home_dir) + sizeof dotconf + strlen(name);
- path = malloc(size);
- if (!path)
- return NULL;
-
- snprintf(path, size, "%s%s%s", home_dir, dotconf, name);
- return path;
- }
-
- size = strlen(config_dir) + 1 + strlen(name) + 1;
- path = malloc(size);
- if (!path)
- return NULL;
-
- snprintf(path, size, "%s/%s", config_dir, name);
- return path;
-}
-#endif
-
int
open_config_file(const char *name)
{
fd = open(path, O_RDONLY | O_CLOEXEC);
if (fd >= 0)
return fd;
- if (fd >= 0)
- return fd;
}
/* For each $XDG_CONFIG_DIRS: weston/<config_file> */
for (p = config_dirs; *p != '\0'; p = next) {
next = strchrnul(p, ':');
snprintf(path, sizeof path,
- "%.*s/weston/%s", (int)(next - p), p, name);
+ "%.*s/weston/%s", (int)(next - p), p, name);
fd = open(path, O_RDONLY | O_CLOEXEC);
if (fd >= 0)
return fd;
if (fd >= 0)
fprintf(stderr,
- "using config in current working directory: %s\n",
- path);
+ "using config in current working directory: %s\n",
+ path);
else
fprintf(stderr, "config file \"%s\" not found.\n", name);
return fd;
}
-
+++ /dev/null
-/*
- * Copyright © 2008 Kristian Høgsberg
- *
- * 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.
- */
-
-#ifndef CONFIGPARSER_H
-#define CONFIGPARSER_H
-
-enum config_key_type {
- CONFIG_KEY_INTEGER, /* typeof data = int */
- CONFIG_KEY_UNSIGNED_INTEGER, /* typeof data = unsigned int */
- CONFIG_KEY_STRING, /* typeof data = char* */
- CONFIG_KEY_BOOLEAN /* typeof data = int */
-};
-
-struct config_key {
- const char *name;
- enum config_key_type type;
- void *data;
-};
-
-struct config_section {
- const char *name;
- const struct config_key *keys;
- int num_keys;
- void (*done)(void *data);
-};
-
-int
-parse_config_file(int fd,
- const struct config_section *sections, int num_sections,
- void *data);
-
-int
-open_config_file(const char *name);
-
-enum weston_option_type {
- WESTON_OPTION_INTEGER,
- WESTON_OPTION_UNSIGNED_INTEGER,
- WESTON_OPTION_STRING,
- WESTON_OPTION_BOOLEAN
-};
-
-struct weston_option {
- enum weston_option_type type;
- const char *name;
- int short_name;
- void *data;
-};
-
-int
-parse_options(const struct weston_option *options,
- int count, int argc, char *argv[]);
-
-#endif /* CONFIGPARSER_H */
-
#include "ico_ivi_shell.h"
#include "ico_ivi_shell-server-protocol.h"
-/* Animation to apply at the time of indication start of the screen */
-enum animation_type {
- ANIMATION_NONE, /* No animation */
- ANIMATION_ZOOM, /* Zoom In */
- ANIMATION_FADE, /* Fade In */
- ANIMATION_SLIDE /* Slide In */
-};
-
/* Layer management */
struct ivi_layer_list {
int layer; /* Layer.ID */
struct wl_listener destroy_listener;
struct weston_layer surface; /* Surface list */
struct ivi_layer_list ivi_layer; /* Layer list */
- enum animation_type win_animation_type; /* Default animetion */
+ char win_animation[ICO_WINDOW_ANIMATION_LEN];
+ /* Default animation name */
int win_visible_on_create; /* Visible on create surface */
struct shell_surface *active_pointer_shsurf;
/* Pointer active shell surface */
/*--------------------------------------------------------------------------*/
/**
- * @brief get_animation_type: animetion type convert name to enumeration value.
- *
- * @param[in] animation animation name
- * @return animetion enumeration value
- * @retval ANIMATION_NONE no animetion
- * @retval ANIMATION_ZOOM zoom animetion
- * @retval ANIMATION_FADE fade animetion
- * @retval ANIMATION_SLIDE slide animetion
- */
-/*--------------------------------------------------------------------------*/
-static enum animation_type
-get_animation_type(char *animation)
-{
- if (!animation)
- return ANIMATION_NONE;
-
- if (!strcmp("zoom", animation))
- return ANIMATION_ZOOM;
- else if (!strcmp("fade", animation))
- return ANIMATION_FADE;
- else if (!strcmp("slide", animation))
- return ANIMATION_SLIDE;
- else
- return ANIMATION_NONE;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
* @brief shell_configuration: initiale configuration ico_ivi_shell
*
* @param[in] shell ico_ivi_shell static table area
parse_config_file(config_fd, cs, ARRAY_LENGTH(cs), shell);
close(config_fd);
- shell->win_animation_type = get_animation_type(win_animation);
+ strncpy(shell->win_animation, win_animation, sizeof(shell->win_animation)-1);
- uifw_info("shell_configuration: Anima=%d Visible=%d Debug=%d",
- shell->win_animation_type, shell->win_visible_on_create,
+ uifw_info("shell_configuration: Anima=%s Visible=%d Debug=%d",
+ shell->win_animation, shell->win_visible_on_create,
ico_ivi_debuglevel());
}
shsurf->surface = surface;
shsurf->visible = shsurf->shell->win_visible_on_create;
+ /* set default color and shader */
+ weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
+
wl_signal_init(&shsurf->resource.destroy_signal);
shsurf->surface_destroy_listener.notify = shell_handle_surface_destroy;
wl_signal_add(&surface->surface.resource.destroy_signal,
ivi_shell_restack_ivi_layer(shell, shsurf);
}
- if (surface_type == SHELL_SURFACE_TOPLEVEL) {
- switch (shell->win_animation_type) {
- case ANIMATION_FADE:
- weston_fade_run(surface, NULL, NULL);
- break;
- case ANIMATION_ZOOM:
- weston_zoom_run(surface, 0.8, 1.0, NULL, NULL);
- break;
- case ANIMATION_SLIDE:
- weston_slide_run(surface, (float)surface->geometry.height, 0.0, NULL, NULL);
- break;
- default:
- break;
- }
- }
-
if (shell_hook_map) {
/* Surface map hook routine */
uifw_trace("map: call ivi_shell_hook_map(%08x, x/y=%d/%d, w/h=%d/%d)",
/*--------------------------------------------------------------------------*/
/**
+ * @brief ivi_shell_default_animation: window default animation
+ *
+ * @param none
+ * @return default animation name
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT const char *
+ivi_shell_default_animation(void)
+{
+ return default_shell->win_animation;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief click_to_activate_binding: clieck and select surface
*
* @param[in] seat clicked target seat
struct shell_surface;
+/* max length */
+#define ICO_WINDOW_ANIMATION_LEN 20 /* length of window animation name */
/* option flag */
-#define ICO_OPTION_FLAG_UNVISIBLE 0x00000001 /* unvisible control */
+#define ICO_OPTION_FLAG_UNVISIBLE 0x00000001 /* unvisible control */
-/* Prototype for set function */
+/* Prototype for get/set function */
void ivi_shell_set_layer(struct shell_surface *shsurf, const int layer);
bool ivi_shell_is_visible(struct shell_surface *shsurf);
void ivi_shell_set_visible(struct shell_surface *shsurf, const int visible);
void ivi_shell_surface_configure(struct shell_surface *shsurf, const int x,
const int y, const int width, const int height);
void ivi_shell_set_active(struct shell_surface *shsurf, const int target);
+const char *ivi_shell_default_animation(void);
/* Prototypr for hook routine */
void ivi_shell_hook_bind(void (*hook_bind)(struct wl_client *client));
int y; /* Y-axis */
int width; /* Width */
int height; /* Height */
- int transition; /* Transition */
+ char animation[ICO_WINDOW_ANIMATION_LEN];
+ /* Animation name */
struct wl_list link; /* */
struct uifw_win_surface *next_idhash; /* UIFW SurfaceId hash list */
struct uifw_win_surface *next_wshash; /* Weston SurfaceId hash list */
/* show/hide and raise/lower surface */
static void uifw_set_visible(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, int32_t visible, int32_t raise);
- /* set surface transition */
-static void uifw_set_transition(struct wl_client *client, struct wl_resource *resource,
- uint32_t surfaceid, int32_t transition);
+ /* set surface animation */
+static void uifw_set_animation(struct wl_client *client, struct wl_resource *resource,
+ uint32_t surfaceid, const char *animation);
/* set active surface (form HomeScreen) */
static void uifw_set_active(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, uint32_t target);
uifw_set_window_layer,
uifw_set_positionsize,
uifw_set_visible,
- uifw_set_transition,
+ uifw_set_animation,
uifw_set_active,
uifw_set_layer_visible
};
us->id = generate_id();
us->surface = surface;
us->shsurf = shsurf;
+ strncpy(us->animation, ivi_shell_default_animation(), sizeof(us->animation)-1);
+
if (_ico_win_mgr->num_manager <= 0) {
uifw_trace("client_register_surface: No Manager, Force visible");
ivi_shell_set_visible(shsurf, 1); /* NOT exist HomeScreen */
uifw_trace("uifw_set_visible: Leave(No Change)");
return;
}
+#if 0 /* the animation function does not yet support it */
+ if (strcasecmp(usurf->animation, "fade") == 0) {
+ uifw_trace("uifw_set_visible: start animation fade(%08x)", (int)usurf->surface);
+ weston_fade_run(usurf->surface, NULL, NULL);
+ }
+ else if (strcasecmp(usurf->animation, "zoom") == 0) {
+ uifw_trace("uifw_set_visible: start animation zoom(%08x)", (int)usurf->surface);
+ weston_zoom_run(usurf->surface, 0.8, 1.0, NULL, NULL);
+ }
+ else if (strcasecmp(usurf->animation, "slide") == 0) {
+ uifw_trace("uifw_set_visible: start animation slide(%08x)", (int)usurf->surface);
+ weston_slide_run(usurf->surface, (float)usurf->surface->geometry.height,
+ 0.0, NULL, NULL);
+ }
+#endif /* the animation function does not yet support it */
}
else if (visible == 0) {
/*--------------------------------------------------------------------------*/
/**
- * @brief uifw_set_transition: set transition of surface visible/unvisible
+ * @brief uifw_set_animation: set animation of surface visible/unvisible
*
* @param[in] client Weyland client
* @param[in] resource resource of request
* @param[in] surfaceid UIFW surface id
- * @param[in] transition transiton id
+ * @param[in] animation animation name
* @return none
*/
/*--------------------------------------------------------------------------*/
static void
-uifw_set_transition(struct wl_client *client, struct wl_resource *resource,
- uint32_t surfaceid, int32_t transition)
+uifw_set_animation(struct wl_client *client, struct wl_resource *resource,
+ uint32_t surfaceid, const char *animation)
{
struct uifw_win_surface* usurf = find_uifw_win_surface_by_id(surfaceid);
- uifw_trace("uifw_set_transition: Enter(surf=%08x, transition=%d)",
- surfaceid, transition);
+ uifw_trace("uifw_set_transition: Enter(surf=%08x, animation=%s)",
+ surfaceid, animation);
if (usurf) {
- usurf->transition = transition;
- uifw_trace("uifw_set_transition: Leave(OK)");
+ memset(usurf->animation, 0, sizeof(usurf->animation));
+ strncpy(usurf->animation, animation, sizeof(usurf->animation)-1);
+ uifw_trace("uifw_set_animation: Leave(OK)");
}
else {
- uifw_trace("uifw_set_transition: Leave(Surface(%08x) Not exist)", surfaceid);
+ uifw_trace("uifw_set_animation: Leave(Surface(%08x) Not exist)", surfaceid);
}
}
}
static void
-transition_surface(struct display *display, char *buf)
+animation_surface(struct display *display, char *buf)
{
char *args[10];
int narg;
int surfaceid;
- int transition;
narg = pars_command(buf, args, 10);
if (narg >= 2) {
surfaceid = search_surface(display, args[0]);
- transition = strtol(args[1], (char **)0, 0);
- if ((surfaceid >= 0) && (transition >=0)) {
- print_log("HOMESCREEN: transition(%s,%08x,%d)", args[0], surfaceid, transition);
- ico_window_mgr_set_transition(display->ico_window_mgr, surfaceid, transition);
+ if (surfaceid >= 0) {
+ print_log("HOMESCREEN: animation(%s,%08x,%d)", args[0], surfaceid, args[1]);
+ ico_window_mgr_set_animation(display->ico_window_mgr, surfaceid, args[1]);
}
else {
- print_log("HOMESCREEN: Unknown surface(%s) at transition command", args[0]);
+ print_log("HOMESCREEN: Unknown surface(%s) at animation command", args[0]);
}
}
else {
- print_log("HOMESCREEN: transition command"
- "[transition appid transition] has no argument");
+ print_log("HOMESCREEN: animation command"
+ "[animation appid animation] has no argument");
}
}
/* Raise/Lower surface window */
raise_surface(display, &buf[5], 0);
}
- else if (strncasecmp(buf, "transition", 10) == 0) {
- /* Set transition surface window*/
- transition_surface(display, &buf[10]);
+ else if (strncasecmp(buf, "animation", 9) == 0) {
+ /* Set animation surface window*/
+ animation_surface(display, &buf[9]);
}
else if (strncasecmp(buf, "input_add", 9) == 0) {
/* Set input switch to application */
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Weston/Wayland Envionment
export XDG_RUNTIME_DIR=/tmp/run-root
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
#../tests/test-send_event -mq=5551 &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-rm -fr ../tests/testlog/*
+rm -fr ../tests/testlog
+mkdir ../tests/testlog
# 2 Start Pseudo event device (for Touch Panel)
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
modules=ico_ivi_common.so,ico_ivi_shell.so,ico_window_mgr.so,ico_input_mgr.so
[shell]
-animation=none
-#animation=zoom
+#animation=none
+animation=fade
# 0=hide on surface create(for with HomeScreen)/1=show on surface create(for Debug)
visible_on_create=0
+++ /dev/null
-[core]
-modules=ico_plugin_loader.so
-
-[output]
-name=HDMI3
-#mode=1680x945
-mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
-#transform=90
-
-#[output]
-#name=LVDS1
-#mode=1680x1050
-#transform=90
-
-[output]
-name=VGA1
-#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
-#transform=90
-
-#[output]
-#name=X1
-#mode=1024x768
-#transform=flipped-270