upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:59:37 +0000 (16:59 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:59:37 +0000 (16:59 +0900)
CMakeLists.txt
debian/changelog
debian/control
include/SLP_Appcore_PG.h
include/appcore-internal.h
packaging/app-core.spec
src/appcore-X.c
src/appcore-efl.c
src/appcore-i18n.c
src/appcore.c

index eaea19b..c776fae 100644 (file)
@@ -31,7 +31,7 @@ SET(HEADERS_common appcore-common.h)
 
 INCLUDE(FindPkgConfig)
 #pkg_check_modules(pkg_common REQUIRED pmapi vconf sensor aul rua dlog x11)
-pkg_check_modules(pkg_common REQUIRED vconf sensor aul rua dlog x11)
+pkg_check_modules(pkg_common REQUIRED vconf sensor aul dlog x11)
 FOREACH(flag ${pkg_common_CFLAGS})
        SET(EXTRA_CFLAGS_common "${EXTRA_CFLAGS_common} ${flag}")
 ENDFOREACH(flag)
index 1f66e2e..ba9b385 100644 (file)
@@ -1,7 +1,7 @@
-app-core (1.2-12) unstable; urgency=low
+app-core (1.2-19) unstable; urgency=low
 
   * Initial release
   * git: pkgs/a/app-core
-  * Tag: app-core_1.2-12
+  * Tag: app-core_1.2-19
 
- -- Jaeho Lee <jaeho81.lee@samsung.com>  Wed, 07 Dec 2011 13:53:56 +0900
+ -- Jaeho Lee <jaeho81.lee@samsung.com>  Tue, 20 Mar 2012 13:51:26 +0900
index 51656e4..6f8c020 100644 (file)
@@ -3,7 +3,7 @@ Section: libs
 Priority: extra
 Maintainer: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>, Yoonkyong Lee <yk6629.lee@samsung.com>
 Uploaders: Wonguk Jeong <wonguk.jeong@samsung.com>, Knhoon Baik <knhoon.baik@samsung.com>, Sangjung Woo <sangjung.woo@samsung.com>, Youmin Ha <youmin.ha@samsung.com>, Noha Park <noha.park@samsung.com>
-Build-Depends: debhelper (>= 5), libslp-sensor-dev, libslp-setting-dev, libelm-dev, libaul-1-dev, librua-dev, dlog-dev, libslp-sysman-dev, libglib2.0-dev
+Build-Depends: debhelper (>= 5), libslp-sensor-dev, libslp-setting-dev, libelm-dev, libaul-1-dev, dlog-dev, libslp-sysman-dev, libglib2.0-dev
 Standards-Version: 3.7.2
 
 Package: libappcore-common-dev
index 843ea18..df4823a 100755 (executable)
@@ -470,10 +470,6 @@ Source example
 159         ad->ly_main = ly;
 160         evas_object_show(ly);
 161 
-162         // init internationalization
-163         r = appcore_set_i18n(PACKAGE, LOCALEDIR);
-164         if (r)
-165                 return -1;
 166         lang_changed(ad); // call the language changed callback to update strings
 167 
 168         evas_object_show(win);
index d539bdc..975d308 100755 (executable)
@@ -157,6 +157,8 @@ struct ui_ops {
 /* appcore-i18n.c */
 extern void update_lang(void);
 extern int set_i18n(const char *domainname, const char *dirname);
+void update_region(void);
+
 
 /* appcore-X.c */
 extern int x_raise_win(pid_t pid);
@@ -164,6 +166,10 @@ extern int x_raise_win(pid_t pid);
 /* appcore-util.c */
 /* extern void stack_trim(void);*/
 
+int appcore_pause_rotation_cb(void);
+int appcore_resume_rotation_cb(void);
+
+
 #define ENV_START "APP_START_TIME"
 
 #define MEMORY_FLUSH_ACTIVATE
index 50e4500..8b338ee 100644 (file)
@@ -1,9 +1,9 @@
 Name:       app-core
 Summary:    Application basic
-Version:       1.2
-Release:    1
+Version:    1.2
+Release:    19
 Group:      TO_BE/FILLED_IN
-License:    Apache-2.0
+License:    Apache License, Version 2.0
 Source0:    app-core-%{version}.tar.gz
 BuildRequires:  pkgconfig(sensor)
 BuildRequires:  pkgconfig(vconf)
@@ -18,6 +18,7 @@ BuildRequires:  pkgconfig(ecore-x)
 BuildRequires:  pkgconfig(gobject-2.0)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  cmake
+BuildRequires:  sysman-devel
 
 
 %description
@@ -78,9 +79,11 @@ Application basics template
 %build
 CFLAGS="-I/usr/lib/glib-2.0/include/ -I/usr/include/glib-2.0 -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/include/e_dbus-1 -I/usr/include/ethumb-0 -I/usr/include/edje-1 -I/usr/include/efreet-1 -I/usr/include/embryo-1 -I/usr/include/ecore-1 -I/usr/include/eet-1 -I/usr/include/evas-1 -I/usr/include/eina-1 -I/usr/include/eina-1/eina  $(CFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DENABLE_GTK=OFF
 
+
 make %{?jobs:-j%jobs}
 
 %install
+rm -rf %{buildroot}
 %make_install
 
 
@@ -95,6 +98,7 @@ make %{?jobs:-j%jobs}
 
 
 
+
 %files efl
 %{_libdir}/libappcore-efl.so.*
 
index 2a2e6fb..8595860 100755 (executable)
@@ -44,9 +44,16 @@ static pid_t __get_win_pid(Display *d, Window win)
        unsigned long nitems;
        unsigned long bytes_after;
        unsigned char *prop_ret;
+       XWindowAttributes attr;
 
        _retv_if(d == NULL || !a_pid, -1);
 
+       if (!XGetWindowAttributes(d, win, &attr))
+               return -1;
+
+       if (attr.override_redirect || attr.class == InputOnly)
+               return -1;
+
        prop_ret = NULL;
        r = XGetWindowProperty(d, win, a_pid, 0, 1, False, XA_CARDINAL,
                               &a_type, &format, &nitems, &bytes_after,
index 3498553..12bc788 100755 (executable)
@@ -78,18 +78,20 @@ struct win_node {
        bool bfobscured;
 };
 
-static int WIN_COMP(struct win_node *a, struct win_node *b) 
+static int WIN_COMP(gconstpointer data1, gconstpointer data2)
 {
+       struct win_node *a = (struct win_node *)data1;
+       struct win_node *b = (struct win_node *)data2;
        return (int)((a->win)-(b->win));
 }
 
-static struct win_node *win_h;
 GSList *g_winnode_list;
 
-
 #if defined(MEMORY_FLUSH_ACTIVATE)
-static Eina_Bool __appcore_memory_flush_cb(struct ui_priv *ui)
+static Eina_Bool __appcore_memory_flush_cb(void *data)
 {
+       struct ui_priv *ui = (struct ui_priv *)data;
+
        appcore_flush_memory();
        ui->mftimer = NULL;
 
@@ -135,12 +137,12 @@ static int __appcore_low_memory_post_cb(ui_priv *ui)
 static void __appcore_efl_memory_flush_cb(void)
 {
        _DBG("[APP %d]   __appcore_efl_memory_flush_cb()", _pid);
-       elm_all_flush();
+       elm_cache_all_flush();
 }
 
 static void __do_app(enum app_event event, void *data, bundle * b)
 {
-       int r;
+       int r = -1;
        struct ui_priv *ui = data;
 
        _DBG("[APP %d] Event: %d", _pid, event);
@@ -304,6 +306,8 @@ static bool __delete_win(unsigned int win)
        g_winnode_list = g_slist_remove_link(g_winnode_list, f);
 
        free(f->data);
+
+       return TRUE;
 }
 
 static bool __update_win(unsigned int win, bool bfobscured)
index 756a314..de03620 100755 (executable)
@@ -129,7 +129,7 @@ EXPORT_API int appcore_get_timeformat(enum appcore_time_format *timeformat)
                return -1;
        }
 
-       r = vconf_get_int(VCONFKEY_REGIONFORMAT_TIME1224, timeformat);
+       r = vconf_get_int(VCONFKEY_REGIONFORMAT_TIME1224, (int *)timeformat);
 
        if (r < 0) {
                *timeformat = APPCORE_TIME_FORMAT_UNKNOWN;
index 13cbc31..348f9ca 100755 (executable)
@@ -35,7 +35,6 @@
 #include <dlfcn.h>
 #include <vconf.h>
 #include <aul.h>
-#include <rua.h>
 #include "appcore-internal.h"
 
 #define SQLITE_FLUSH_MAX               (1024*1024)
@@ -99,6 +98,8 @@ static int __sys_langchg_pre(void *data, void *evt);
 static int __sys_langchg(void *data, void *evt);
 static int __sys_regionchg_pre(void *data, void *evt);
 static int __sys_regionchg(void *data, void *evt);
+extern void aul_finalize();
+
 
 static struct evt_ops evtops[] = {
        {
@@ -150,66 +151,6 @@ static int __get_dir_name(char *dirname)
        return 0;
 }
 
-
-static int __get_cmd(char *buf)
-{
-       FILE *fp;
-       int r;
-       char fname[FILENAME_MAX];
-
-       r = snprintf(fname, sizeof(fname), "/proc/%d/cmdline", getpid());
-       if (r < 0)
-               return -1;
-
-       fp = fopen(fname, "r");
-       if (fp == NULL)
-               return -1;
-
-       r = 0;
-       if (fgets(buf, PATH_MAX, fp) == NULL)
-               r = -1;
-
-       fclose(fp);
-
-       return r;
-}
-
-static int __update_rua(bundle *b)
-{
-       int r;
-       char buf[PATH_MAX];
-       struct rua_rec rec;
-
-       r = __get_cmd(buf);
-       if (r == -1)
-               return -1;
-
-       r = rua_init();
-       if (r == -1) {
-               _DBG("[APP %d] rua init error", _pid);
-               return -1;
-       }
-
-       memset(&rec, 0, sizeof(rec));
-
-       rec.pkg_name = getenv("PKG_NAME");
-       rec.app_path = buf;
-
-       if (b)
-               bundle_encode(b, (bundle_raw **)&rec.arg, NULL);
-
-       r = rua_add_history(&rec);
-       if (r == -1)
-               _DBG("[APP %d] rua add history error", _pid);
-
-       rua_fini();
-
-       if (rec.arg)
-               free(rec.arg);
-
-       return 0;
-}
-
 static int __app_terminate(void *data)
 {
        struct appcore *ac = data;
@@ -242,7 +183,6 @@ static int __app_reset(void *data, bundle * k)
        g_idle_add(__prt_ltime, ac);
 
        ac->ops->cb_app(AE_RESET, ac->ops->data, k);
-       __update_rua(k);
 
        return 0;
 }
@@ -250,15 +190,9 @@ static int __app_reset(void *data, bundle * k)
 static int __app_resume(void *data)
 {
        x_raise_win(getpid());
-       __update_rua(NULL);
        return 0;
 }
 
-static int __def_lowbatt(struct appcore *ac)
-{
-       return __app_terminate(ac);
-}
-
 static int __sys_do_default(struct appcore *ac, enum sys_event event)
 {
        int r;
@@ -557,6 +491,7 @@ EXPORT_API void appcore_exit(void)
                __del_vconf();
                __clear(&core);
        }
+       aul_finalize();
 }
 
 EXPORT_API int appcore_flush_memory(void)