diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:12:42 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:12:42 +0900 |
commit | 11a58e2aed32893adf9d71c16914bcdbbe7836b4 (patch) | |
tree | f38613f2cfb6400941c1845b0622ddccb819babf /test | |
parent | 0a52e4e6079e7b2342c10e1a818bc5b6d8684b2c (diff) | |
download | shortcut-11a58e2aed32893adf9d71c16914bcdbbe7836b4.tar.gz shortcut-11a58e2aed32893adf9d71c16914bcdbbe7836b4.tar.bz2 shortcut-11a58e2aed32893adf9d71c16914bcdbbe7836b4.zip |
merge with master
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile | 5 | ||||
-rw-r--r-- | test/application.c | 14 | ||||
-rw-r--r-- | test/homescreen.c | 16 | ||||
-rw-r--r-- | test/shortcut.c | 41 |
4 files changed, 61 insertions, 15 deletions
diff --git a/test/Makefile b/test/Makefile index 45201b2..abe5c1b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,3 +1,4 @@ all: - @gcc homescreen.c -o homescreen `pkg-config ecore elementary shortcut --cflags --libs` - @gcc application.c -o application `pkg-config ecore elementary shortcut --cflags --libs` + @gcc homescreen.c -Wall -o homescreen `pkg-config ecore elementary shortcut --cflags --libs` + @gcc application.c -Wall -o application `pkg-config ecore elementary shortcut --cflags --libs` + @gcc shortcut.c -Wall -o shortcut `pkg-config ecore elementary shortcut --cflags --libs` diff --git a/test/application.c b/test/application.c index fd1f3b7..563273e 100644 --- a/test/application.c +++ b/test/application.c @@ -1,18 +1,19 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * - * Licensed under the Flora License, Version 1.0 (the "License"); + * 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.tizenopensource.org/license + * 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 <Elementary.h> #include <shortcut.h> @@ -28,9 +29,12 @@ static Eina_Bool shortcut_add_cb(void *data) { int ret; - ret = shortcut_add_to_home("MyName", 0, "/usr/bin/true", "/opt/share/image/what.png", result_cb, NULL); + ret = add_to_home_shortcut("pkgname", "MyName", 0, "/usr/bin/true", "/opt/share/image/what.png", result_cb, NULL); printf("Client: shortcut_add_to_home returns: %d\n", ret); + ret = add_to_home_livebox("pkgname", "MyName", 0, "/usr/bin/true", "/opt/share/image/what.png", 1.0f, result_cb, NULL); + printf("Client: shortcut_add_to_home_with_period returns: %d\n", ret); + return ECORE_CALLBACK_RENEW; } diff --git a/test/homescreen.c b/test/homescreen.c index 5a05357..68a221b 100644 --- a/test/homescreen.c +++ b/test/homescreen.c @@ -1,32 +1,32 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * - * Licensed under the Flora License, Version 1.0 (the "License"); + * 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.tizenopensource.org/license + * 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 <Elementary.h> #include <shortcut.h> -int shortcut_request_cb(const char *name, int type, const char *exec, const char *icon, int pid, void *data) +int shortcut_request_cb(const char *pkgname, const char *name, int type, const char *exec, const char *icon, int pid, double period, void *data) { - printf("SERVER: name: %s, type: %d, exec: %s, icon: %s, pid: %d, data: %p\n", - name, type, exec, icon, pid, data); + printf("SERVER: name: %s, type: %d, exec: %s, icon: %s, pid: %d, data: %p, period: %lf\n", + name, type, exec, icon, pid, data, period); return 0; } int elm_main(int argc, char *argv[]) { - int ret; shortcut_set_request_cb(shortcut_request_cb, NULL); elm_run(); diff --git a/test/shortcut.c b/test/shortcut.c new file mode 100644 index 0000000..d6c7012 --- /dev/null +++ b/test/shortcut.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000 - 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 <Elementary.h> +#include <shortcut.h> + +static int shortcut_list_cb(const char *appid, const char *icon, const char *name, const char *extra_key, const char *extra_data, void *data) +{ + printf("appid[%s] icon[%s], name[%s] extra_key[%s], extra_ata[%s]\n", appid, icon, name, extra_key, extra_data); + return 0; +} + +int elm_main(int argc, char *argv[]) +{ + int ret; + ret = shortcut_get_list(NULL, shortcut_list_cb, NULL); + if (ret < 0) + printf("Error: %d\n", ret); + + elm_run(); + elm_shutdown(); + + return 0; +} + +ELM_MAIN() +/* End of a file */ |