AM_PROG_CC_STDC
AM_PROG_CC_C_O
+## X11
+AC_ARG_WITH([x11],
+ AC_HELP_STRING([--with-x11], [use x11]),
+ [WITH_X="yes"
+ AC_SUBST([WITH_X])], [WITH_X="no"])
+if test "x${WITH_X}" = x"yes"; then
+ AC_DEFINE_UNQUOTED([HAVE_X],[1],[define HAVE_X])
+fi
+AM_CONDITIONAL(HAVE_X, [test "${WITH_X}" = x"yes"])
+
+## Wayland
+AC_ARG_WITH([wayland],
+ AC_HELP_STRING([--with-wayland], [use wayland]),
+ [WITH_WAYLAND="yes"
+ AC_SUBST([WIHT_WAYLAND])], [WITH_WAYLAND="no"])
+if test "x${WITH_WAYLAND}" = x"yes"; then
+ AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[define HAVE_WAYLAND])
+fi
+AM_CONDITIONAL(HAVE_WAYLAND, [test "${WITH_WAYLAND}" = x"yes"])
+
requirements="\
elementary \
eldbus \
enlightenment \
- capi-ui-efl-util \
- "
+ capi-ui-efl-util"
+
+if test "x$WITH_WAYLAND" = x"yes"; then
+requirements="$requirements \
+ wayland-client \
+ ecore-wayland"
+fi
PKG_CHECK_MODULES(E_TEST_RUNNER, [${requirements}])
+%bcond_with wayland
%bcond_with x
Name: e-tizen-testcase
BuildRequires: pkgconfig(capi-ui-efl-util)
BuildRequires: gettext
-%if !%{with x}
-ExclusiveArch:
-%endif
-
%description
This package is a test case runner for enlightenment.
export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
%autogen
-%configure --prefix=/usr
+%configure --prefix=/usr \
+%if %{with x}
+ --with-x11
+%endif
+%if %{with wayland}
+ --with-wayland
+%endif
make %{?_smp_mflags}
%install
tw = tc->data->tw;
- e_tc_win_stack_change(tw, NULL, EINA_TRUE);
+ e_test_runner_req_win_stack_set(tc->runner, tw, NULL, EINA_TRUE);
res = e_test_runner_ev_wait(tc->runner, E_TC_EVENT_TYPE_STACK_RAISE);
EINA_SAFETY_ON_FALSE_GOTO(res, cleanup);
tw = tc->data->tw;
- e_tc_win_stack_change(tw, NULL, EINA_FALSE);
+ e_test_runner_req_win_stack_set(tc->runner, tw, NULL, EINA_FALSE);
res = e_test_runner_ev_wait(tc->runner, E_TC_EVENT_TYPE_STACK_LOWER);
EINA_SAFETY_ON_FALSE_GOTO(res, cleanup);
tw_parent = tc->data->tw_parent;
tw_child = tc->data->tw_child;
- e_tc_win_stack_change(tw_parent, tw, EINA_TRUE);
+ e_test_runner_req_win_stack_set(tc->runner, tw_parent, tw, EINA_TRUE);
res = e_test_runner_ev_wait(tc->runner, E_TC_EVENT_TYPE_STACK_ABOVE);
EINA_SAFETY_ON_FALSE_GOTO(res, cleanup);
tw_parent = tc->data->tw_parent;
tw_child = tc->data->tw_child;
- e_tc_win_stack_change(tw_parent, tw, EINA_FALSE);
+ e_test_runner_req_win_stack_set(tc->runner, tw_parent, tw, EINA_FALSE);
res = e_test_runner_ev_wait(tc->runner, E_TC_EVENT_TYPE_STACK_BELOW);
EINA_SAFETY_ON_FALSE_GOTO(res, cleanup);
return allowed;
}
+Eina_Bool
+e_test_runner_req_win_stack_set(E_Test_Runner *runner,
+ E_TC_Win *tw,
+ E_TC_Win *sibling,
+ Eina_Bool above)
+{
+ Eldbus_Pending *p;
+ p = eldbus_proxy_call(runner->dbus.proxy,
+ "SetWindowStack",
+ NULL,
+ NULL,
+ -1,
+ "uui",
+ tw->native_win,
+ sibling? sibling->native_win : 0,
+ above);
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(p != NULL, EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
Eina_List *
e_test_runner_req_win_info_list_get(E_Test_Runner *runner)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tw, NULL);
tw->elm_win = elm_win;
- tw->native_win = elm_win_xwindow_get(elm_win); // TODO: wayland
+ tw->native_win = elm_win_window_id_get(elm_win);
tw->name = eina_stringshare_add(name);
tw->x = x;
tw->y = y;
tw->layer = layer;
tw->alpha = alpha;
+#if HAVE_WAYLAND
+ tw->native_win = ((uint64_t)tw->native_win << 32) + getpid();
+#endif
+
return tw;
err:
evas_object_hide(tw->elm_win);
}
-void
-e_tc_win_stack_change(E_TC_Win *tw, E_TC_Win *sibling, Eina_Bool above)
-{
- /* TODO */
- if (sibling)
- {
- if (above)
- {
- ; // stack above: window is placed above sibling window.
- }
- else
- {
- ; // stack below: window is placed below sibling window.
- }
- }
- else
- {
- if (above)
- {
- ; // raise: window is placed at the top of stack.
- }
- else
- {
- ; // lower: window is placed at the bottom of stack.
- }
- }
-}
-
static E_TC *
_e_tc_add(unsigned int num,
const char *name,
#ifndef E_TC_MAIN_H
#define E_TC_MAIN_H
+#include "config.h"
#include <Eldbus.h>
#include <Elementary.h>
Eina_Bool e_test_runner_req_win_register(E_Test_Runner *runner, E_TC_Win *tw);
Eina_Bool e_test_runner_req_win_deregister(E_Test_Runner *runner, E_TC_Win *tw);
Eina_List *e_test_runner_req_win_info_list_get(E_Test_Runner *runner);
+Eina_Bool e_test_runner_req_win_stack_set(E_Test_Runner *runner, E_TC_Win *tw, E_TC_Win *sibling, Eina_Bool above);
Eina_Bool e_test_runner_ev_wait(E_Test_Runner *runner, E_TC_Event_Type ev);
E_TC_Win *e_tc_win_add(E_TC_Win *parent, Elm_Win_Type type, Eina_Bool alpha, const char *name, int x, int y, int w, int h, int layer);
void e_tc_win_geom_update(E_TC_Win *tw);
void e_tc_win_show(E_TC_Win *tw);
void e_tc_win_hide(E_TC_Win *tw);
-void e_tc_win_stack_change(E_TC_Win *tw, E_TC_Win *sibling, Eina_Bool above);
/* test cases */
Eina_Bool tc_0000_base_pass(E_TC *tc);