+* Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/tizen/20130919.011341@e71fb82
+- 0.9.04 release.
+-- fix for - Weston sometimes crashes at the time of surface creation.
+-- Weston crashes when an event comes from DRM just after shell surface creation, because shader is
+-- unestablished, it is necessary to set default shader at the time of shell surface creation.
+-- fix for - Remove /etc/profile.d/ico_weston.sh
+-- The change of the interface of the input region for haptic device.
+-- internal bug fix.
+-- Deletion of an unnecessary files.
+
+
* Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130911.005338@d5948b7
- 0.9.03-2.1 release
-- Remove the installation to /etc/profile.d/* .
Name: ico-uxf-weston-plugin
Summary: Weston Plugins for IVI
-Version: 0.9.03
-Release: 2.1
+Version: 0.9.04
+Release: 1.1
Group: Graphics & UI Framework/Automotive UI
License: MIT
URL: ""
</description>
<request name="set_input_region">
- <arg name="surfaceid" type="uint" summary="target surface"/>
+ <arg name="target" type="string" summary="target surface@application"/>
<arg name="x" type="int" summary="input region X coordinate"/>
<arg name="y" type="int" summary="input region Y coordinate"/>
<arg name="width" type="int" summary="input region width"/>
<arg name="height" type="int" summary="input region height"/>
- <arg name="attr" type="int"/>
+ <arg name="hotspot_x" type="int" summary="hotspot of X relative coordinate"/>
+ <arg name="hotspot_y" type="int" summary="hotspot of Y relative coordinate"/>
+ <arg name="cursor_x" type="int" summary="cursor region X coordinate"/>
+ <arg name="cursor_y" type="int" summary="cursor region Y coordinate"/>
+ <arg name="cursor_width" type="int" summary="cursor region width"/>
+ <arg name="cursor_height" type="int" summary="cursor region height"/>
+ <arg name="attr" type="uint" summary="region attributes(unused)"/>
</request>
- <request name="reset_input_region">
- <arg name="surfaceid" type="uint" summary="target surface"/>
+ <request name="unset_input_region">
+ <arg name="target" type="string" summary="target surface@application"/>
<arg name="x" type="int" summary="input region X coordinate"/>
<arg name="y" type="int" summary="input region Y coordinate"/>
<arg name="width" type="int" summary="input region width"/>
<entry name="haptic" value="16" summary="haptic"/>
</enum>
+ <enum name="region">
+ <description summary="input region change method">
+ Input region change method for input region change event.
+ </description>
+ <entry name="add" value="1" summary="add input region"/>
+ <entry name="remove" value="2" summary="remove input region"/>
+ <entry name="removeall" value="4" summary="remove all input region"/>
+ </enum>
+
<request name="configure_input">
<description summary="input controller define input switch">
Define input switch from Input Controller
<arg name="state" type="int" summary="Of/Off status"/>
</request>
- <event name="input_region">
- <description summary="event to application for change input region">
- Send input region to haptic controller.
+ <event name="input_regions">
+ <description summary="event to application for change input regions">
+ Send input regions to haptic controller.
</description>
- <arg name="region" type="array" summary="input regions"/>
+ <arg name="regions" type="array" summary="input regions"/>
</event>
</interface>
+++ /dev/null
-setenv XDG_RUNTIME_DIR /run/user/5000
-setenv XDG_CONFIG_HOME /etc/xdg/weston
+++ /dev/null
-export XDG_RUNTIME_DIR=/run/user/5000
-export XDG_CONFIG_HOME=/etc/xdg/weston
ico_input_mgr.h
libico_uxf_weston_plugin_la_LIBADD = -lrt -lm
-libico_uxf_weston_plugin_la_LDFLAGS = -version-info 0:7:0
+libico_uxf_weston_plugin_la_LDFLAGS = -version-info 0:9:0
libico_uxf_weston_plugin_la_SOURCES = \
desktop-shell-protocol.c \
input-method-protocol.c \
#include "ico_ivi_shell.h"
#include "ico_window_mgr.h"
#include "ico_input_mgr.h"
+#include "ico_window_mgr-server-protocol.h"
#include "ico_input_mgr-server-protocol.h"
/* degine maximum length */
static void ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
const char *appid, uint32_t surfaceid, int32_t type,
int32_t deviceno, int32_t code, int32_t value);
+ /* set input region */
+static void ico_mgr_set_input_region(struct wl_client *client, struct wl_resource *resource,
+ const char *target, int32_t x, int32_t y,
+ int32_t width, int32_t height, int32_t hotspot_x,
+ int32_t hotspot_y, int32_t cursor_x, int32_t cursor_y,
+ int32_t cursor_width, int32_t cursor_height,
+ uint32_t attr);
+ /* unset input region */
+static void ico_mgr_unset_input_region(struct wl_client *client,
+ struct wl_resource *resource,
+ const char *taret, int32_t x, int32_t y,
+ int32_t width, int32_t height);
/* create and regist Input Controller table*/
static void ico_device_configure_input(struct wl_client *client,
struct wl_resource *resource, const char *device,
int32_t input, int32_t code, int32_t state);
/* definition of Wayland protocol */
-/* mgr interface */
+/* Input Manager Control interface */
static const struct ico_input_mgr_control_interface ico_input_mgr_implementation = {
ico_mgr_add_input_app,
ico_mgr_del_input_app,
ico_mgr_send_input_event
};
-/* Input Controller interface */
+/* Extended Input interface */
+static const struct ico_exinput_interface ico_exinput_implementation = {
+ ico_mgr_set_input_region,
+ ico_mgr_unset_input_region
+};
+
+/* Input Controller Device interface */
static const struct ico_input_mgr_device_interface input_mgr_ictl_implementation = {
ico_device_configure_input,
ico_device_configure_code,
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_mgr_set_input_region: set input region for haptic devcie
+ *
+ * @param[in] client client(Device Input Controller)
+ * @param[in] resource resource of request
+ * @param[in] target target window (winname@appid)
+ * @param[in] x input region X coordinate
+ * @param[in] y input region X coordinate
+ * @param[in] width input region width
+ * @param[in] height input region height
+ * @param[in] hotspot_x hotspot of X relative coordinate
+ * @param[in] hotspot_y hotspot of Y relative coordinate
+ * @param[in] cursor_x cursor region X coordinate
+ * @param[in] cursor_y cursor region X coordinate
+ * @param[in] cursor_width cursor region width
+ * @param[in] cursor_height cursor region height
+ * @param[in] attr region attributes(currently unused)
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+ico_mgr_set_input_region(struct wl_client *client, struct wl_resource *resource,
+ const char *target, int32_t x, int32_t y,
+ int32_t width, int32_t height, int32_t hotspot_x,
+ int32_t hotspot_y, int32_t cursor_x, int32_t cursor_y,
+ int32_t cursor_width, int32_t cursor_height, uint32_t attr)
+{
+ uifw_trace("ico_mgr_set_input_region: Enter(%s %d/%d-%d/%d(%d/%d) %d/%d-%d/%d)",
+ target, x, y, width, height, hotspot_x, hotspot_y,
+ cursor_x, cursor_y, cursor_width, cursor_height);
+
+ uifw_trace("ico_mgr_set_input_region: Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief ico_mgr_unset_input_region: unset input region for haptic devcie
+ *
+ * @param[in] client client(Device Input Controller)
+ * @param[in] resource resource of request
+ * @param[in] target target window (winname@appid)
+ * @param[in] x input region X coordinate
+ * @param[in] y input region X coordinate
+ * @param[in] width input region width
+ * @param[in] height input region height
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+ico_mgr_unset_input_region(struct wl_client *client, struct wl_resource *resource,
+ const char *target, int32_t x, int32_t y,
+ int32_t width, int32_t height)
+{
+ uifw_trace("ico_mgr_unset_input_region: Enter(%s %d/%d-%d/%d)",
+ target, x, y, width, height);
+
+ uifw_trace("ico_mgr_unset_input_region: Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_device_configure_input: configure input device and input switch
* from Device Input Controller.
*
mgr_resource = wl_resource_create(client, &ico_input_mgr_device_interface, 1, id);
if (mgr_resource) {
wl_resource_set_implementation(mgr_resource, &input_mgr_ictl_implementation,
- NULL, ico_device_unbind);
+ pInputMgr, ico_device_unbind);
}
uifw_trace("ico_device_bind: Leave");
}
if (! pAppMgr->resource) {
pAppMgr->resource = wl_resource_create(client, &ico_exinput_interface, 1, id);
if (pAppMgr->resource) {
- wl_resource_set_implementation(pAppMgr->resource, NULL,
+ wl_resource_set_implementation(pAppMgr->resource, &ico_exinput_implementation,
pInputMgr, ico_exinput_unbind);
}
}
/* Input Region struct for Haptic Device Controller */
struct ico_uifw_input_region {
+ uint16_t change; /* change method */
+ /* ICO_INPUT_MGR_DEVICE_REGION_ADD */
+ /* ICO_INPUT_MGR_DEVICE_REGION_REMOVE */
+ /* ICO_INPUT_MGR_DEVICE_REGION_REMOVEALL*/
uint16_t node; /* display node */
- uint16_t res; /* (unused) */
uint32_t surfaceid; /* surface Id */
uint16_t surface_x; /* surface absolute X coordinate */
uint16_t surface_y; /* surface absolute Y coordinate */
uint16_t y; /* input region relative Y coordinate */
uint16_t width; /* input region width */
uint16_t height; /* input region height */
- int32_t attr; /* input region attribute */
+ int16_t hotspot_x; /* hotspot of X relative coordinate */
+ int16_t hotspot_y; /* hotspot of Y relative coordinate */
+ uint16_t cursor_x; /* cursor region X coordinate */
+ uint16_t cursor_y; /* cursor region Y coordinate */
+ uint16_t cursor_width; /* cursor region width */
+ uint16_t cursor_height; /* cursor region height */
+ uint32_t attr; /* input region attribute */
};
#endif /*_ICO_INPUT_MGR_H_*/
/* System limit */
#define ICO_IVI_MAX_DISPLAY (8) /* Maximum numer of displays in a ECU */
-#define ICO_IVI_APPID_LENGTH (128) /* Maximum length of applicationId(AppCore) */
+#define ICO_IVI_APPID_LENGTH (80) /* Maximum length of applicationId(AppCore) */
/* (with terminate NULL) */
-#define ICO_IVI_WINNAME_LENGTH (32) /* Maximum length of window name (with NULL)*/
+#define ICO_IVI_WINNAME_LENGTH (40) /* Maximum length of window name (with NULL)*/
#define ICO_IVI_ANIMATION_LENGTH (16) /* Maximum length of animation name (w NULL)*/
#define ICO_IVI_MAX_COORDINATE (16383) /* Maximum X or Y coordinate */
enum animation_type win_animation_type;
};
+#if 0 /* move to ico_ivi_shell.h */
enum shell_surface_type {
SHELL_SURFACE_NONE,
SHELL_SURFACE_TOPLEVEL,
SHELL_SURFACE_POPUP,
SHELL_SURFACE_XWAYLAND
};
+#endif
struct ping_timer {
struct wl_event_source *source;
struct shell_surface *shsurf = wl_resource_get_user_data(resource);
struct weston_surface *surface;
- surface = weston_surface_get_main_surface(seat->pointer->focus);
- if (seat->pointer->button_count > 0 && seat->pointer->grab_serial == serial) {
+ if (seat->pointer &&
+ seat->pointer->button_count > 0 &&
+ seat->pointer->grab_serial == serial) {
surface = weston_surface_get_main_surface(seat->pointer->focus);
if ((surface == shsurf->surface) &&
(surface_move(shsurf, seat) < 0))
wl_resource_post_no_memory(resource);
- } else if (seat->touch->grab_serial == serial) {
+ } else if (seat->touch &&
+ seat->touch->grab_serial == serial) {
surface = weston_surface_get_main_surface(seat->touch->focus);
if ((surface == shsurf->surface) &&
(surface_touch_move(shsurf, seat) < 0))
shsurf->fullscreen.framerate = 0;
shsurf->fullscreen.black_surface = NULL;
shsurf->ping_timer = NULL;
+
+ /* set default color and shader because weston original bug(some time crash weston) */
+ weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
+
wl_list_init(&shsurf->fullscreen.transform.link);
wl_signal_init(&shsurf->destroy_signal);
struct weston_surface *focus;
struct weston_surface *main_surface;
- if (button == BTN_LEFT)
- focus = (struct weston_surface *) seat->pointer->focus;
- else
- focus = (struct weston_surface *) seat->touch->focus;
+ focus = (struct weston_surface *) seat->pointer->focus;
if (!focus)
return;
weston_compositor_add_button_binding(ec, BTN_LEFT, 0,
click_to_activate_binding,
shell);
- weston_compositor_add_button_binding(ec, BTN_TOUCH, 0,
- click_to_activate_binding,
- shell);
weston_compositor_add_axis_binding(ec, WL_POINTER_AXIS_VERTICAL_SCROLL,
MODIFIER_SUPER | MODIFIER_ALT,
surface_opacity_binding, NULL);
/*--------------------------------------------------------------------------*/
/**
- * @brief ico_ivi_shell_current_layer: get current weston layer
+ * @brief ico_ivi_shell_weston_layer: get weston layer
*
* @param none
* @return current weston layer
/*--------------------------------------------------------------------------*/
/* API for other plugin */
WL_EXPORT struct weston_layer *
-ico_ivi_shell_current_layer(void)
+ico_ivi_shell_weston_layer(void)
{
- struct workspace *ws = get_current_workspace(_ico_ivi_shell);
-
- return (ws != NULL) ? &ws->layer : NULL;
+ return(&_ico_ivi_shell->panel_layer);
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_ivi_shell_get_surfacetype: get surface type
+ *
+ * @param[in] shsurf shell surface
+ * @return surface type
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT int
+ico_ivi_shell_get_surfacetype(struct shell_surface *shsurf)
+{
+ return (shsurf ? (int)shsurf->type : -1);
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_ivi_shell_set_surface_type: set surface type
*
* @param[in] shsurf shell surface
struct shell_surface;
+/* surface type */
+enum shell_surface_type {
+ SHELL_SURFACE_NONE,
+ SHELL_SURFACE_TOPLEVEL,
+ SHELL_SURFACE_TRANSIENT,
+ SHELL_SURFACE_FULLSCREEN,
+ SHELL_SURFACE_MAXIMIZED,
+ SHELL_SURFACE_POPUP,
+ SHELL_SURFACE_XWAYLAND
+};
+
/* Prototype for get/set function */
-struct weston_layer *ico_ivi_shell_current_layer(void);
+struct weston_layer *ico_ivi_shell_weston_layer(void);
void ico_ivi_shell_set_toplevel(struct shell_surface *shsurf);
+int ico_ivi_shell_get_surfacetype(struct shell_surface *shsurf);
void ico_ivi_shell_set_surface_type(struct shell_surface *shsurf);
void ico_ivi_shell_send_configure(struct weston_surface *surface,
const uint32_t edges, const int width, const int height);
#define ICO_WINDOW_MGR_ANIMATION_POS 0x10000000
/* wl_buffer (inport from wayland-1.2.0/src/wayland-server.h) */
-struct uifw_wl_buffer {
+struct uifw_wl_buffer { /* struct wl_buffer */
struct wl_resource resource;
int32_t width, height;
uint32_t busy_count;
};
/* __DRIimage (inport from mesa-9.1.3/src/mesa/drivers/dri/intel/intel_regions.h) */
-struct uifw_dri_region {
+struct uifw_intel_region { /* struct intel_region */
void *bo; /**< buffer manager's buffer */
uint32_t refcount; /**< Reference count for region */
uint32_t cpp; /**< bytes per pixel */
uint32_t name; /**< Global name for the bo */
void *screen; /* screen */
};
-struct uifw_dri_image {
- struct uifw_dri_region *region;
+struct uifw_dri_image { /* struct __DRIimageRec */
+ struct uifw_intel_region *region;
int internal_format;
uint32_t dri_format;
uint32_t format;
uint32_t offset;
uint32_t strides[3];
uint32_t offsets[3];
- void *planar_format; /* image_format */
+ void *planar_format; /* intel_image_format */
void *data;
};
BUFFER_TYPE_SHM,
BUFFER_TYPE_EGL
};
-struct uifw_gl_surface_state {
+struct uifw_gl_surface_state { /* struct gl_surface_state */
GLfloat color[4];
struct gl_shader *shader;
int32_t buf_width, buf_height;
float new_x, new_y;
struct weston_layer *wlayer;
+ struct weston_surface *surface, *surfacetmp;
int num_visible = 0;
- uifw_trace("ico_window_mgr_restack_layer: Enter(surf=%08x,omit=%d)",
- (int)usurf, omit_touch);
-
/* make compositor surface list */
- wlayer = ico_ivi_shell_current_layer();
+ wlayer = ico_ivi_shell_weston_layer();
+
+ uifw_trace("ico_window_mgr_restack_layer: Enter(surf=%08x,omit=%d) layer=%08x",
+ (int)usurf, omit_touch, (int)wlayer);
+ /* remove all surfaces in panel_layer */
+ wl_list_for_each_safe(surface, surfacetmp, &wlayer->surface_list, layer_link) {
+ wl_list_remove(&surface->layer_link);
+ wl_list_init(&surface->layer_link);
+ }
wl_list_init(&wlayer->surface_list);
- wl_list_for_each (el, &_ico_win_mgr->ivi_layer_list, link) {
+
+ wl_list_for_each (el, &_ico_win_mgr->ivi_layer_list, link) {
wl_list_for_each (es, &el->surface_list, ivi_layer) {
- if ((es->mapped != 0) && (es->surface != NULL)) {
+ /* if surface not exist or surface type is not TopLevel, Skip */
+ if ((es->surface == NULL) ||
+ (ico_ivi_shell_get_surfacetype(es->shsurf) != SHELL_SURFACE_TOPLEVEL)) {
+ continue;
+ }
+ wl_list_remove(&es->surface->layer_link);
+ wl_list_init(&es->surface->layer_link);
+
+ if (es->mapped != 0) {
if ((el->visible == FALSE) || (es->visible == FALSE) ||
((omit_touch != FALSE) &&
((el->layer_type == ICO_WINDOW_MGR_LAYER_TYPE_INPUT) ||
new_x = (float)(ICO_IVI_MAX_COORDINATE+1);
new_y = (float)(ICO_IVI_MAX_COORDINATE+1);
}
- else if (es->surface->buffer_ref.buffer) {
+ else if (es->surface->buffer_ref.buffer) {
buf_width = weston_surface_buffer_width(es->surface);
buf_height = weston_surface_buffer_height(es->surface);
if (es->width > buf_width) {
else {
new_x = (float)es->x;
}
- if (es->height > buf_height) {
+ if (es->height > buf_height) {
new_y = (float) (es->y +
(es->height - es->surface->geometry.height)/2);
}
weston_surface_damage(es->surface);
}
#if 0 /* too many debug log */
- uifw_debug("ico_window_mgr_restack_layer:%3d(%d).%08x(%d) "
+ uifw_trace("ico_window_mgr_restack_layer:%3d(%d).%08x(%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);
+ el->layer, el->visible, es->surfaceid, (int)es->surface,
+ es->visible, (int)es->surface->geometry.x,
+ (int)es->surface->geometry.y, es->surface->geometry.width,
+ es->surface->geometry.height);
#endif
}
}
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) {
+ if (usurf->visible) {
+ /* no display, change to hide */
+ uifw_set_visible(client, resource, surfaceid, ICO_WINDOW_MGR_VISIBLE_HIDE,
+ ICO_WINDOW_MGR_V_NOCHANGE, 0);
+ }
usurf->disable = 1;
}
node = 0;
{
struct uifw_drm_buffer *drm_buffer;
struct uifw_dri_image *dri_image;
- struct uifw_dri_region *dri_region;
+ struct uifw_intel_region *dri_region;
struct uifw_gl_surface_state *gl_state;
struct weston_surface *es;
uint32_t eglname = 0;
}
if (event != 0) {
+#if 0 /* too many log */
uifw_trace("win_mgr_change_mapsurface: send MAP event(ev=%d surf=%08x name=%08x "
"w/h/s=%d/%d/%d format=%x",
event, sm->usurf->surfaceid, sm->eglname, sm->width, sm->height,
sm->stride, sm->format);
+#endif
ico_window_mgr_send_map_surface(sm->uclient->mgr->resource, event,
sm->usurf->surfaceid, sm->type, sm->eglname,
sm->width, sm->height, sm->stride, sm->format);
_ico_win_mgr->free_maptable = sm;
}
}
- uifw_trace("win_mgr_change_mapsurface: Leave");
}
/*--------------------------------------------------------------------------*/
test_send_event_LDADD = $(SIMPLE_CLIENT_LIBS) $(test_wayland_client)
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_homescreen_CFLAGS = $(GCC_CFLAGS) $(EXT_CFLAGS) $(PLUGIN_CFLAGS)
+test_homescreen_LDADD = $(SIMPLE_CLIENT_LIBS) $(test_protocol_lib) $(test_wayland_client) $(PLUGIN_LIBS)
test_client_SOURCES = test-client.c $(test_common_src)
test_client_LDADD = $(SIMPLE_CLIENT_LIBS) $(test_protocol_lib) $(test_wayland_client)
}
}
+static void
+set_region(struct display *display, char *buf)
+{
+ char *args[10];
+ int narg;
+ int x, y, width, height;
+ int hot_x, hot_y;
+ int c_x, c_y, c_width, c_height;
+
+ narg = pars_command(buf, args, 10);
+ if (narg >= 5) {
+ x = strtol(args[1], (char **)0, 0);
+ y = strtol(args[2], (char **)0, 0);
+ width = strtol(args[3], (char **)0, 0);
+ height = strtol(args[4], (char **)0, 0);
+ hot_x = x + (width / 2);
+ hot_y = y + (height / 2);
+ c_x = x + 5;
+ c_y = y + 5;
+ c_width = width - 10;
+ if (c_width <= 0) c_width = 2;
+ c_height = height - 10;
+ if (c_height <= 0) c_height = 2;
+ print_log("CLIENT: ico_exinput_set_input_region(%s,%d,%d-%d,%d,"
+ "hot=%d,%d,cur=%d,%d-%d,%d,attr=0)",
+ args[0] ? args[0] : "(null)", x, y, width, height,
+ hot_x, hot_y, c_x, c_y, c_width, c_height);
+ if (strcasecmp(args[0], "NULL") == 0) {
+ ico_exinput_set_input_region(display->ico_exinput, "", x, y,
+ width, height, hot_x, hot_y, c_x, c_y,
+ c_width, c_height, 0);
+ }
+ else {
+ ico_exinput_set_input_region(display->ico_exinput, args[0], x, y,
+ width, height, hot_x, hot_y, c_x, c_y,
+ c_width, c_height, 0);
+ }
+ }
+ else {
+ print_log("CLIENT: set_region command[set_region winname@appid x y "
+ "width height] has no argument");
+ }
+}
+
+static void
+unset_region(struct display *display, char *buf)
+{
+ char *args[10];
+ int narg;
+ int x, y, width, height;
+
+ narg = pars_command(buf, args, 10);
+ if (narg >= 1) {
+ if (narg >= 5) {
+ x = strtol(args[1], (char **)0, 0);
+ y = strtol(args[2], (char **)0, 0);
+ width = strtol(args[3], (char **)0, 0);
+ height = strtol(args[4], (char **)0, 0);
+ }
+ else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ print_log("CLIENT: ico_exinput_unset_input_region(%s,08x,%d,%d-%d,%d)",
+ args[0] ? args[0] : "(null)", x, y, width, height);
+ if (strcasecmp(args[0], "NULL") == 0) {
+ ico_exinput_unset_input_region(display->ico_exinput, "", x, y,
+ width, height);
+ }
+ else {
+ ico_exinput_unset_input_region(display->ico_exinput, args[0],
+ x, y, width, height);
+ }
+ }
+ else {
+ print_log("CLIENT: unset_region command[unset_region winname@appid x y "
+ "width height] has no argument");
+ }
+}
+
int main(int argc, char *argv[])
{
struct display *display;
display->init_color = strtoul(&buf[14], (char **)0, 0);
clear_surface(display);
}
+ else if (strncasecmp(buf, "set_region", 10) == 0) {
+ /* set input region */
+ set_region(display, &buf[10]);
+ }
+ else if (strncasecmp(buf, "unset_region", 12) == 0) {
+ /* unset input region */
+ unset_region(display, &buf[12]);
+ }
else if (strncasecmp(buf, "send-state", ret) == 0) {
send_state(display);
}
}
else {
print_log("CLIENT: unknown command[%s]", buf);
- return(-1);
+ return -1;
}
}
if (postsec > 0) {
ret = read(fd, &buf[i], 1);
if (ret < 0) {
- return(ret);
+ return ret;
}
if ((buf[i] == '\n') || (buf[i] == '\r')) break;
strcpy( buf, &buf[j] );
i -= j;
}
- return(i);
+ return i;
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/**
+ * @brief skip_spaces: skip spaces in command input
+ *
+ * @param[in] buf input command string
+ * @return character pointer of not space character
+ */
+/*--------------------------------------------------------------------------*/
+char *
+skip_spaces(char *buf)
+{
+ while ((*buf == ' ') || (*buf == '\t')) {
+ buf++;
+ }
+ return buf;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief pars_command: The word division of the command line
+ *
+ * @param[in] buf input command string
+ * @param[in] pt word pointers (maximum len words)
+ * @param[in] len maximum number of words
+ * @return number of words
+ */
+/*--------------------------------------------------------------------------*/
+int
+pars_command(char *buf, char *pt[], const int len)
+{
+ char *p;
+ int narg;
+
+ memset(pt, 0, sizeof(int *)*10);
+ p = buf;
+ for (narg = 0; narg < len; narg++) {
+ p = skip_spaces(p);
+ if (*p == 0) break;
+ pt[narg] = p;
+ for (; *p; p++) {
+ if ((*p == ' ') || (*p == '\t') ||
+ (*p == '=') || (*p == ',')) break;
+ }
+ if (*p == 0) {
+ narg++;
+ break;
+ }
+ *p = 0;
+ p++;
+ }
+ return narg;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief wayland_dispatch_nonblock: Read from wayland if receive data exist
*
* @param[in] display Wayland connection
if (n == 2) msec *= 10;
sec += msec;
}
- return(sec);
+ return sec;
}
/*--------------------------------------------------------------------------*/
wayland_dispatch_nonblock(display);
- return(dpy);
+ return dpy;
}
/*--------------------------------------------------------------------------*/
opengl_swap_buffer(display, dpy, egl_surface);
- return(egl_surface);
+ return egl_surface;
}
/*--------------------------------------------------------------------------*/
/* Function prototype */
int getdata(void *window_mgr, const char *prompt, int fd, char *buf, const int size);
void print_log(const char *fmt, ...);
+char *skip_spaces(char *buf);
+int pars_command(char *buf, char *pt[], const int len);
void wayland_dispatch_nonblock(struct wl_display *display);
void sleep_with_wayland(struct wl_display *display, int msec);
void wait_with_wayland(struct wl_display *display, int msec, int *endflag);
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);
+ EGLConfig conf, EGLSurface egl_surface, EGLContext ctx, uint32_t name,
+ int width, int height, int stride, uint32_t format);
#endif /*_TEST_COMMON_H_*/
#include <wayland-client.h>
#include "ico_window_mgr-client-protocol.h"
#include "ico_input_mgr-client-protocol.h"
+#include "ico_input_mgr.h"
#include "test-common.h"
#define MAX_APPID 128
}
if (p) {
- return(p->surfaceid);
+ return p->surfaceid;
}
else {
- return(-1);
+ if ((strcasecmp(surfname, "all") == 0) ||
+ (strcasecmp(surfname, "main") == 0)) {
+ return ICO_WINDOW_MGR_V_MAINSURFACE;
+ }
+ return -1;
}
}
if (! p) {
print_log("HOMESCREEN: app(%s) dose not exist", surfname);
}
- return(p);
+ return p;
}
static struct surface_name *
p = display->surface_name;
while (p) {
if (p->surfaceid == surfaceid) {
- return(p);
+ return p;
}
p = p->next;
}
- return(NULL);
+ return NULL;
}
static void
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);
+ display->surface->conf, display->surface->egl_surface,
+ display->surface->ctx, target, width, height, stride, format);
}
}
};
static void
+cb_input_regions(void *data, struct ico_input_mgr_device *ico_input_mgr_device,
+ struct wl_array *regions)
+{
+ struct ico_uifw_input_region *region;
+ int n;
+ char schange[16];
+
+ n = 0;
+ if (regions) {
+ wl_array_for_each(region, regions) {
+ n ++;
+ print_log("HOMESCREEN: Event[input_regions] number of regions=%d", n);
+ }
+ n = 0;
+ wl_array_for_each(region, regions) {
+ n ++;
+ switch (region->change) {
+ case ICO_INPUT_MGR_DEVICE_REGION_ADD:
+ strcpy(schange, "Add");
+ break;
+ case ICO_INPUT_MGR_DEVICE_REGION_REMOVE:
+ strcpy(schange, "Remove");
+ break;
+ case ICO_INPUT_MGR_DEVICE_REGION_REMOVEALL:
+ strcpy(schange, "RemoveAll");
+ break;
+ default:
+ sprintf(schange, "?%d?", region->change);
+ break;
+ }
+ print_log("HOMESCREEN:%2d. %s %d.%08(%d/%d) &d/%d-%d/%d "
+ "hot=%d/%d cur=%d/%d-%d/%d attr=%x",
+ n, schange, region->node, region->surfaceid, region->surface_x,
+ region->surface_y, region->x, region->y, region->width,
+ region->height, region->hotspot_x, region->hotspot_y,
+ region->cursor_x, region->cursor_y, region->cursor_width,
+ region->cursor_height, region->attr);
+ }
+ }
+ else {
+ print_log("HOMESCREEN: Event[input_regions] no region");
+ }
+}
+
+static const struct ico_input_mgr_device_listener device_listener = {
+ cb_input_regions
+};
+
+
+static void
handle_global(void *data, struct wl_registry *registry, uint32_t id,
const char *interface, uint32_t version)
{
else if (strcmp(interface, "ico_input_mgr_device") == 0) {
display->ico_input_device = wl_registry_bind(display->registry, id,
&ico_input_mgr_device_interface, 1);
+ ico_input_mgr_device_add_listener(display->ico_input_device,
+ &device_listener, display);
print_log("HOMESCREEN: created input_device global %p", display->ico_input_device);
}
else if (strcmp(interface, "ico_exinput") == 0) {
handle_global
};
-static char *
-skip_spaces(char *buf)
-{
- while ((*buf == ' ') || (*buf == '\t')) {
- buf++;
- }
- return(buf);
-}
-
-static int
-pars_command(char *buf, char *pt[], const int len)
-{
- char *p;
- int narg;
-
- memset(pt, 0, sizeof(int *)*10);
- p = buf;
- for (narg = 0; narg < len; narg++) {
- p = skip_spaces(p);
- if (*p == 0) break;
- pt[narg] = p;
- for (; *p; p++) {
- if ((*p == ' ') || (*p == '\t') ||
- (*p == '=') || (*p == ',')) break;
- }
- if (*p == 0) {
- narg++;
- break;
- }
- *p = 0;
- p++;
- }
- return (narg);
-}
-
static void
launch_app(struct display *display, char *buf)
{
}
}
+static void
+set_region(struct display *display, char *buf)
+{
+ char *args[10];
+ int narg;
+ int x, y, width, height;
+ int hot_x, hot_y;
+ int c_x, c_y, c_width, c_height;
+
+ narg = pars_command(buf, args, 10);
+ if (narg >= 5) {
+ x = strtol(args[1], (char **)0, 0);
+ y = strtol(args[2], (char **)0, 0);
+ width = strtol(args[3], (char **)0, 0);
+ height = strtol(args[4], (char **)0, 0);
+ hot_x = x + (width / 2);
+ hot_y = y + (height / 2);
+ c_x = x + 5;
+ c_y = y + 5;
+ c_width = width - 10;
+ if (c_width <= 0) c_width = 2;
+ c_height = height - 10;
+ if (c_height <= 0) c_height = 2;
+ print_log("HOMESCREEN: ico_exinput_set_input_region(%s,%d,%d-%d,%d,"
+ "hot=%d,%d,cur=%d,%d-%d,%d,attr=0)",
+ args[0] ? args[0] : "(null)", x, y, width, height,
+ hot_x, hot_y, c_x, c_y, c_width, c_height);
+ if (strcasecmp(args[0], "NULL") == 0) {
+ ico_exinput_set_input_region(display->ico_exinput, "", x, y,
+ width, height, hot_x, hot_y, c_x, c_y,
+ c_width, c_height, 0);
+ }
+ else {
+ ico_exinput_set_input_region(display->ico_exinput, args[0], x, y,
+ width, height, hot_x, hot_y, c_x, c_y,
+ c_width, c_height, 0);
+ }
+ }
+ else {
+ print_log("HOMESCREEN: set_region command[set_region winname@appid x y "
+ "width height] has no argument");
+ }
+}
+
+static void
+unset_region(struct display *display, char *buf)
+{
+ char *args[10];
+ int narg;
+ int x, y, width, height;
+
+ narg = pars_command(buf, args, 10);
+ if (narg >= 1) {
+ if (narg >= 5) {
+ x = strtol(args[1], (char **)0, 0);
+ y = strtol(args[2], (char **)0, 0);
+ width = strtol(args[3], (char **)0, 0);
+ height = strtol(args[4], (char **)0, 0);
+ }
+ else {
+ x = 0;
+ y = 0;
+ width = 0;
+ height = 0;
+ }
+ print_log("HOMESCREEN: ico_exinput_unset_input_region(%s,08x,%d,%d-%d,%d)",
+ args[0] ? args[0] : "(null)", x, y, width, height);
+ if (strcasecmp(args[0], "NULL") == 0) {
+ ico_exinput_unset_input_region(display->ico_exinput, "", x, y,
+ width, height);
+ }
+ else {
+ ico_exinput_unset_input_region(display->ico_exinput, args[0],
+ x, y, width, height);
+ }
+ }
+ else {
+ print_log("HOMESCREEN: unset_region command[unset_region winname@appid x y "
+ "width height] has no argument");
+ }
+}
+
/*
* Main Program
*
/* input switch event */
input_sw(display, &buf[8]);
}
+ else if (strncasecmp(buf, "set_region", 10) == 0) {
+ /* set input region */
+ set_region(display, &buf[10]);
+ }
+ else if (strncasecmp(buf, "unset_region", 12) == 0) {
+ /* unset input region */
+ unset_region(display, &buf[12]);
+ }
+ else if (strncasecmp(buf, "input_sw", 8) == 0) {
+ /* input switch event */
+ input_sw(display, &buf[8]);
+ }
else if (strncasecmp(buf, "sleep", 5) == 0) {
/* Sleep */
msec = sec_str_2_value(&buf[6]);
send_event(NULL);
- return(0);
+ return 0;
}
#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
/*--------------------------------------------------------------------------*/
/**
/*--------------------------------------------------------------------------*/
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)
+ EGLConfig conf, EGLSurface egl_surface, 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
+ print_log("opengl_thumbnail: Not support.");
}
--- /dev/null
+# Test for Weston IVI Plugin for Native Application
+# Surface Create and Exit
+#
+# 1. Create Surface
+create-surface
+sleep 0.5
+set_region @test-client 50 100 30 60
+# 2. Sleep 1 sec with color change
+sleep 0.5
+clear-surface 0x80ff2020
+sleep 0.5
+clear-surface 0xb020ff20
+sleep 0.5
+#
+unset_region @test-client
+#
+clear-surface 0xe02020ff
+sleep 0.5
+clear-surface 0xff808080
+sleep 0.5
+clear-surface 0x80ff2020
+sleep 0.5
+clear-surface 0xb020ff20
+sleep 0.5
+clear-surface 0xe02020ff
+sleep 0.5
+clear-surface 0xff808080
+sleep 0.5
+clear-surface 0x80ff2020
+sleep 0.5
+clear-surface 0xb020ff20
+sleep 0.5
+clear-surface 0xe02020ff
+sleep 0.5
+clear-surface 0xff808080
+sleep 0.5
+clear-surface 0x80ff2020
+sleep 0.5
+clear-surface 0xb020ff20
+sleep 0.5
+clear-surface 0xe02020ff
+sleep 0.5
+clear-surface 0xff808080
+sleep 30
+# 3. End of this Application (exit)
+bye
+
--- /dev/null
+# Test for Weston IVI Plugin for HomeScreen(SystemController)
+# Input region Test
+#
+#
+# 1. Make surfaces
+#
+launch ../tests/test-client < ../tests/testdata/cl_inputregion.dat 2> ../tests/testlog/test-client01.log 1>&2
+waitcreate 2
+show test-client
+sleep 1
+# set region
+## set_region test-client@test-client 50 100 30 60 # request from application
+set_region test-client@test-client 70 200 50 80
+sleep 1
+# unset region
+## unset_region test-client@test-client 50 100 30 60 # request from application
+unset_region test-client@ 70 200 50 80
+sleep 1
+#
+launch ../tests/test-eflapp @1 -color=0xe02040ff 2> ../tests/testlog/test-eflapp.log 1>&2
+waitcreate 2
+move test-eflapp@1 100 150
+show test-eflapp@1
+sleep 1
+#
+# set region
+set_region test-eflapp@@1@test-eflapp@@1 60 90 40 70
+set_region test-eflapp@@1@test0eflapp@@1 80 190 60 100
+sleep 1
+# unset region
+unset_region test-eflapp@@1 main 0 0 0 0
+#
+sleep 2
+kill test-client
+kill test-eflapp@1
+sleep 1
+#
+# 2. End of Test
+bye
+
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
sleep 1
-# 3 Weston/Wayland Envionment
-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
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_alltest.dat 2> ../tests/testlog/test-homescreen.log 1>&2
-# 8 End of Test
+# 7 End of Test
sleep 2
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
sleep 1
-# 3 Weston/Wayland Envionment
-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
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_animatest.dat 2> ../tests/testlog/test-homescreen.log
-# 8 End of Test
+# 7 End of Test
sleep 2
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test
-# Examination to operate only the program of the HomeScreen.
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-rm -fr ../tests/testlog
-mkdir ../tests/testlog
-
-# 2 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
-
-# 3 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 4 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 2
-
-# 5 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 6 Start test-homescreen
-../tests/test-homescreen -prompt=1 2> ../tests/testlog/test-homescreen.log
-
-# 7 End of Test
-sleep 2
-/usr/bin/killall weston
-
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
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
-
-# 4 Set Environment for Test
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_inputtest.dat 2> ../tests/testlog/test-homescreen.log
-# 8 End of Test
+# 7 End of Test
sleep 1
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
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
-
-# 4 Set Environment for Test
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_mapsurf.dat 2> ../tests/testlog/test-homescreen.log
-# 8 End of Test
+# 7 End of Test
sleep 2
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-rm -fr ../tests/testlog
-mkdir ../tests/testlog
-
-# 2 Start Pseudo event device (for Touch Panel)
-#../tests/test-send_event -mq=5551 &
-#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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_alltest.dat 2> ../tests/testlog/test-homescreen.log
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-
#!/bin/sh
#
-# Weston IVI Plugin Test (Resize Buf test)
+# Weston IVI Plugin Test
#
# Remark: This examination premises that Weston does not run.
# 1 Delete log file
-if [ -d ../tests/testlog ] ; then
- rm -fr ../tests/testlog/*
-else
- mkdir ../tests/testlog
-fi
+mkdir ../tests/testlog 2> /dev/null
+rm -fr ../tests/testlog/* 2> /dev/null
-# 2 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
+# 2 Start Pseudo event device (for Touch Panel)
+../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
+sleep 1
# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
# 6 Start test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_slide.dat 2> ../tests/testlog/test-homescreen.log
+../tests/test-homescreen < ../tests/testdata/hs_inputregion.dat 2> ../tests/testlog/test-homescreen.log
# 7 End of Test
-sleep 1
+sleep 2
/usr/bin/killall weston
+/usr/bin/killall test-send_event
sleep 1
-# 8 Check Error
+# 9 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
sleep 1
-# 3 Weston/Wayland Envionment
-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
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_resize.dat 2> ../tests/testlog/test-homescreen.log 1>&2
-# 8 End of Test
+# 7 End of Test
sleep 2
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test (Resize Buf test)
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-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 &
-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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_resize_flower.dat 2> ../tests/testlog/test-homescreen.log
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test (Resize Buf test)
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-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 &
-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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_resize_native.dat 2> ../tests/testlog/test-homescreen.log
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test (Resize Buf test)
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-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 &
-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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-if [ $# != 0 ] ; then
- ../tests/test-homescreen < ../tests/testdata/$1 2> ../tests/testlog/test-homescreen.log
-else
- ../tests/test-homescreen < ../tests/testdata/hs_resize_smoke.dat 2> ../tests/testlog/test-homescreen.log
-fi
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test (Resize Buf test)
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-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 &
-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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_resize_smoke2.dat 2> ../tests/testlog/test-homescreen.log
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-
../tests/test-send_event -d -mq=5551 2> ../tests/testlog/event_log.log &
sleep 1
-# 3 Weston/Wayland Envionment
-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
+# 3 Set Environment for Test
export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-# 5 Start Weston
+# 4 Start Weston
export XDG_CONFIG_HOME="../tests"
MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
+/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log &
sleep 1
-# 6 Set library path
+# 5 Set library path
export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-# 7 Start test-homescreen
+# 6 Start test-homescreen
../tests/test-homescreen < ../tests/testdata/hs_sendinput.dat 2> ../tests/testlog/test-homescreen.log
-# 8 End of Test
+# 7 End of Test
sleep 2
/usr/bin/killall weston
/usr/bin/killall test-send_event
sleep 1
-# 9 Check Error
+# 8 Check Error
FOUND_ERR=0
/bin/grep "ERR>" testlog/*
if [ "$?" != "1" ] ; then
+++ /dev/null
-#!/bin/sh
-#
-# Weston IVI Plugin Test
-#
-# Remark: This examination premises that Weston does not run.
-
-# 1 Delete log file
-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 &
-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
-
-# 4 Set Environment for Test
-export WESTON_IVI_PLUGIN_DIR="../src/.libs"
-
-# 5 Start Weston
-export XDG_CONFIG_HOME="../tests"
-MOD_DIR="$PWD/../src/.libs"
-/usr/bin/weston --backend=drm-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log &
-sleep 1
-
-# 6 Set library path
-export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH
-
-# 7 Start test-homescreen
-gdb ../tests/test-homescreen
-../tests/test-homescreen < ../tests/testdata/hs_inputtest.dat 2> ../tests/testlog/test-homescreen.log
-
-# 8 End of Test
-sleep 1
-/usr/bin/killall weston
-/usr/bin/killall test-send_event
-sleep 1
-
-# 9 Check Error
-FOUND_ERR=0
-/bin/grep "ERR>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "WRN>" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Error" testlog/*
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "error" testlog/* | /bin/grep -v "error_but_no_problem_for_test"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight"
-if [ "$?" != "1" ] ; then
- FOUND_ERR=1
-fi
-
-if [ $FOUND_ERR = 0 ] ; then
- echo "Weston IVI Plugin Test: OK"
-else
- echo "Weston IVI Plugin Test: ERROR"
-fi
-