ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 dlog x11 ecore-x capi-appfw-application elementary aul ecore dbus-glib-1 capi-appfw-app-manager pkgmgr-info)
+PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 dlog x11 ecore-x capi-appfw-application elementary aul ecore dbus-glib-1 pkgmgr-info)
FOREACH(flag ${PKGS_CFLAGS})
SET(CFLAGS "${CFLAGS} ${flag}")
ENDFOREACH(flag)
#include <Ecore_X.h>
#include <dlog.h>
#include <aul.h>
-#include <app.h>
#include <app_control_internal.h>
#include <vconf.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <pkgmgr-info.h>
+#include <bundle_internal.h>
#ifdef _APPFW_FEATURE_UG_PROCESS_POOL
#include <privilege-control.h>
#define UG_CLIENT_API __attribute__((visibility("default")))
-#define BROWSER_APP_ID "com.samsung.browser"
+#define BROWSER_APP_ID "org.tizen.browser"
extern int appsvc_request_transient_app(bundle *b, Ecore_X_Window callee_id, appsvc_host_res_fn cbfunc, void *data);
if((ret == APP_CONTROL_ERROR_NONE) && (value)) {
result = atoi(value);
LOGD("reply result is %d", result);
- free(value);
} else {
LOGW("get reply result error(%d) . result will be APP_CONTROL_RESULT_SUCCEEDED", ret);
result = APP_CONTROL_RESULT_SUCCEEDED;
#else
#ifdef _APPFW_FEATURE_APP_CONTROL_LITE
- elm_config_preferred_engine_set("opengl_x11");
+ elm_config_accel_preference_set("3d");
#endif
#ifdef _APPFW_FEATURE_UG_PROCESS_POOL
- elm_config_preferred_engine_set("opengl_x11");
+ elm_config_accel_preference_set("3d");
#endif
Evas_Object *eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
{
const char *key;
const char *val;
- key = strtok((char *)optarg, ",");
+ char *save_ptr = NULL;
+
+ key = strtok_r((char *)optarg, ",", &save_ptr);
if (!key)
return -1;
LOGD("app_create");
- elm_app_base_scale_set(1.8);
+ elm_app_base_scale_set(2.4);
/* create window */
win = _ug_client_create_win(PACKAGE);
#define __TIZEN_CORE_LIB_UI_GADGET_DOC_H__
/**
- * @internal
* @defgroup CORE_LIB_GROUP_UI_GADGET_MODULE UI Gadget
* @brief The UI gadget is a visual component providing views(or features) of other applications.
* @ingroup CAPI_APPLICATION_FRAMEWORK
*/
/**
- * @internal
* @defgroup CORE_LIB_GROUP_UI_GADGET_MODULE_MODULE UI Gadget Module
* @brief
* @ingroup CORE_LIB_GROUP_UI_GADGET_MODULE
int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt);
int ugman_resume(void);
+int ugman_resume_ug(ui_gadget_h ug);
int ugman_pause(void);
+int ugman_pause_ug(ui_gadget_h ug);
int ugman_send_event(enum ug_event event);
int ugman_send_key_event(enum ug_key_event event);
int ugman_send_message(ui_gadget_h ug, app_control_h msg);
*/
/**
- * @internal
* @addtogroup CORE_LIB_GROUP_UI_GADGET_MODULE_MODULE
* @{
*/
*/
/**
- * @internal
* @addtogroup CORE_LIB_GROUP_UI_GADGET_MODULE
* @{
*/
* @param[in] win The Default window object, it is void pointer for supporting both GTK (GtkWidget *) and EFL (Evas_Object *)
* @param[in] opt The Default indicator state to restore application's indicator state
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @see UG_INIT_EFL()
* @param[in] mode The mode of the UI gadget (UG_MODE_FULLVIEW | UG_MODE_FRAMEVIEW)
* @param[in] app_control The argument for the UI gadget (see @ref app_control_PG "Tizen managed api reference guide")
*
- * @return The pointer of UI gadget,
+ * @return The pointer of UI gadget,
* otherwise @c NULL on error
*
* @pre ug_init() should be called.
*
* @since_tizen 2.3
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called.
*
* @since_tizen 2.3
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called.
*
* @param[in] ug The UI gadget
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called \n
*
* @since_tizen 2.3
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called.
*
* @param[in] ug The UI gadget
*
- * @return The pointer of the base layout,
+ * @return The pointer of the base layout,
* otherwise @c NULL on error \n
* The result value is a void pointer that supports both GTK (GtkWidget *) and EFL (Evas_Object *).
*
*
* @param[in] ug The UI gadget
*
- * @return The pointer of the base layout,
+ * @return The pointer of the base layout,
* otherwise @c NULL on error \n
The result value is a void pointer that supports both GTK (GtkWidget *) and EFL (Evas_Object *).
*
*
* @since_tizen 2.3
*
- * @return The pointer of a default window,
+ * @return The pointer of a default window,
* otherwise @c NULL on error \n
* The result value is void pointer that supports both GTK (GtkWidget *) and EFL (Evas_Object *).
*
*
* @since_tizen 2.3
*
- * @return The pointer of the default window,
+ * @return The pointer of the default window,
* otherwise @c NULL on error \n
* The result value is a void pointer for supporting both GTK (GtkWidget *) and EFL (Evas_Object *).
*
*
* @param[in] The event UI gadget event (see enum ug_event)
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called.
*
* @param[in] event The UI gadget key event (see enum ug_key_event)
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called.
* @param[in] ug The UI gadget
* @param[in] msg The Message to send, which is app_control type (see @ref app_control_PG "Tizen managed api reference guide")
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called. \n
*
* @param[in] ug The UI gadget
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise @c -1 on error
*
* @pre ug_init() should be called. \n
*
* @param[in] name The UI gadget's name
*
- * @return @c 1 if installed,
- * @c 0 if not installed,
+ * @return @c 1 if installed,
+ * @c 0 if not installed,
* otherwise @c -1 in case of error
*
* @par Sample code:
int ug_is_installed(const char *name);
/**
+ * @brief Pauses the given UI gadget instance.
+ *
+ * @details @b Purpose: This function is used to pause the specified UI gadget instance and its children in the "Running" state. Eventually, the state of the UI gadget instance will be "Stopped".
+ *
+ * @details @b Typical @b use @b case: Application developers who want to pause the specified UI gadget instance can use this function.
+ *
+ * @details @b Method @b of @b function @b operation: "Pause" state operations of the UI gadgets with the "Running" state in the sub-tree that has the specified UI gadget as the root node are invoked by post-order traversal.
+ *
+ * @b Context @b of @b function: This function is supposed to be called after successful initialization with ug_init() and creation of ug_create().
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ug The UI gadget
+ *
+ * @return @c 0 on success,
+ * otherwise @c -1 on error
+ *
+ * @pre ug_init() should be called.
+ * ug_create() should be used to create the @a ug gadget.
+ *
+ * @see ug_resume_ug()
+ *
+ * @par Sample code:
+ * @code
+ * #include <ui-gadget.h>
+ * ...
+ * // pauses the given UI gadget instance.
+ * ug_pause_ug(ug);
+ * ...
+ * @endcode
+ */
+int ug_pause_ug(ui_gadget_h ug);
+
+/**
+ * @brief Resumes the given UI gadget instance.
+ *
+ * @details @b Purpose: This function is used to resume the specified UI gadget instance and its children in the "Stopped" state. Eventually, the state of the UI gadget instance will be "Running".
+ *
+ * @details @b Typical @b use @b case: Application developers who want to resume the specified UI gadget instance can use this function.
+ *
+ * @details @b Method @b of @b function @b operation: "Resume" state operations of the UI gadgets with the "Stopped" state in the sub-tree that has specified UI gadget as the root node are invoked by post-order traversal.
+ *
+ * @details @b Context @b of @b function: This function should be called after successful initialization by ug_init() and creation of ug_create().
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ug The UI gadget
+ *
+ * @return @c 0 on success,
+ * otherwise @c -1 on error
+ *
+ * @pre ug_init() should be called.
+ * ug_create() should be used to create the @a ug gadget.
+ *
+ * @see ug_pause_ug()
+ *
+ * @par Sample code:
+ * @code
+ * #include <ui-gadget.h>
+ * ...
+ * // resumes the given UI gadget instance.
+ * ug_resume_ug(ug);
+ * ...
+ * @endcode
+ */
+int ug_resume_ug(ui_gadget_h ug);
+
+/**
* @}
*/
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(aul)
mkdir -p %{buildroot}/usr/share/license
install LICENSE %{buildroot}/usr/share/license/%{name}
cp -rf %{buildroot}/usr/bin/ug-client %{buildroot}/usr/bin/ug-launcher
-mkdir -p %{buildroot}/usr/apps/com.samsung.helloworld/bin
-cp -rf %{buildroot}/usr/bin/ug-client %{buildroot}/usr/apps/com.samsung.helloworld/bin/helloworld
-cp -rf %{buildroot}/usr/bin/ug-client %{buildroot}/usr/apps/com.samsung.helloworld/bin/hello
+mkdir -p %{buildroot}/usr/apps/org.tizen.helloworld/bin
+cp -rf %{buildroot}/usr/bin/ug-client %{buildroot}/usr/apps/org.tizen.helloworld/bin/helloworld
+cp -rf %{buildroot}/usr/bin/ug-client %{buildroot}/usr/apps/org.tizen.helloworld/bin/hello
#Signing
-%define tizen_sign_base /usr/apps/com.samsung.helloworld/
+%define tizen_sign_base /usr/apps/org.tizen.helloworld/
%define tizen_sign 1
%define tizen_author_sign 1
%define tizen_dist_sign 1
mkdir -p /usr/ug/res/images
%post samples
-#mkdir -p /opt/usr/apps/com.samsung.helloworld/
-#/bin/cp /usr/bin/ug-client /opt/usr/apps/com.samsung.helloworld/bin/helloworld
-chsmack -a "com.samsung.helloworld" -e "com.samsung.helloworld" /usr/apps/com.samsung.helloworld/bin/helloworld
-#/bin/mkdir -p /usr/apps/com.samsung.helloworld/lib/ug/
-/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/com.samsung.helloworld/lib/ug/libhelloworld.so
-/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/com.samsung.helloworld/lib/ug/libhelloUG-efl.so
-/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/com.samsung.helloworld/lib/libug-helloworld.so
-/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/com.samsung.helloworld/lib/libug-hello.so
+chsmack -a "org.tizen.helloworld" -e "org.tizen.helloworld" /usr/apps/org.tizen.helloworld/bin/helloworld
+/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/org.tizen.helloworld/lib/ug/libhelloworld.so
+/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/org.tizen.helloworld/lib/ug/libhelloUG-efl.so
+/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/org.tizen.helloworld/lib/libug-helloworld.so
+/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/apps/org.tizen.helloworld/lib/libug-hello.so
/bin/cp /opt/usr/ug/lib/libug-helloUG-efl.so /usr/ug/lib/libug-hello.so
mv /opt/usr/ug/lib/libug-helloUG-efl.so /opt/usr/ug/lib/libug-helloUG2-efl.so
-ln -sf /usr/bin/ug-client /usr/apps/com.samsung.helloworld/bin/helloUG-efl
+ln -sf /usr/bin/ug-client /usr/apps/org.tizen.helloworld/bin/helloUG-efl
%postun -p /sbin/ldconfig
%{_libdir}/pkgconfig/%{name}.pc
%files samples
-%manifest samples/helloUG-efl/com.samsung.helloworld.manifest
+%manifest samples/helloUG-efl/org.tizen.helloworld.manifest
/etc/smack/accesses2.d/helloug.rule
/opt/usr/ug/lib/libug-helloUG-efl.so*
/usr/share/applications/*.desktop
-/usr/share/packages/com.samsung.helloworld.xml
-/opt/usr/apps/com.samsung.helloworld/data/ui-gadget_doc.h
-/usr/apps/com.samsung.helloworld/lib/ug/*
-/usr/apps/com.samsung.helloworld/bin/*
+/usr/share/packages/org.tizen.helloworld.xml
+/opt/usr/apps/org.tizen.helloworld/data/ui-gadget_doc.h
+/usr/apps/org.tizen.helloworld/lib/ug/*
+/usr/apps/org.tizen.helloworld/bin/*
#Signing
-/usr/apps/com.samsung.helloworld/author-signature.xml
-/usr/apps/com.samsung.helloworld/signature1.xml
+/usr/apps/org.tizen.helloworld/author-signature.xml
+/usr/apps/org.tizen.helloworld/signature1.xml
%files template
/usr/bin/ug-gen.sh
TARGET_LINK_LIBRARIES(${HELLOUG_EFL} ${HELLOUG_EFL_PKGS_LDFLAGS})
INSTALL(TARGETS ${HELLOUG_EFL} DESTINATION /opt/usr/ug/lib)
-INSTALL(TARGETS ${HELLOUG_EFL} DESTINATION /usr/apps/com.samsung.helloworld/lib/ug)
+INSTALL(TARGETS ${HELLOUG_EFL} DESTINATION /usr/apps/org.tizen.helloworld/lib/ug)
CONFIGURE_FILE(${HELLOUG_EFL}.desktop.in ${CMAKE_BINARY_DIR}/${HELLOUG_EFL}.desktop)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${HELLOUG_EFL}.desktop DESTINATION /usr/share/applications)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/doc/ui-gadget_doc.h DESTINATION /opt/usr/apps/com.samsung.helloworld/data)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/samples/helloUG-efl/com.samsung.helloworld.xml DESTINATION /usr/share/packages)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/doc/ui-gadget_doc.h DESTINATION /opt/usr/apps/org.tizen.helloworld/data)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/samples/helloUG-efl/org.tizen.helloworld.xml DESTINATION /usr/share/packages)
INSTALL(FILES ${CMAKE_BINARY_DIR}/samples/helloUG-efl/helloug.rule DESTINATION /etc/smack/accesses2.d/)
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="com.samsung.helloworld" version="0.1.0" install-location="internal-only">
- <label>helloworld</label>
- <author email="samsung.kim@samsung.com" href="www.samsung.com">Samsung Kim</author>
- <description>helloworld</description>
- <ui-application appid="com.samsung.helloworld" exec="/usr/apps/com.samsung.helloworld/bin/helloworld" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
- <icon>com.samsung.helloworld.png</icon>
- <label>helloworld</label>
- <label xml:lang="en-us">Helloworld</label>
- <label xml:lang="ko-kr">헬로우월드</label>
- </ui-application>
- <ui-application appid="com.samsung.helloUG-efl" exec="/usr/apps/com.samsung.helloworld/bin/helloUG-efl" ui-gadget="true" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
- <icon>com.samsung.helloworld.png</icon>
- <label>helloworld</label>
- <label xml:lang="en-us">Helloug</label>
- <label xml:lang="ko-kr">헬로우UG</label>
- </ui-application>
- <ui-application appid="com.samsung.hello" exec="/usr/apps/com.samsung.helloworld/bin/hello" nodisplay="false" multiple="false" type="capp" taskmanage="true">
- <icon>com.samsung.helloworld.png</icon>
- <label>helloworld</label>
- <label xml:lang="en-us">Helloworld</label>
- <label xml:lang="ko-kr">헬로우월드</label>
- </ui-application>
- <ui-application appid="com.samsung.set-time" exec="/usr/apps/com.samsung.helloworld/bin/setting-time-efl" nodisplay="false" multiple="true" type="capp" taskmanage="true">
- </ui-application>
- <ui-application appid="com.samsung.set-time-pool" exec="/usr/apps/com.samsung.helloworld/bin/setting-time-efl-pool" nodisplay="false" multiple="true" type="capp" taskmanage="true" process-pool="true">
- </ui-application>
- <privileges>
- <privilege>http://developer.samsung.com/tizen/privilege/ui-gadget.admin</privilege>
- </privileges>
-</manifest>
{
LOGD("%s : called\n", __func__);
- __helloUG_get_extra_data_cb(reply, "http://samsung.com/appcontrol/data/permission_control", NULL);
+ __helloUG_get_extra_data_cb(reply, "http://tizen.org/appcontrol/data/permission_control", NULL);
}
cbs.destroy_cb = __helloUG_multi_destroy_cb;
cbs.priv = ugd;
- ugd->sub_ug = ug_create(ugd->ug, "com.samsung.helloworld", UG_MODE_FULLVIEW, NULL, &cbs);
+ ugd->sub_ug = ug_create(ugd->ug, "org.tizen.helloworld", UG_MODE_FULLVIEW, NULL, &cbs);
}
static void __helloUG_helloworldug_load_cb(void *data, Evas_Object *obj, void *event_info)
struct ug_data *ugd;
struct ug_cbs cbs = { 0, };
//const char* ug_name = "helloUG-efl";
- const char* ug_name = "com.samsung.helloworld";
+ const char* ug_name = "org.tizen.helloworld";
LOGD("%s : called\n", __func__);
static void __helloUG_helloug_load_cb(void *data, Evas_Object *obj, void *event_info)
{
struct ug_cbs cbs = { 0, };
- //const char* ug_name = "com.samsung.helloworld";
int mode;
LOGD("%s : called\n", __func__);
app_control_add_extra_data(result, "name", "hello-UG");
app_control_add_extra_data(result, "description", "sample UI gadget");
app_control_add_extra_data(result, "__UG_SEND_REUSLT__", APP_CONTROL_RESULT_SUCCEEDED);
- app_control_add_extra_data(result, "http://samsung.com/appcontrol/data/permission_control", "no");
- //ug_send_result_full(ugd->ug, result, APP_CONTROL_RESULT_SUCCEEDED);
+ app_control_add_extra_data(result, "http://tizen.org/appcontrol/data/permission_control", "no");
ret = app_control_reply_to_launch_request(result, ugd->service, (app_control_result_e)APP_CONTROL_RESULT_SUCCEEDED);
if (ret != APP_CONTROL_ERROR_NONE)
elm_list_mode_set(list, ELM_LIST_COMPRESS);
/* Main Menu Items Here */
- sprintf(lable,"Hello UI Gadget / PID : %d", getpid());
+ snprintf(lable, sizeof(lable), "Hello UI Gadget / PID : %d", getpid());
elm_list_item_append(list, lable, NULL, NULL, NULL, NULL);
memset(lable,0x00,124);
#if 0
elm_list_item_append(list, "Create shared helloUG2", NULL, NULL, __helloUG_helloug_load_cb, "helloUG2-efl");
elm_list_item_append(list, "Create priv helloug(appid)", NULL, NULL, __helloUG_helloug_load_cb, "helloUG-efl");
- elm_list_item_append(list, "Create priv helloug(appid)", NULL, NULL, __helloUG_helloug_load_cb, "com.samsung.helloUG-efl");
+ elm_list_item_append(list, "Create priv helloug(appid)", NULL, NULL, __helloUG_helloug_load_cb, "org.tizen.helloUG-efl");
elm_list_item_append(list, "Create shared wifi", NULL, NULL, __helloUG_helloug_load_cb, "wifi-efl-UG");
#endif
- elm_list_item_append(list, "Launch Hello UGAPP", NULL, NULL, __helloUG_launch_cb, "com.samsung.hello");
- elm_list_item_append(list, "Launch Hello UGAPP(POOL)", NULL, NULL, __helloUG_launch_cb, "com.samsung.helloworld");
- elm_list_item_append(list, "Launch Hello UGAPP(UG POOL)", NULL, NULL, __helloUG_launch_cb, "com.samsung.helloUG-efl");
+ elm_list_item_append(list, "Launch Hello UGAPP", NULL, NULL, __helloUG_launch_cb, "org.tizen.hello");
+ elm_list_item_append(list, "Launch Hello UGAPP(POOL)", NULL, NULL, __helloUG_launch_cb, "org.tizen.helloworld");
+ elm_list_item_append(list, "Launch Hello UGAPP(UG POOL)", NULL, NULL, __helloUG_launch_cb, "org.tizen.helloUG-efl");
- //elm_list_item_append(list, "Launch Storage UGAPP", NULL, NULL, __helloUG_launch_cb, "com.samsung.set-storage");
- //elm_list_item_append(list, "Launch Storage UGAPP(POOL)", NULL, NULL, __helloUG_launch_cb, "com.samsung.set-storage-pool");
+ //elm_list_item_append(list, "Launch Storage UGAPP", NULL, NULL, __helloUG_launch_cb, "org.tizen.set-storage");
+ //elm_list_item_append(list, "Launch Storage UGAPP(POOL)", NULL, NULL, __helloUG_launch_cb, "org.tizen.set-storage-pool");
//elm_list_item_append(list, "Launch Storage UGAPP(UG POOL)", NULL, NULL, __helloUG_launch_cb, "setting-storage-efl");
- elm_list_item_append(list, "Launch Setting UGAPP", NULL, NULL, __helloUG_launch_cb, "com.samsung.set-time");
- elm_list_item_append(list, "Launch Setting UGAPP", NULL, NULL, __helloUG_launch_cb, "com.samsung.set-time-pool");
+ elm_list_item_append(list, "Launch Setting UGAPP", NULL, NULL, __helloUG_launch_cb, "org.tizen.set-time");
+ elm_list_item_append(list, "Launch Setting UGAPP", NULL, NULL, __helloUG_launch_cb, "org.tizen.set-time-pool");
elm_list_item_append(list, "Launch Setting UGAPP", NULL, NULL, __helloUG_launch_cb, "setting-time-efl");
#if 0
//elm_list_item_append(list, "Create Hello UG", NULL, NULL, __helloUG_helloug_load_cb, ugd);
//elm_list_item_append(list, "Create HelloWorld APP UG", NULL, NULL, __helloUG_helloug_load_cb, ugd);
- elm_list_item_append(list, "Launch Hello UGAPP(PROCESS POOL)", NULL, NULL, __helloUG_launch_cb, "com.samsung.helloworld");
- //elm_list_item_append(list, "Launch Hello UGAPP(UG-CLIENT POOL)", NULL, NULL, __helloUG_pool_launch_cb, "com.samsung.helloworld");
- elm_list_item_append(list, "Show UG APP", NULL, NULL, __helloUG_show_cb, "com.samsung.helloworld");
+ elm_list_item_append(list, "Launch Hello UGAPP(PROCESS POOL)", NULL, NULL, __helloUG_launch_cb, "org.tizen.helloworld");
+ //elm_list_item_append(list, "Launch Hello UGAPP(UG-CLIENT POOL)", NULL, NULL, __helloUG_pool_launch_cb, "org.tizen.helloworld");
+ elm_list_item_append(list, "Show UG APP", NULL, NULL, __helloUG_show_cb, "org.tizen.helloworld");
elm_list_item_append(list, "Launch WIFI UGAPP(PROCESS POOL)", NULL, NULL, __helloUG_launch_cb, "wifi-efl-ug-lite");
//elm_list_item_append(list, "Launch WIFI UGAPP(UG-CLIENT POOL)", NULL, NULL, __helloUG_pool_launch_cb, "wifi-efl-ug-lite");
#if 0
/* permission test */
FILE *file;
- if ((file = fopen("/opt/usr/apps/com.samsung.helloworld/data/ui-gadget_doc.h", "rw"))) {
+ if ((file = fopen("/opt/usr/apps/org.tizen.helloworld/data/ui-gadget_doc.h", "rw"))) {
LOGD("helloworld file open success");
} else {
LOGE("\x1b[31m helloworld file open fail (%d) \x1b[0m", errno);
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.helloworld" version="0.1.0" install-location="internal-only">
+ <label>helloworld</label>
+ <author email="samsung.kim@samsung.com" href="www.samsung.com">Samsung Kim</author>
+ <description>helloworld</description>
+ <ui-application appid="org.tizen.helloworld" exec="/usr/apps/org.tizen.helloworld/bin/helloworld" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+ <icon>org.tizen.helloworld.png</icon>
+ <label>helloworld</label>
+ <label xml:lang="en-us">Helloworld</label>
+ <label xml:lang="ko-kr">헬로우월드</label>
+ </ui-application>
+ <ui-application appid="org.tizen.helloUG-efl" exec="/usr/apps/org.tizen.helloworld/bin/helloUG-efl" ui-gadget="true" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+ <icon>org.tizen.helloworld.png</icon>
+ <label>helloworld</label>
+ <label xml:lang="en-us">Helloug</label>
+ <label xml:lang="ko-kr">헬로우UG</label>
+ </ui-application>
+ <ui-application appid="org.tizen.hello" exec="/usr/apps/org.tizen.helloworld/bin/hello" nodisplay="false" multiple="false" type="capp" taskmanage="true">
+ <icon>org.tizen.helloworld.png</icon>
+ <label>helloworld</label>
+ <label xml:lang="en-us">Helloworld</label>
+ <label xml:lang="ko-kr">헬로우월드</label>
+ </ui-application>
+ <ui-application appid="org.tizen.set-time" exec="/usr/apps/org.tizen.helloworld/bin/setting-time-efl" nodisplay="false" multiple="true" type="capp" taskmanage="true">
+ </ui-application>
+ <ui-application appid="org.tizen.set-time-pool" exec="/usr/apps/org.tizen.helloworld/bin/setting-time-efl-pool" nodisplay="false" multiple="true" type="capp" taskmanage="true" process-pool="true">
+ </ui-application>
+ <privileges>
+ <privilege>http://developer.samsung.com/tizen/privilege/ui-gadget.admin</privilege>
+ </privileges>
+</manifest>
ADD_DEPENDENCIES(${UGCALLER} ${UGCALLER}.edj)
-INSTALL(TARGETS ${UGCALLER} DESTINATION /opt/apps/com.samsung.ugcaller/bin)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${UGCALLER}.edj DESTINATION /opt/apps/com.samsung.${UGCALLER}/res)
-CONFIGURE_FILE(com.samsung.${UGCALLER}.desktop.in ${CMAKE_BINARY_DIR}/com.samsung.${UGCALLER}.desktop)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/com.samsung.${UGCALLER}.desktop DESTINATION /opt/share/applications)
+INSTALL(TARGETS ${UGCALLER} DESTINATION /opt/apps/org.tizen.ugcaller/bin)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${UGCALLER}.edj DESTINATION /opt/apps/org.tizen.${UGCALLER}/res)
+CONFIGURE_FILE(org.tizen.${UGCALLER}.desktop.in ${CMAKE_BINARY_DIR}/org.tizen.${UGCALLER}.desktop)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/org.tizen.${UGCALLER}.desktop DESTINATION /opt/share/applications)
#endif
#define _EDJ(o) elm_layout_edje_get(o)
-#define EDJ_FILE "/opt/apps/com.samsung.ugcaller/res/ugcaller.edj"
+#define EDJ_FILE "/opt/apps/org.tizen.ugcaller/res/ugcaller.edj"
#define GRP_MAIN "main"
typedef struct {
Name=ugcaller
Type=Application
-Exec=/opt/apps/com.samsung.ugcaller/bin/ugcaller
+Exec=/opt/apps/org.tizen.ugcaller/bin/ugcaller
Icon=
Nodisplay=True
Version=0.1.0
struct ug_cbs *cbs;
struct ug_engine_ops *eng_ops = NULL;
void* conformant = NULL;
- void* conformant2 = NULL;
if (!ug || ug->state != UG_STATE_READY) {
return -1;
}
- conformant = ugman_get_conformant();
- if(!conformant) {
- _ERR("conformant error. ug_create(%s) fail.", ug->name);
- return -1;
- }
-
ug->state = UG_STATE_CREATED;
if (ug->module)
}
if (ug->mode == UG_MODE_FULLVIEW) {
if (eng_ops && eng_ops->create) {
- conformant2 = eng_ops->create(ug_man.win, ug, ugman_ug_start);
- if((!conformant2) || (conformant != conformant2)) {
- _ERR("conformant(%p,%p) error. ug(%p) destory cb is invoked.",
- conformant,conformant2,ug);
+ conformant = eng_ops->create(ug_man.win, ug, ugman_ug_start);
+ if(!conformant) {
+ _ERR("conformant(%p) error. ug(%p) destory cb is invoked.",
+ conformant,ug);
ops->destroy(ug, ug->app_control, ops->priv);
return -1;
}
int ugman_ug_add(ui_gadget_h parent, ui_gadget_h ug)
{
if (!ug_man.is_initted) {
- _ERR("failed: manager is not initted");
+ _ERR("failed: manager is not initialized");
return -1;
}
}
if (!ug_man.is_initted) {
- _WRN("ugman_ug_del failed: manager is not initted");
+ _WRN("ugman_ug_del failed: manager is not initialized");
return -1;
}
{
/* Terminate */
if (!ug_man.is_initted) {
- _ERR("ugman_ug_del_all failed: manager is not initted");
+ _ERR("ugman_ug_del_all failed: manager is not initialized");
return -1;
}
{
/* RESUME */
if (!ug_man.is_initted) {
- _ERR("ugman_resume failed: manager is not initted");
+ _ERR("ugman_resume failed: manager is not initialized");
return -1;
}
return 0;
}
+int ugman_resume_ug(ui_gadget_h ug)
+{
+ if (!ug_man.is_initted) {
+ _ERR("ugman_pause_ug failed: manager is not initialized");
+ return -1;
+ }
+
+ if (!ug_man.root || !ug) {
+ _WRN("ugman_pause_ug failed: no root");
+ return -1;
+ }
+
+ _DBG("ugman_resume_ug called");
+
+ ugman_idler_add((Idle_Cb)ugman_ug_resume, ug);
+
+ return 0;
+}
+
int ugman_pause(void)
{
/* PAUSE (Background) */
if (!ug_man.is_initted) {
- _ERR("ugman_pause failed: manager is not initted");
+ _ERR("ugman_pause failed: manager is not initialized");
return -1;
}
return 0;
}
+int ugman_pause_ug(ui_gadget_h ug)
+{
+ if (!ug_man.is_initted) {
+ _ERR("ugman_pause_ug failed: manager is not initialized");
+ return -1;
+ }
+
+ if (!ug_man.root || !ug) {
+ _WRN("ugman_pause_ug failed: no root");
+ return -1;
+ }
+
+ _DBG("ugman_pause_ug called");
+
+ ugman_idler_add((Idle_Cb)ugman_ug_pause, ug);
+
+ return 0;
+}
+
static int ugman_send_event_pre(void *data)
{
job_start();
/* Propagate event */
if (!ug_man.is_initted) {
- _ERR("ugman_send_event failed: manager is not initted");
+ _ERR("ugman_send_event failed: manager is not initialized");
return -1;
}
int ugman_send_key_event(enum ug_key_event event)
{
if (!ug_man.is_initted) {
- _ERR("ugman_send_key_event failed: manager is not initted");
+ _ERR("ugman_send_key_event failed: manager is not initialized");
return -1;
}
#include <dlfcn.h>
#include <unistd.h>
#include <sys/types.h>
-
-#include <app_manager.h>
+#include <aul.h>
#include <pkgmgr-info.h>
#include "ug-module.h"
}
//temp
- app_manager_get_app_id(getpid(), &pkg_id);
+ pkg_id = (char *)malloc(PATH_MAX);
+ if (pkg_id) {
+ ret = aul_app_get_pkgid_bypid(getpid(), pkg_id, PATH_MAX);
+ if (ret != AUL_R_OK) {
+ free(pkg_id);
+ pkg_id = NULL;
+ }
+ }
if (pkg_id) {
snprintf(ug_file, PATH_MAX, "/usr/apps/%s/lib/libug-%s.so", pkg_id, name);
if (file_exist(ug_file)) {
/* Get pkg name by appid */
pkgmgrinfo_appinfo_h handle;
-#ifdef GET_UGINFO_BY_APPID
+#ifdef GET_UGINFO_BY_APPID
ret = pkgmgrinfo_appinfo_get_appinfo(name, &handle);
#else
ret = pkgmgrinfo_appinfo_get_uginfo(name, &handle);
ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkg_id);
if (ret != PMINFO_R_OK) {
_DBG("fail to get pkgid from appinfo handle");
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
goto err_func;
} else {
SECURE_LOGD("pkg id: %s\n", pkg_id);
return ret;
err_func:
+
return -1;
}
return ugman_pause();
}
+UG_API int ug_pause_ug(ui_gadget_h ug)
+{
+ if (!ug || !ugman_ug_exist(ug)) {
+ _ERR("ug_pause_ug() failed: Invalid ug");
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ugman_pause_ug(ug);
+}
+
UG_API int ug_resume(void)
{
return ugman_resume();
}
+UG_API int ug_resume_ug(ui_gadget_h ug)
+{
+ if (!ug || !ugman_ug_exist(ug)) {
+ _ERR("ug_resume_ug() failed: Invalid ug");
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ugman_resume_ug(ug);
+}
+
UG_API int ug_destroy(ui_gadget_h ug)
{
return ugman_ug_del(ug);
ui-gadget::client system::homedir rwxat- ------
-ui-gadget::client system::vconf rwxat- ------
ui-gadget::client system::media rwxat- ------
ui-gadget::client system::share rwxat- ------
ui-gadget::client pulseaudio rwxat- ------
e17 ui-gadget::client -w---- ------
stest-service ui-gadget::client r-x--- ------
ui-gadget::client stest-service -w---- ------
-ui-gadget::client system::vconf_setting rw---- ------
-ui-gadget::client system::vconf_inhouse rw---- ------
-ui-gadget::client system::vconf_privacy rw---- ------
-ui-gadget::client system::vconf_system rw---- ------
-ui-gadget::client system::vconf_multimedia rw---- ------
-ui-gadget::client system::vconf_network rw---- ------
-ui-gadget::client system::vconf_misc rw---- ------
ui-gadget::client email-service rwx--- ------
ui-gadget::client email-service::db rw---- ------
ui-gadget::client eas-engine::db rw---- ------
ui-gadget::client aul::launch --x--- ------
ui-gadget::client csc-manager --x--- ------
ui-gadget::client ug_bluetooth r-x--- ------
+ui-gadget::client ug-bluetooth-efl -wx--- ------
ui-gadget::client syspopup::db rwx--- ------
ui-gadget::client bt-service::public -w---- ------
ui-gadget::client bt-service::platform rw---- ------
ui-gadget::client data-provider-master::shortcut.shortcut -w---- ------
ui-gadget::client nfc-manager::p2p rw---- ------
ui-gadget::client nfc-manager::admin rw---- ------
-ui-gadget::client libaccounts-svc r----- ------
+ui-gadget::client libaccounts-svc rw---- ------
ui-gadget::client libaccounts-svc::check_read r----- ------
aul ui-gadget::client r-x--- ------
ui-gadget::client ims-service -wx--- ------
ui-gadget::client key-storage::db rw---- ------
media-server ui-gadget::client -w---- ------
ui-gadget::client contacts-service::phonelog rw---- ------
-ui-gadget::client contacts-service::vconf r-x--- ------
+ui-gadget::client tizen::vconf::contact r-x--- ------
+ui-gadget::client tizen::vconf::platform::r r-x--l ------
+ui-gadget::client tizen::vconf::public::r r-x--- ------
+ui-gadget::client tizen::vconf::platform::rw rw---- ------
+ui-gadget::client tizen::vconf::setting::admin rw---- ------
ui-gadget::client msg-service::read rw---- ------
ui-gadget::client msg-service::write rw---- ------
ui-gadget::client msg-service::wappush rw---- ------
ui-gadget::client secure-storage::pkcs12 rw---- ------
ui-gadget::client email-service::write rw---- ------
ui-gadget::client calendar-service::svc rw---- ------
-ui-gadget::client email::vconf_default_account_id rw---- ------
-ui-gadget::client email::vconf_active_sync_handle rw---- ------
ui-gadget::client cert-svc-ui rwx--- ------
ui-gadget::client cert-svc rwx--- ------
ui-gadget::client pkgmgr::db rw---l ------
ui-gadget::client drmfw rw---- ------
-ui-gadget::client lockscreen_setting::vconf rw---- ------
ui-gadget::client lockscreen_setting::resources rwxat- ------
-ui-gadget::client lockscreen_setting_private::vconf rwxat- ------
ui-gadget::client privacy-manager::db rwxa-l ------
ui-gadget::client ecore::lock rwxat- ------
ui-gadget::client org.tizen.sat-ui --x--- ------
-ui-gadget::client telephony_framework::vconf rwx--- ------
ui-gadget::client secure-storage::telephony_sim r----- ------
ui-gadget::client connman rw---- ------
ui-gadget::client privacy-manager::daemon -w---- ------
ui-gadget::client security-server::api-password-reset -w---- ------
ui-gadget::client pkgmgr-client r----- ------
ui-gadget::client pkgmgr::info r----- ------
+ui-gadget::client pkgmgr::svc --x--- ------
ui-gadget::client worldclock::db rw---- ------
ui-gadget::client e17 --x--- ------
ui-gadget::client ug-worldclock-efl r----- ------
ui-gadget::client telephony_framework::api_phonebook rwx--- ------
ui-gadget::client telephony_framework::api_ss rwx--- ------
ui-gadget::client ug-setting-call-efl rwxat- ------
-ui-gadget::client ug-setting-call-efl::vconf rw---- ------
ui-gadget::client wrt-setting --x--- ------
org.tizen.wallpaper-ui-service ui-gadget::client r----- ------
ui-gadget::client org.tizen.indicator rw---- ------
ui-gadget::client wifi-direct::discover -w---- ------
ui-gadget::client wifi-direct::info rw---- ------
ui-gadget::client wifi-direct::native rw---- ------
+ui-gadget::client isf::manager rwx--- ------
+ui-gadget::client org.tizen.setting::default-resources rwx--- ------
+ui-gadget::client image-viewer-efl rwx--- ------
+ui-gadget::client tizen::vconf::public::r::platform::rw rw---- ------
+ui-gadget::client tizen::vconf::telephony::admin rw---- ------
+ui-gadget::client tizen::vconf::public::r rw---- ------
+ui-gadget::client org.tizen.indicator_shm r----- ------
+ui-gadget::client cert-svc::pkcs12 rwx--- ------
+ui-gadget::client ug-setting-mobileap-efl -wx--- ------
+ui-gadget::client wifi-efl-ug -wx--- ------
+ui-gadget::client setting-myaccount-efl -wx--- ------
+ui-gadget::client setting-call-efl -wx--- ------