update for beta release
authorGwanglim Lee <gl77.lee@samsung.com>
Fri, 17 Feb 2012 06:00:49 +0000 (15:00 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Fri, 17 Feb 2012 06:00:49 +0000 (15:00 +0900)
16 files changed:
TC/_export_env.sh [new file with mode: 0755]
TC/_export_target_env.sh [new file with mode: 0755]
TC/build.sh [new file with mode: 0755]
TC/clean.sh [new file with mode: 0755]
TC/config [new file with mode: 0755]
TC/execute.sh [new file with mode: 0755]
TC/testcase/Makefile [new file with mode: 0755]
TC/testcase/tslist [new file with mode: 0755]
TC/testcase/utc_utilx_test.c [new file with mode: 0644]
TC/tet_scen [new file with mode: 0755]
TC/tetbuild.cfg [new file with mode: 0755]
TC/tetclean.cfg [new file with mode: 0755]
TC/tetexec.cfg [new file with mode: 0755]
debian/changelog
utilX.h [changed mode: 0644->0755]
x11.c [changed mode: 0644->0755]

diff --git a/TC/_export_env.sh b/TC/_export_env.sh
new file mode 100755 (executable)
index 0000000..72a11ec
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. ./config
+export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh
new file mode 100755 (executable)
index 0000000..5ddaa53
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+. ./config
+export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/build.sh b/TC/build.sh
new file mode 100755 (executable)
index 0000000..72aad6c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. ./_export_env.sh                              # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -c -p ./
+tcc -b -j $JOURNAL_RESULT -p ./
+grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/clean.sh b/TC/clean.sh
new file mode 100755 (executable)
index 0000000..29743e0
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+. ./_export_env.sh                              # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+RESULT_DIR=results
+
+tcc -c -p ./                                # executing tcc, with clean option (-c)
+rm -r $RESULT_DIR
+rm -r tet_tmp_dir
+rm testcase/tet_captured
diff --git a/TC/config b/TC/config
new file mode 100755 (executable)
index 0000000..c7eae66
--- /dev/null
+++ b/TC/config
@@ -0,0 +1,2 @@
+TET_INSTALL_HOST_PATH=/home/nfs_mount/TETware
+TET_INSTALL_TARGET_PATH=/mnt/nfs/TETware
diff --git a/TC/execute.sh b/TC/execute.sh
new file mode 100755 (executable)
index 0000000..a4f6095
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. ./_export_target_env.sh                    # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -e -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile
new file mode 100755 (executable)
index 0000000..dbbc399
--- /dev/null
@@ -0,0 +1,26 @@
+CC = gcc
+
+C_FILES = $(shell ls *.c)
+
+PKGS = elementary ecore-x ecore evas x11 dlog glib-2.0 utilX
+
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+LDFLAGS += `pkg-config --libs $(PKGS)`
+
+CFLAGS += `pkg-config --cflags $(PKGS)`
+CFLAGS += -I.
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+#TARGETS = $(C_FILES:%.c=tc-%)
+TCS := $(shell ls -1 *.c | cut -d. -f1)
+
+all: $(TCS)
+
+%: %.c
+       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f $(TCS)
diff --git a/TC/testcase/tslist b/TC/testcase/tslist
new file mode 100755 (executable)
index 0000000..81af698
--- /dev/null
@@ -0,0 +1 @@
+/testcase/utc_utilx_test
diff --git a/TC/testcase/utc_utilx_test.c b/TC/testcase/utc_utilx_test.c
new file mode 100644 (file)
index 0000000..c52b09d
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <tet_api.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_utilx_enable_indicator(void);
+
+
+struct tet_testlist tet_testlist[] = {
+       { utc_utilx_enable_indicator, 1 },
+       // Do not remove below line
+       { NULL, 0 },
+};
+
+static void startup(void)
+{
+       /* start of TC */
+}
+
+static void cleanup(void)
+{
+       /* end of TC */
+}
+
+
+/**
+ * @brief test case of utilx_enable_indicator()
+ */
+static void utc_utilx_enable_indicator(void)
+{
+       Display* dpy;
+       Window root, win;
+       int ret;
+
+       dpy = XOpenDisplay(NULL);
+       root = XDefaultRootWindow(dpy);
+
+       win = XCreateSimpleWindow(dpy, root, 0, 0, 480, 800, 2, BlackPixel(dpy,0), WhitePixel(dpy,0));
+       XMapWindow(dpy, win);
+
+       // If the win want to show indicator, enables indicator.
+       utilx_enable_indicator(dpy, win, 1);
+       XFlush(dpy);
+
+       ret = 1;
+
+       if(ret)
+       {
+               dts_pass("utc_efl_util_set_notification_window_level_positive", "passed");
+       }
+       else
+       {
+               dts_fail("utc_efl_util_set_notification_window_level_positive", "failed");
+       }
+}
+
diff --git a/TC/tet_scen b/TC/tet_scen
new file mode 100755 (executable)
index 0000000..03f029a
--- /dev/null
@@ -0,0 +1,7 @@
+all
+       ^TEST
+##### Scenarios for TEST #####
+
+# Test scenario
+TEST
+       :include:/testcase/tslist
diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg
new file mode 100755 (executable)
index 0000000..f7eda55
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capture option for build operation checking
+TET_BUILD_TOOL=make # build with using make command
+TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build
+TET_API_COMPLIANT=True # use TET API in Test Case ?
+TET_PASS_TC_NAME=True # report passed TC name in Journal file?
diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg
new file mode 100755 (executable)
index 0000000..02d7030
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capture option
+TET_CLEAN_TOOL= make clean # clean tool
+TET_CLEAN_FILE= Makefile # file for clean
+TET_API_COMPLIANT=True # TET API useage 
+TET_PASS_TC_NAME=True # showing name , passed TC
diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg
new file mode 100755 (executable)
index 0000000..ef3e452
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capturing execution or not
+TET_EXEC_TOOL=  # ex) exec : execution tool set up/ Optional
+TET_EXEC_FILE=   # ex) exectool : execution file/ Optional
+TET_API_COMPLIANT=True # Test case or Tool usesTET API?
+TET_PASS_TC_NAME=True # showing Passed TC name ?
index 0098e07..4bb2ce0 100644 (file)
@@ -1,3 +1,19 @@
+libslp-utilx (0.1.7-2) unstable; urgency=low
+
+  * Add a key string (KEY_MEDIA) for Earset multimedia key 
+  * Git: slp/pkgs/l/libslp-utilx
+  * Tag: libslp-utilx_0.1.7-2
+
+ -- Sung-Jin Park <sj76.park@samsung.com>  Thu, 02 Feb 2012 17:18:19 +0900
+
+libslp-utilx (0.1.7-1) unstable; urgency=low
+
+  * Fix a bug related to OR_EXCLUSIVE_GRAB mode in utilx_grab_key()
+  * Git: slp/pkgs/l/libslp-utilx
+  * Tag: libslp-utilx_0.1.7-1
+
+ -- Sung-Jin Park <sj76.park@samsung.com>  Tue, 20 Dec 2011 11:41:28 +0900
+
 libslp-utilx (0.1.7-0) unstable; urgency=low
 
   * Add an API - utilx_show_capture_effect.
diff --git a/utilX.h b/utilX.h
old mode 100644 (file)
new mode 100755 (executable)
index 1644b22..faa26e6
--- a/utilX.h
+++ b/utilX.h
@@ -67,6 +67,7 @@ extern "C" {
 #define KEY_PREVIOUSSONG       "XF86AudioPrev" /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Previous Song' key */
 #define KEY_REWIND             "XF86AudioRewind"       /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Rewind Song' key */
 #define KEY_FASTFORWARD                "XF86AudioForward"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Forward Song' key */
+#define KEY_MEDIA              "XF86AudioMedia"        /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Media' key */
 
 // 3-Touch key
 #define KEY_SEND               "XF86Send"      /**< this macro means the XKeySym (XServer Key Symbol) corresponds to 'Send' key */
@@ -95,6 +96,7 @@ extern "C" {
 #define LEN_KEY_PREVIOUSSONG           13/**< this macro is the length of string corresponds to 'Previous Song' key */
 #define LEN_KEY_REWIND         15/**< this macro is the length of string corresponds to 'Rewind Song' key */
 #define LEN_KEY_FASTFORWARD            16/**< this macro is the length of string corresponds to 'Forwand Song' key */
+#define LEN_KEY_MEDIA          14/**< this macro is the length of string corresponds to 'Media' key */
 
 // 3-Touch key
 #define LEN_KEY_SEND           8       /**< this macro is the length of string corresponds to 'Send' key */
diff --git a/x11.c b/x11.c
old mode 100644 (file)
new mode 100755 (executable)
index 1d669a3..51659fa
--- a/x11.c
+++ b/x11.c
@@ -375,6 +375,7 @@ static int *_del_grabbed_key (int *key_list, int i, unsigned long *cnt)
 
 static void _set_exclusive_grab_info_to_root (Display *disp, int keycode, Window win, int grab_mode)
 {
+       int i;
        int *key_list = NULL;
 
        Atom ret_type;
@@ -407,10 +408,16 @@ static void _set_exclusive_grab_info_to_root (Display *disp, int keycode, Window
                goto out;
        }
 
-#if 1//def __DEBUG__
+#ifdef __DEBUG__
        printf("[%s] keycode = %d\n", __FUNCTION__, keycode);
 #endif
 
+       for( i=0 ; i < nr_item ; i++ )
+       {
+               if( key_list && (key_list[i] == keycode) )
+                       return;
+       }
+
        XChangeProperty(disp, DefaultRootWindow(disp), ex_grabwin, XA_CARDINAL, 32,
        nr_item ? PropModeAppend : PropModeReplace, (unsigned char *)&keycode, 1);
        XSync(disp, False);
@@ -625,8 +632,15 @@ API int utilx_grab_key (Display* disp, Window win, const char* key, int grab_mod
                i = _search_grabbed_key(key_list, keycode, cnt);
                _free_list_of_grabbed_key(key_list);
                if ( i != -1 ) {
+                       if( grab_mode == OR_EXCLUSIVE_GRAB )
+                       {
+                               utilx_ungrab_key(disp, win, key);
+                       }
+                       else
+                       {
                        fprintf(stderr, "Key is already grabbed\n");
                        goto out;
+                       }
                }
        }
 
@@ -759,7 +773,8 @@ API Utilx_Key_Status utilx_get_key_status(Display* dpy, char *key_name)
                !strncmp(key_name, KEY_NEXTSONG, LEN_KEY_NEXTSONG) ||
                !strncmp(key_name, KEY_PREVIOUSSONG, LEN_KEY_PREVIOUSSONG) ||
                !strncmp(key_name, KEY_REWIND, LEN_KEY_REWIND) ||
-               !strncmp(key_name, KEY_FASTFORWARD, LEN_KEY_FASTFORWARD) )
+               !strncmp(key_name, KEY_FASTFORWARD, LEN_KEY_FASTFORWARD) ||
+               !strncmp(key_name, KEY_MEDIA, LEN_KEY_MEDIA) )
        {
                KeySym ks = XStringToKeysym(key_name);
                KeyCode kc = XKeysymToKeycode(dpy, ks);