+++ /dev/null
-lib_LTLIBRARIES = libico-app-fw.la \
- libico-app-fw-efl.la
-
-#include_HEADERS = \
-# ico_apf.h \
-# ico_apf_error.h \
-# ico_apf_resource_control.h \
-# ico_apf_ecore.h
-
-libico_app_fw_la_CFLAGS = -I../include -I/usr/include/ico-uxf-weston-plugin $(AUL_CFLAGS) $(SLPPKGMGR_CFLAGS) @GLIB_CFLAGS@
-libico_app_fw_la_LIBADD = $(AUL_LIBS) $(SLPPKGMGR_LIBS) @GLIB_LIBS@
-libico_app_fw_la_LDFLAGS = -version-info 0:5:0
-libico_app_fw_la_SOURCES = \
- ico_uxf_conf_common.c \
- ico_uxf_conf_sys.c \
- ico_uxf_conf_app.c \
- ico_uxf_init.c \
- ico_uxf_launcher.c \
- ico_uxf_window.c \
- ico_uxf_inputdev.c \
- ico_apf_log.c \
- ico_apf_communication.c \
- ico_apf_resource_control.c \
- ico_apf_appmgr.c
-
-libico_app_fw_efl_la_CFLAGS = -I../include -I/usr/include/ico-uxf-weston-plugin $(EFL_CFLAGS) @GLIB_CFLAGS@
-libico_app_fw_efl_la_LIBADD = $(EFL_LIBS) @GLIB_LIBS@
-libico_app_fw_efl_la_LDFLAGS = -version-info 0:5:0
-libico_app_fw_efl_la_SOURCES = \
- ico_apf_ecore.c \
- ico_uxf_conf_ecore.c
-
-AM_CFLAGS = $(GCC_CFLAGS)
-AM_CPPFLAGS = $(GCC_CFLAGS) \
- -DDATADIR='"$(datadir)"' \
- -DMODULEDIR='"$(moduledir)"' \
- -DLIBEXECDIR='"$(libexecdir)"'
-AM_LDFLAGS = -module -avoid-version -rpath $(libdir) -lwayland-egl -lEGL -lGLESv2
-
-.FORCE :
-
char *exec;
GError *error;
char *app_category;
- char add_category[256];
+ int app_category_type;
+ char add_category[400];
+ int add_category_len;
+ char work[80];
int i;
bool bval;
struct stat buff;
add_category[0] = 0;
error = NULL;
app_category = g_key_file_get_string(sappfile, "app-attributes", package, &error);
- if (error != NULL) {
+ if (error == NULL) {
+ app_category_type = 0;
+ }
+ else {
g_clear_error(&error);
error = NULL;
app_category = g_key_file_get_string(sappfile, "app-attributes", name, &error);
+ if (error == NULL) {
+ app_category_type = 1;
+ }
}
+ add_category_len = 0;
if (error != NULL) {
g_clear_error(&error);
apfw_trace("infoAilpkg: %s(%s) dose not has app-attributes", package, name);
}
else {
- apfw_trace("infoAilpkg: %s(%s) has app-category=%s", package, name, app_category);
- strncpy(add_category, app_category, sizeof(add_category)-2);
- add_category[sizeof(add_category)-2] = 0;
- i = strlen(add_category);
- if (i > 0) {
- if (add_category[i-1] != ';') {
- strcpy(&add_category[i], ";");
+ for (i = 1;; i++) {
+ strncpy(&add_category[add_category_len],
+ app_category, sizeof(add_category)-add_category_len-2);
+ add_category[sizeof(add_category)-2] = 0;
+ add_category_len = strlen(add_category);
+ if (add_category_len > 0) {
+ if (add_category[add_category_len-1] != ';') {
+ strcpy(&add_category[add_category_len++], ";");
+ }
+ }
+ snprintf(work, sizeof(work)-1, "%s.%d",
+ app_category_type == 0 ? package : name, i);
+ error = NULL;
+ app_category = g_key_file_get_string(sappfile, "app-attributes", work, &error);
+ if (error != NULL) {
+ g_clear_error(&error);
+ break;
}
}
+ apfw_trace("infoAilpkg: %s(%s) has app-category=%s", package, name, add_category);
}
g_clear_error(&error);
ail_appinfo_get_str(appinfo, AIL_PROP_CATEGORIES_STR, &category);
if (strcmp(category, APP_CONF_AIL_NULL_STR) != 0) {
apfw_trace("infoAilpkg: %s + %s", add_category, category);
- i = strlen(add_category);
- strncpy(&add_category[i], category, sizeof(add_category)-i-1);
- add_category[sizeof(add_category)-i-1] = 0;
+ strncpy(&add_category[add_category_len],
+ category, sizeof(add_category)-add_category_len-1);
+ add_category[sizeof(add_category)-1] = 0;
}
if (add_category[0]) {
category = add_category;
}
}
+ /* surface animation */
+ if ((found == 0) && (work[0] != 0)) {
+ if (strncasecmp(work, "Animation", 9) == 0) {
+ k = 9;
+ if (work[9] == '.') {
+ if (strncasecmp(&work[10], "visible", 7) == 0) {
+ k = 17;
+ }
+ else if (strncasecmp(&work[10], "resize", 6) == 0) {
+ k = 16;
+ }
+ else if (strncasecmp(&work[10], "move", 4) == 0) {
+ k = 14;
+ }
+ }
+ if (work[k] == '=') {
+ if (k == 14) {
+ apptbl->animation_move = strdup(&work[k+1]);
+ }
+ else if (k == 16) {
+ apptbl->animation_resize = strdup(&work[k+1]);
+ }
+ else {
+ apptbl->animation_visible = strdup(&work[k+1]);
+ }
+ }
+ found = 9;
+ }
+ }
+
/* cpu % at invisible */
if ((found == 0) && (work[0] != 0)) {
if (strncasecmp(work, "invisiblecpu", 12) == 0) {
}
}
+ /* configure event */
+ if ((found == 0) && (work[0] != 0)) {
+ if (strcasecmp(work, "noconfigure") == 0) {
+ apptbl->noconfigure = 1;
+ found = 9;
+ }
+ }
+
/* start mode */
if ((found == 0) && (work[0] != 0)) {
- if (strcasecmp(work, "autostart") == 0) {
+ if (strncasecmp(work, "auto", 4) == 0) {
apptbl->autostart = 1;
}
- else if (strcasecmp(work, "noautostart") == 0) {
+ else if (strncasecmp(work, "noauto", 6) == 0) {
apptbl->autostart = 0;
}
else {
_ico_app_config_update->applicationNum, apptbl->appid, apptbl->name,
apptbl->exec, apptbl->type);
apfw_trace("Ail.%d: categ=%d kind=%d disp=%d layer=%d zone=%d "
- "sound=%d zone=%d auto=%d noicon=%d cpu=%d",
+ "sound=%d zone=%d auto=%d noicon=%d anim=%s cpu=%d",
_ico_app_config_update->applicationNum, apptbl->categoryId, apptbl->kindId,
apptbl->display[0].displayId, apptbl->display[0].layerId,
apptbl->display[0].zoneId, apptbl->sound[0].soundId,
apptbl->sound[0].zoneId, apptbl->autostart, apptbl->noicon,
- apptbl->invisiblecpu);
+ apptbl->animation_visible ? apptbl->animation_visible : "(none)",
+ apptbl->invisiblecpu);
_ico_app_config_update->applicationNum++;
}
else {
g_key_file_free(sappfile);
sappfile = NULL;
}
- apfw_trace("readAilApplist: Leave(cannot read ail correctly %d =! %d",
+ apfw_trace("readAilApplist: Leave(cannot read ail correctly %d =! %d",
_ico_app_config_update->ailNum, num);
return NULL;
}
if( sappfile) {
g_key_file_free(sappfile);
}
-
+
apfw_trace("readAilApplist: Leave");
return _ico_app_config_update;
for(dn = 0; dn < appconf->applicationNum; dn++) {
prc = ico_uxf_mng_process(appconf->application[dn].appid, 1);
prc->attr.internalid = 0;
+ prc->appconf = (void *)&appconf->application[dn];
prc->attr.status = ICO_UXF_PROCSTATUS_STOP;
prc->attr.type = appconf->application[dn].categoryId;
prc->attr.hostId = appconf->application[dn].hostId;
wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
uifw_trace("ico_uxf_init: Wayland/Weston connect OK");
+ /* set client attribute if need */
+ if (gIco_Uxf_Api_Mng.Wayland_WindowMgr) {
+ for(dn = 0; dn < appconf->applicationNum; dn++) {
+ if (appconf->application[dn].noconfigure) {
+ uifw_trace("ico_uxf_init: %s no need configure event",
+ appconf->application[dn].appid);
+ ico_window_mgr_set_client_attr(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ appconf->application[dn].appid,
+ ICO_WINDOW_MGR_CLIENT_ATTR_NOCONFIGURE, 1);
+ wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
+ }
+ }
+ }
+
gIco_Uxf_Api_Mng.WaylandFd
= wl_display_get_fd(gIco_Uxf_Api_Mng.Wayland_Display);
prc = ico_uxf_mng_process(appid, 0);
if (prc) {
+ /* set window animation */
+ if (prc->appconf != NULL) {
+ if (((Ico_Uxf_conf_application *)prc->appconf)->animation_visible) {
+ ico_window_mgr_set_animation(
+ gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ surfaceid, ICO_WINDOW_MGR_ANIMATION_CHANGE_VISIBLE,
+ ((Ico_Uxf_conf_application *)prc->appconf)->animation_visible);
+ }
+ if (((Ico_Uxf_conf_application *)prc->appconf)->animation_resize) {
+ ico_window_mgr_set_animation(
+ gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ surfaceid, ICO_WINDOW_MGR_ANIMATION_CHANGE_RESIZE,
+ ((Ico_Uxf_conf_application *)prc->appconf)->animation_resize);
+ }
+ if (((Ico_Uxf_conf_application *)prc->appconf)->animation_move) {
+ ico_window_mgr_set_animation(
+ gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ surfaceid, ICO_WINDOW_MGR_ANIMATION_CHANGE_MOVE,
+ ((Ico_Uxf_conf_application *)prc->appconf)->animation_move);
+ }
+ }
if (prc->attr.mainwin.window <= 0) {
uifw_trace("ico_uxf_window_createdcb: Set Main Window, Config Data");
prc->attr.mainwin.window = surfaceid;
layer, 0);
}
}
- else if ((win->attr.w != width) || (win->attr.h != height)) {
+ else if ((win->attr.w != width) || (win->attr.h != height)) {
(void)ico_uxf_window_resize(win->attr.window, win->attr.w, win->attr.h);
}
}
proc->attr.internalid = pid;
if (proc->attr.status != ICO_UXF_PROCSTATUS_INIT) {
/* child process, search parent process */
- uifw_trace("ico_uxf_aul_aulcb: fork&exec %s(proc=%08x, last=%08x)",
- proc->attr.process, (unsigned int)proc, (unsigned int)gIco_Uxf_Api_Mng.Mng_LastProcess);
+ uifw_trace("ico_uxf_aul_aulcb: fork&exec %s", proc->attr.process);
proc->attr.child = 1;
/* save parent application if exist */
- if (proc != gIco_Uxf_Api_Mng.Mng_LastProcess) {
+ if (gIco_Uxf_Api_Mng.Mng_LastProcess != proc) {
proc->parent = gIco_Uxf_Api_Mng.Mng_LastProcess;
}
+ else {
+ uifw_trace("ico_uxf_aul_aulcb: same process %s real %s", proc->attr.process,
+ proc->parent ? proc->parent->attr.process : "(None)");
+ }
}
else {
proc->attr.child = 0;
ico_uxf_set_lastapp(const char *appid)
{
if (appid) {
- uifw_trace("ico_uxf_set_lastapp: set last app %s", appid);
gIco_Uxf_Api_Mng.Mng_LastProcess = ico_uxf_mng_process(appid, 0);
}
else {
- uifw_trace("ico_uxf_set_lastapp: set last app NULL");
gIco_Uxf_Api_Mng.Mng_LastProcess = NULL;
}
}
return;
}
gIco_Uxf_Api_Mng.NeedTimer = 0;
-
for (hash = 0; hash < ICO_UXF_MISC_HASHSIZE; hash++) {
proc = gIco_Uxf_Api_Mng.Hash_ProcessId[hash];
while (proc) {
kill(proc->attr.internalid, SIGSTOP);
}
}
+ else if (proc->susp == 0) {
+ uifw_trace("ico_uxf_timer_wake: CPU resume pid=%d(show=%d)",
+ proc->attr.internalid, proc->showmode);
+ ico_window_mgr_set_visible(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ proc->attr.mainwin.window,
+ proc->showmode ==
+ ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION ?
+ ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION :
+ ICO_WINDOW_MGR_VISIBLE_SHOW,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
+ wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
+ }
}
else {
proc->susptimer -= msec;
typedef struct _Ico_Uxf_Mng_Process {
struct _Ico_Uxf_Mng_Process *nextidhash;/* next process of the same id and hash */
Ico_Uxf_Mng_ProcWin *procwin; /* process's subwindow */
- void *exttable; /* extended table */
+ void *appconf; /* configuration table address */
struct _Ico_Uxf_Mng_Process *parent; /* parent process */
short susptimer; /* suspend timer */
char susp; /* real suspend flag */
- char res; /* (unused) */
+ char showmode; /* resume show mode */
Ico_Uxf_ProcessAttr attr; /* process configuration */
} Ico_Uxf_Mng_Process;
void
ico_uxf_window_visible_control(Ico_Uxf_Mng_Window *winmng, const int show, const int raise)
{
+ int showshow = show & 0x0ffff;
+
uifw_trace("ico_uxf_window_visible_control: send visible to weston(%s,%08x,%d,%d)",
- (winmng->mng_process)->attr.process, winmng->attr.window, show, raise);
- if ((show == 1) && ((winmng->mng_process)->attr.invisiblecpu == 0) &&
- ((winmng->mng_process)->attr.suspend != 0)) {
- /* change to show, application resume */
- (winmng->mng_process)->attr.suspend = 0;
- (winmng->mng_process)->susptimer = 0;
- if ((winmng->mng_process)->susp) {
- (winmng->mng_process)->susp = 0;
- uifw_trace("ico_uxf_window_visible_control: CPU resume(%s)",
- (winmng->mng_process)->attr.process);
- kill((winmng->mng_process)->attr.internalid, SIGCONT);
+ (winmng->mng_process)->attr.process, winmng->attr.window, showshow, raise);
+
+ if ((showshow == ICO_WINDOW_MGR_VISIBLE_SHOW) ||
+ (showshow == ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION)) {
+
+ if (((winmng->mng_process)->attr.invisiblecpu == 0) &&
+ ((winmng->mng_process)->attr.suspend != 0)) {
+
+ /* change to show, application resume */
+ (winmng->mng_process)->attr.suspend = 0;
+ (winmng->mng_process)->susptimer = 0;
+ if ((winmng->mng_process)->susp) {
+ (winmng->mng_process)->susp = 0;
+ (winmng->mng_process)->showmode = showshow;
+ (winmng->mng_process)->susptimer = ICO_UXF_SUSP_DELAY;
+ gIco_Uxf_Api_Mng.NeedTimer = 1;
+ kill((winmng->mng_process)->attr.internalid, SIGCONT);
+ uifw_trace("ico_uxf_window_visible_control: CPU resume(%s)",
+ (winmng->mng_process)->attr.process);
+ if (raise != ICO_WINDOW_MGR_RAISE_NOCHANGE) {
+ ico_window_mgr_set_visible(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ winmng->attr.window,
+ ICO_WINDOW_MGR_VISIBLE_NOCHANGE, raise);
+ if ((show & 0x00010000) == 0) {
+ wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
+ }
+ }
+ return;
+ }
+ }
+ else if (((winmng->mng_process)->showmode ==
+ ICO_WINDOW_MGR_VISIBLE_SHOW) ||
+ ((winmng->mng_process)->showmode ==
+ ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION)) {
+ return;
}
}
/* send visible control to Weston(Multi Window Manager) */
ico_window_mgr_set_visible(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
- winmng->attr.window, show, raise);
- wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
-
- if ((show == 0) && ((winmng->mng_process)->attr.invisiblecpu == 0) &&
+ winmng->attr.window, showshow, raise);
+ if ((show & 0x00010000) == 0) {
+ wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
+ }
+ if (((showshow == ICO_WINDOW_MGR_VISIBLE_HIDE) ||
+ (showshow == ICO_WINDOW_MGR_VISIBLE_HIDE_WO_ANIMATION)) &&
+ ((winmng->mng_process)->attr.invisiblecpu == 0) &&
((winmng->mng_process)->attr.suspend == 0)) {
/* change to hide, application suspend */
(winmng->mng_process)->attr.suspend = 1;
+ (winmng->mng_process)->showmode = showshow;
(winmng->mng_process)->susptimer = ICO_UXF_SUSP_DELAY;
gIco_Uxf_Api_Mng.NeedTimer = 1;
uifw_trace("ico_uxf_window_visible_control: set CPU suspend(%s)",
(winmng->mng_process)->attr.process);
}
+ else {
+ (winmng->mng_process)->showmode = -1;
+ (winmng->mng_process)->susptimer = 0;
+ }
}
/*--------------------------------------------------------------------------*/
winmng->attr.h = h;
ico_window_mgr_set_positionsize(gIco_Uxf_Api_Mng.Wayland_WindowMgr, window,
- winmng->attr.x, winmng->attr.y,
+ ICO_UXF_MAX_COORDINATE, ICO_UXF_MAX_COORDINATE,
winmng->attr.w, winmng->attr.h);
wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
ico_window_mgr_set_positionsize(gIco_Uxf_Api_Mng.Wayland_WindowMgr, window,
winmng->attr.x, winmng->attr.y,
- winmng->attr.w, winmng->attr.h);
+ ICO_UXF_MAX_COORDINATE, ICO_UXF_MAX_COORDINATE);
wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
uifw_trace("ico_uxf_window_move: Leave(EOK)");
return ICO_UXF_ENOENT;
}
- ico_uxf_window_visible_control(winmng, 9, 1);
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_NOCHANGE,
+ ICO_WINDOW_MGR_RAISE_RAISE);
uifw_trace("ico_uxf_window_raise: Leave(EOK)");
return ICO_UXF_EOK;
return ICO_UXF_ENOENT;
}
- ico_uxf_window_visible_control(winmng, 9, 0);
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_NOCHANGE,
+ ICO_WINDOW_MGR_RAISE_LOWER);
uifw_trace("ico_uxf_window_lower: Leave(EOK)");
return ICO_UXF_EOK;
if ((winmng->mng_process)->attr.noicon == 0) {
if ((gIco_Uxf_Api_Mng.AppsCtlVisible != 0) ||
(winmng->attr.control == 0)) {
- i = 1;
+ i = ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION;
}
else {
- i = 0;
+ i = ICO_WINDOW_MGR_VISIBLE_HIDE_WO_ANIMATION;
}
}
else {
if ((gIco_Uxf_Api_Mng.AppsCtlVisible == 0) &&
(winmng->attr.control == 0)) {
- i = 1;
+ i = ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION;
}
else {
- i = 0;
+ i = ICO_WINDOW_MGR_VISIBLE_HIDE_WO_ANIMATION;
}
}
- ico_uxf_window_visible_control(winmng, i, 9);
+ ico_uxf_window_visible_control(winmng, i | 0x00010000,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
}
winmng = winmng->nextidhash;
}
}
+ wl_display_flush(gIco_Uxf_Api_Mng.Wayland_Display);
}
uifw_trace("ico_uxf_window_control: Leave(EOK)");
}
if (winmng->attr.control == 0) {
/* request to display to Weston(Multi Window Manager) */
- ico_uxf_window_visible_control(winmng, 1, 9);
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_SHOW,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
}
uifw_trace("ico_uxf_window_show: Leave(EOK) control=%x", winmng->attr.control);
return ICO_UXF_EOK;
winmng->attr.visible = 0;
/* request to hide to Weston(Multi Window Manager) */
- ico_uxf_window_visible_control(winmng, 0, 9);
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_HIDE,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
uifw_trace("ico_uxf_window_hide: Leave(EOK)");
return ICO_UXF_EOK;
return ICO_UXF_ENOENT;
}
- if (vis == 0) {
- winmng->attr.visible = 0;
+ if (vis == ICO_WINDOW_MGR_VISIBLE_HIDE) {
+ winmng->attr.visible = ICO_WINDOW_MGR_VISIBLE_HIDE;
}
- else if (vis == 1) {
- winmng->attr.visible = 1;
+ else if (vis == ICO_WINDOW_MGR_VISIBLE_SHOW) {
+ winmng->attr.visible = ICO_WINDOW_MGR_VISIBLE_SHOW;
if (gIco_Uxf_Api_Mng.AppsCtlVisible == 0) {
/* application screen */
if (winmng->attr.control != 0) {
uifw_trace("ico_uxf_window_visible_raise: change to hide(ctrl=%x menu=0)",
winmng->attr.control);
- vis = 0;
+ vis = ICO_WINDOW_MGR_VISIBLE_HIDE;
}
}
else {
if ((winmng->mng_process)->attr.noicon != 0) {
uifw_trace("ico_uxf_window_visible_raise: change to hide(ctrl=%x menu=1)",
winmng->attr.control);
- vis = 0;
+ vis = ICO_WINDOW_MGR_VISIBLE_HIDE;
}
}
}
- if ((vis != 9) || (raise != 9)) {
+ if ((vis != ICO_WINDOW_MGR_VISIBLE_NOCHANGE) ||
+ (raise != ICO_WINDOW_MGR_RAISE_NOCHANGE)) {
/* request to visible status and order status to Weston(Multi Window Manager) */
ico_uxf_window_visible_control(winmng, vis, raise);
}
/*--------------------------------------------------------------------------*/
/**
- * @brief ico_uxf_window_animation: set window animation
+ * @brief ico_uxf_window_visible_noanimation(: show/hide a target window without animation
*
* @param[in] window Window identity
- * @param[in] animation Animation name
+ * @param[in] show Show(1)/Hide(0)
+ * @return result
+ * @retval ICO_UXF_EOK success
+ * @retval ICO_UXF_ESRCH error(not initialized)
+ * @retval ICO_UXF_ENOENT error(not exist)
+ */
+/*--------------------------------------------------------------------------*/
+ICO_APF_API int
+ico_uxf_window_visible_noanimation(const int window, const int show)
+{
+ Ico_Uxf_Mng_Window *winmng; /* window management table */
+
+ uifw_trace("ico_uxf_window_visible_noanimation: Enter(%08x,%d)", window, show);
+
+ if (gIco_Uxf_Api_Mng.Initialized <= 0) {
+ uifw_warn("ico_uxf_window_visible_noanimation: Leave(ESRCH)");
+ return ICO_UXF_ESRCH;
+ }
+
+ winmng = ico_uxf_mng_window(window, 0);
+ if ((! winmng) || (! winmng->mng_display)) {
+ uifw_warn("ico_uxf_window_visible_noanimation: Leave(ENOENT)");
+ return ICO_UXF_ENOENT;
+ }
+ winmng->attr.visible = show ? 1 : 0;
+
+ if (show) {
+ if (winmng->attr.control == 0) {
+ /* request to display to Weston(Multi Window Manager) */
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_SHOW_WO_ANIMATION,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
+ }
+ }
+ else {
+ ico_uxf_window_visible_control(winmng, ICO_WINDOW_MGR_VISIBLE_HIDE_WO_ANIMATION,
+ ICO_WINDOW_MGR_RAISE_NOCHANGE);
+ }
+ uifw_trace("ico_uxf_window_visible_noanimation: Leave(EOK) control=%x",
+ winmng->attr.control);
+ return ICO_UXF_EOK;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief ico_uxf_window_animation: set window animation
+ *
+ * @param[in] window Window identity
+ * @param[in] visible_animation Animation name of change show/hide
+ * @param[in] resize_animation Animation name of change surface size
+ * @param[in] move_animation Animation name of change surface position
* @return result
* @retval ICO_UXF_EOK success
* @retval ICO_UXF_ESRCH error(not initialized)
*/
/*--------------------------------------------------------------------------*/
ICO_APF_API int
-ico_uxf_window_animation(const int window, const char *animation)
+ico_uxf_window_animation(const int window, const char *visible_animation,
+ const char *resize_animation, const char *move_animation)
{
Ico_Uxf_Mng_Window *winmng; /* window management table */
- char nullname[4];
- uifw_trace("ico_uxf_window_animation: Enter(%08x, %s)",
- window, animation ? animation : "NULL");
+ uifw_trace("ico_uxf_window_animation: Enter(%08x,%s,%s,%s)",
+ window, visible_animation ? visible_animation : "NULL",
+ resize_animation ? resize_animation : "NULL",
+ move_animation ? move_animation : "NULL");
if (gIco_Uxf_Api_Mng.Initialized <= 0) {
uifw_warn("ico_uxf_window_animation: Leave(ESRCH)");
return ICO_UXF_ENOENT;
}
- if (animation) {
+ if (visible_animation) {
ico_window_mgr_set_animation(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
- winmng->attr.window, animation);
+ winmng->attr.window,
+ ICO_WINDOW_MGR_ANIMATION_CHANGE_VISIBLE,
+ visible_animation);
}
- else {
- nullname[0] = ' ';
- nullname[1] = 0;
+ if (resize_animation) {
ico_window_mgr_set_animation(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
- winmng->attr.window, nullname);
+ winmng->attr.window,
+ ICO_WINDOW_MGR_ANIMATION_CHANGE_RESIZE,
+ resize_animation);
}
+ if (move_animation) {
+ ico_window_mgr_set_animation(gIco_Uxf_Api_Mng.Wayland_WindowMgr,
+ winmng->attr.window,
+ ICO_WINDOW_MGR_ANIMATION_CHANGE_MOVE,
+ move_animation);
+ }
+
uifw_trace("ico_uxf_window_animation: Leave(EOK)");
return ICO_UXF_EOK;
}
extern void hs_show_onscreen(void);
extern void hs_hide_onscreen(void);
extern void hs_show_appscreen(const char *appid);
+extern void hs_tile_delete_hide(const char *appid);
extern void hs_get_image_path(char *buff, int len);
extern void hs_get_sound_path(char *buff, int len);
char *group;
char *exec;
char *type;
+ char *animation_visible;
+ char *animation_resize;
+ char *animation_move;
int hostId;
char *location;
char *icon_key_name;
char autostart;
char noicon;
+ char noconfigure;
+ char res;
unsigned short invisiblecpu;
short kindId;
short categoryId;
short displayzoneNum;
short soundzoneNum;
short inputdevNum;
- char res[2];
Ico_Uxf_conf_appdisplay display[ICO_UXF_APPDISPLAY_MAX];
Ico_Uxf_conf_appsound sound[ICO_UXF_APPSOUND_MAX];
Ico_Uxf_conf_appinput input[ICO_UXF_APPINPUT_MAX];
typedef struct _ico_uxf_app_config {
int applicationNum;
- int ailNum;
+ int ailNum;
Ico_Uxf_conf_application *application;
Ico_Uxf_conf_application *hashidtable[ICO_UXF_MISC_HASHSIZE];
Ico_Uxf_conf_application *hashnametable[ICO_UXF_MISC_HASHSIZE];
/* Show window */
int ico_uxf_window_hide(const int window);
/* Hide window */
+int ico_uxf_window_visible_noanimation(const int window, const int show);
+ /* Show/Hide without animation */
int ico_uxf_window_visible_raise(const int window,
const int visible, const int raise);
/* Set window show/hide and raise/lower */
/* Lower window */
int ico_uxf_window_active(const int window, const int target);
/* Activate window */
-int ico_uxf_window_animation(const int window, const char *animation);
+int ico_uxf_window_animation(const int window, const char *animation_visible,
+ const char *animation_resize, const char *animation_move);
/* Set window animation */
int ico_uxf_window_control(const char *appid, const int winidx,
const int control, const int onoff);
#define ICO_UXF_MAX_COORDINATE 16384 /* maximum coordinate position + 1 */
/* timer */
-#define ICO_UXF_SUSP_INITTIME (10*1000) /* initiale no suspend time (ms) */
-#define ICO_UXF_SUSP_DELAY (300) /* suspend delay time (ms) */
+#define ICO_UXF_SUSP_INITTIME (5*1000) /* initiale no suspend time (ms) */
+#define ICO_UXF_SUSP_DELAY (200) /* suspend delay time (ms) */
#ifdef __cplusplus
}
+* Tue Jun 04 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130603.172554@344634f
+- 0.3.05 release.
+- Fix for TIVI-842 - [WLD] Previously existing app thumbnails missing on homescreen after launch and terminate more apps
+ Homescreen stores the hided app thumbnail's information.
+- Work around - Addition of the window animation interface.
+- Appoint that more than ico-uxf-weston-plugin-0.5.04 are necessary for spec file.
+
* Fri May 24 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130520.093309@f56086f
- 0.3.03 release
- Fix for TIVI-839 - [WLD] Install app with wrt install, No new app icon shown in Homescreen App list.
Name: ico-uxf-HomeScreen
Summary: sample homescreen
-Version: 0.3.04
+Version: 0.3.05
Release: 1.1
Group: TO_BE/FILLED_IN
License: Apache License, Version 2.0
BuildRequires: pkgconfig(wayland-client) >= 1.0
BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: ico-uxf-weston-plugin-devel >= 0.5.03
+BuildRequires: ico-uxf-weston-plugin-devel >= 0.5.04
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(eina)
BuildRequires: capi-base-common-devel
BuildRequires: edje-tools
Requires: weston >= 1.0
-Requires: ico-uxf-weston-plugin >= 0.5.03
+Requires: ico-uxf-weston-plugin >= 0.5.04
%description
Sample homescreen application.
# attributes of web applications
DemoMeterApp=Map
GhostCluster=Map
-WinkerLeft=Camera.Left;kind=Maker;dispzone=SysApp.Left;layer=InterruptApp;NoDisplay;autostart;invisiblecpu=no
-WinkerRight=Camera.Right;kind=Maker;dispzone=SysApp.Right;layer=InterruptApp;NoDisplay;autostart;invisiblecpu=no
+WinkerLeft=Camera.Left;kind=Maker;dispzone=SysApp.Left;layer=InterruptApp
+WinkerLeft.1=NoDisplay;autostart;Animation=Slide.toRight;invisiblecpu=no;noconfigure
+WinkerRight=Camera.Right;kind=Maker;dispzone=SysApp.Right;layer=InterruptApp
+WinkerRight.1=NoDisplay;autostart;Animation=Slide.toLeft;invisiblecpu=no;noconfigure
#
else if ((ret >= 0) && (attr.status != ICO_UXF_PROCSTATUS_RUN)) {
/* launch the application */
ret = ico_uxf_process_execute(cmd);
- if ((ret == ICO_UXF_EOK) || (ret == ICO_UXF_EBUSY)) {
- idx = hs_tile_get_index_app(cmd);
- if (idx < 0) {
- idx = hs_tile_get_minchange();
- }
- hs_tile_set_app(idx, cmd);
- }
}
}
else {
cnt++;
}
}
+ ret = ico_uxf_process_attribute_get(cmd, &attr);
+ if ((ret >= 0) && (attr.status == ICO_UXF_PROCSTATUS_RUN)) {
+ idx = hs_tile_get_index_app(cmd);
+ if (idx < 0) {
+ idx = hs_tile_get_minchange();
+ }
+ hs_tile_set_app(idx, cmd);
+ }
/* show the application screen*/
hs_show_appscreen(cmd);
#define ICO_HS_WINDOW_TYPE_TOUCH (2)
#define ICO_HS_TOUCH_TIME_OUT (1.0) /* Long press for timer */
typedef struct _hs_tile_info hs_tile_info_t;
+typedef struct _hs_tile_hide hs_tile_hide_t;
+
+struct _hs_tile_hide {
+ hs_tile_hide_t *next; /* next hide app on the same tile */
+ char appid[ICO_UXF_MAX_PROCESS_NAME];
+};
struct _hs_tile_info {
+ hs_tile_hide_t *next;
int idx; /* index: 0 to ... */
int valid; /* 0: invalid, 1:valid */ /* dont't touch now */
char appid[ICO_UXF_MAX_PROCESS_NAME]; /* active app id */
if (idx >= 0) {
hs_tile_free_app(idx);
}
+ else {
+ hs_tile_delete_hide(dd.process.process);
+ }
}
}
else if (ev == ICO_UXF_EVENT_ACTIVEWINDOW) {
}
else {
ico_uxf_window_active(dd.window.window,
- ICO_UXF_WINDOW_POINTER_ACTIVE |
ICO_UXF_WINDOW_KEYBOARD_ACTIVE);
ico_uxf_window_raise(dd.window.window);
ico_syc_apc_active(winAttr.process);
}
else {
ico_uxf_window_active(window.window,
- ICO_UXF_WINDOW_POINTER_ACTIVE |
ICO_UXF_WINDOW_KEYBOARD_ACTIVE);
}
ico_uxf_window_raise(window.window);
uifw_warn("hs_tile_init_info: Leave(err malloc tile str failed)");
return ICO_HS_ERR;
}
+ memset(hs_tile_info, 0, sizeof(hs_tile_info_t) * (tilecnt + ICO_HS_NOTILE_APP_MAX));
/* get screen size */
ico_uxf_window_screen_size_get(&dispW, &dispH);
/*--------------------------------------------------------------------------*/
/**
+ * @brief hs_tile_delete_hide
+ * delete hide app information.
+ *
+ * @param[in] appid application id
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+hs_tile_delete_hide(const char *appid)
+{
+ int ii;
+ hs_tile_info_t *tinfo;
+ hs_tile_hide_t *hide, *bhide;
+
+ for (ii = 0; ii < hs_tile_cnt; ii++) {
+ tinfo = &hs_tile_info[ii];
+ hide = tinfo->next;
+ bhide = NULL;
+ while (hide) {
+ if (strcmp(appid, hide->appid) == 0) {
+ if (! bhide) {
+ tinfo->next = hide->next;
+ }
+ else {
+ bhide->next = hide->next;
+ }
+ free(hide);
+ break;
+ }
+ bhide = hide;
+ hide = hide->next;
+ }
+ }
+
+ return;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief hs_tile_free_app
* delete all information of the indicated tile.
*
hs_tile_free_app(int idx)
{
hs_tile_info_t *tinfo;
+ hs_tile_hide_t *hide;
+ int win;
if ((idx >= 0) && (idx < hs_tile_cnt)) {
tinfo = &hs_tile_info[idx];
- memset(tinfo->appid, 0, ICO_UXF_MAX_PROCESS_NAME + 1);
+ if (tinfo->next) {
+ hide = tinfo->next;
+ tinfo->next = hide->next;
+ strncpy(tinfo->appid, hide->appid, ICO_UXF_MAX_PROCESS_NAME);
+ free(hide);
+ }
+ else {
+ memset(tinfo->appid, 0, ICO_UXF_MAX_PROCESS_NAME + 1);
+ }
+ }
+ else {
+ return;
+ }
+
+ if (strlen(hs_active_onscreen) > 0) {
+ return;
+ }
+ if (hs_regulation_visible == 0) {
+ return;
+ }
+
+ if ((hs_stat_touch == ICO_HS_TOUCH_IN_SHOW)
+ && (strlen(tinfo->appid) > 0)) {
+ win = hs_get_process_window(tinfo->appid);
+ if (win > 0) {
+ ico_uxf_window_visible_raise(win, 1, 1);
+ }
}
}
int idx, ret;
idx = hs_tile_get_index_app(appid);
- if (idx < 0) {
- return;
- }
ret = ico_uxf_process_terminate(appid);
if (ret == ICO_UXF_EOK) {
- hs_tile_free_app(idx);
+ if (idx >= 0) {
+ hs_tile_free_app(idx);
+ }
+ else {
+ hs_tile_delete_hide(appid);
+ }
}
return;
hs_tile_set_app(int idx, const char *appid)
{
hs_tile_info_t *tinfo;
+ hs_tile_hide_t *search, *bsearch, *hide = NULL;
+ int ii;
uifw_trace("hs_tile_set_app: Enter(idx=%d appid=%s)", idx, appid);
- if (idx >= 0) {
- tinfo = &hs_tile_info[idx];
- if (tinfo->valid > 0) {
+ if ((idx < 0) && (idx >= hs_tile_cnt)) {
+ return;
+ }
+
+ /* check whether the app is same as tile one */
+ tinfo = &hs_tile_info[idx];
+ if (strcmp(tinfo->appid, appid) == 0) {
+ return;
+ }
+
+ /* check whether the app is hide */
+ for (ii = 0; ii < hs_tile_cnt; ii++) {
+ tinfo = &hs_tile_info[ii];
+ if (tinfo->valid == 0) continue;
+ search = tinfo->next;
+ bsearch = NULL;
+ while (search) {
+ if (strcmp(search->appid, appid) == 0) {
+ hide = search;
+ if (! bsearch) {
+ tinfo->next = search->next;
+ }
+ else {
+ bsearch->next = search->next;
+ }
+ break;
+ }
+ bsearch = search;
+ search = search->next;
+ }
+ if (hide) {
+ break;
+ }
+ }
+
+ /* set */
+ tinfo = &hs_tile_info[idx];
+ if (tinfo->valid > 0) {
+ if (strlen(tinfo->appid) != 0) {
int oldwin = hs_get_process_window(tinfo->appid);
if (oldwin > 0) {
(void) ico_uxf_window_hide(oldwin);
}
- strncpy(tinfo->appid, appid, ICO_UXF_MAX_PROCESS_NAME);
- tinfo->change++;
+
+ if (! hide) {
+ hide = malloc(sizeof(hs_tile_hide_t));
+ }
+ if (! hide) {
+ uifw_warn("hs_tile_set_app: cannot allocate app table");
+ }
+ else {
+ memset(hide, 0, sizeof(hs_tile_hide_t));
+ strncpy(hide->appid, tinfo->appid, ICO_UXF_MAX_PROCESS_NAME);
+ if (tinfo->next) {
+ hide->next = tinfo->next;
+ }
+ tinfo->next = hide;
+ }
+ }
+ else {
+ free(hide);
}
+
+ strncpy(tinfo->appid, appid, ICO_UXF_MAX_PROCESS_NAME);
+ tinfo->change++;
}
}
hs_tile_info_t *tinfo;
uifw_trace("hs_touch_up_tile: idx=%d", idx);
+
+ if (strlen(hs_active_onscreen) != 0) {
+ uifw_trace("hs_touch_up_tile: active=%s", hs_active_onscreen);
+ return;
+ }
+
tinfo = &hs_tile_info[idx];
if (tinfo->l_press == 1) {
/* flag reset */
hs_show_appscreen(NULL);
}
hs_hide_onscreen();
- memset(hs_active_onscreen, 0, sizeof(hs_active_onscreen));
+ memset(hs_active_onscreen, 0, sizeof(hs_active_onscreen));
}
}
else {
if (idx >= 0) {
hs_tile_free_app(idx);
}
+ else {
+ hs_tile_delete_hide(hs_command_req[ii].program.terminate.appid);
+ }
uifw_debug("FORM terminate %s = %d",
hs_command_req[ii].program.terminate.appid, st);
if (hs_command_delay > 0)
/*============================================================================*/
static int ons_loadinons_edje_file(const char *edje_file);
static void ons_event_message(char *format, ...);
-static ons_msg_t *ons_alloc_seendmsg(char *data, int len);
+static ons_msg_t *ons_alloc_sendmsg(char *data, int len);
+static void ons_free_msgst(ons_msg_t *msg);
static ons_msg_t *ons_get_sendmsg(void);
static int ons_put_sendmsg(ons_msg_t *send);
static char *ons_edje_parse_str(void *in, int arg_num);
uifw_trace("OnScreen: ons_event_message %s", message);
- send = ons_alloc_seendmsg(message, strlen(message));
+ send = ons_alloc_sendmsg(message, strlen(message));
if (!send) {
uifw_warn("ons_event_message: ERROR(allocate send msg)");
}
/*--------------------------------------------------------------------------*/
/**
- * @brief ons_alloc_seendmsg
+ * @brief ons_free_msgst
+ * free the message structure
+ *
+ * @param[in] msg message to free
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+ons_free_msgst(ons_msg_t *msg)
+{
+ if (!msg) {
+ return;
+ }
+
+ if (msg->data) {
+ free(msg->data);
+ }
+
+ memset(msg, 0, sizeof(ons_msg_t));
+
+ msg->next = ons_free_msg;
+ ons_free_msg = msg;
+
+ return;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief ons_alloc_sendmsg
* Allocate a send message buffer.
*
* @param[in] data data
*/
/*--------------------------------------------------------------------------*/
static ons_msg_t *
-ons_alloc_seendmsg(char *data, int len)
+ons_alloc_sendmsg(char *data, int len)
{
ons_msg_t *msg;
uifw_warn("ons_callback_onscreen: ERROR(fail to write ws)");
}
}
+ ons_free_msgst(msg);
if (ons_send_msg) {
libwebsocket_callback_on_writable(context, wsi);
}
unsigned char *p = &buf[LWS_SEND_BUFFER_PRE_PADDING];
char *appid = (char *)data;
+ uifw_trace("TOUCH UP: SHORTCUT %s", appid);
+
if (sb_wait_reply == ICO_SB_NO_WAIT) {
if ((sb_wsi_mirror != NULL) && (appid != NULL)) {
n = sprintf((char *)p, "SHOW %s %s", appid, getenv("PKG_NAME"));
char img[ICO_HS_TEMP_BUF_SIZE];
char path[ICO_HS_TEMP_BUF_SIZE];
+ uifw_trace("TOUCH DOWN: APPLIST");
+
hs_get_image_path(path, sizeof(path));
sprintf(img, "%s"ICO_SB_APPLIST_ONICON, path);
char path[ICO_HS_TEMP_BUF_SIZE];
char img[ICO_HS_TEMP_BUF_SIZE];
+ uifw_trace("TOUCH UP: APPLIST");
+
hs_get_image_path(path, sizeof(path));
sprintf(img, "%s"ICO_SB_APPLIST_OFFICON, path);
char img[ICO_HS_TEMP_BUF_SIZE];
char path[ICO_HS_TEMP_BUF_SIZE];
+ uifw_trace("TOUCH DOWN: CHANGE");
+
hs_get_image_path(path, sizeof(path));
sprintf(img, "%s"ICO_SB_HOME_ONICON, path);
char path[ICO_HS_TEMP_BUF_SIZE];
char img[ICO_HS_TEMP_BUF_SIZE];
+ uifw_trace("TOUCH UP: CHANGE");
+
hs_get_image_path(path, sizeof(path));
sprintf(img, "%s"ICO_SB_HOME_OFFICON, path);
appid = hs_conf_get_string(ICO_HS_CONFIG_STATUBAR, config, NULL);
if ((appid != NULL) && (strcmp(appid, "none") != 0)) {
appconf = ico_uxf_getAppByAppid(appid);
- if (appid) {
+ if (appconf) {
tile = evas_object_image_filled_add(canvas);
evas_object_image_file_set(tile,
appconf->icon_key_name, NULL);
#!/bin/sh
## log file
-export HOMESCREEN_LOG=/tmp/log/org.tizen.ico.homescreen.log
-export ONSCREEN_LOG=/tmp/log/org.tizen.ico.onscreen.log
+mkdir /var/log/ico > /dev/null 2>&1
+export HOMESCREEN_LOG=/var/log/ico/org.tizen.ico.homescreen.log
+export ONSCREEN_LOG=/var/log/ico/org.tizen.ico.onscreen.log
## make dat
./homescreen-test-makedat.sh
## GUI test
-./ico_send_inputevent -m < testdata/gui-test.dat
+ico_send_inputevent -m < testdata/gui-test.dat
## CUI test
#Hide tile screen
-./ico_send_hscommand json/hide-tile.json
+ico_send_hscommand json/hide-tile.json
sleep 3
#Show tile screen
-./ico_send_hscommand json/show-tile.json
+ico_send_hscommand json/show-tile.json
sleep 3
#Show application
-./ico_send_hscommand json/hide-tile.json
+ico_send_hscommand json/hide-tile.json
sleep 3
-./ico_send_hscommand json/show-app1.json
+ico_send_hscommand json/show-app1.json
sleep 3
#Move and resize application
-./ico_send_hscommand json/geom-app1-1.json
+ico_send_hscommand json/geom-app1-1.json
sleep 3
-./ico_send_hscommand json/geom-app1-2.json
+ico_send_hscommand json/geom-app1-2.json
sleep 3
-./ico_send_hscommand json/geom-app1-3.json
+ico_send_hscommand json/geom-app1-3.json
sleep 3
#Terminate application
-./ico_send_hscommand json/term-app1.json
+ico_send_hscommand json/term-app1.json
sleep 3
-./ico_send_hscommand json/show-tile.json
+ico_send_hscommand json/show-tile.json
sleep 3
#Terminate application
-./ico_send_hscommand json/hide-tile.json
+ico_send_hscommand json/hide-tile.json
sleep 3
-./ico_send_hscommand json/exec-app1.json
+ico_send_hscommand json/exec-app1.json
sleep 3
#Application on tile screen
-./ico_send_hscommand json/show-tile.json
+ico_send_hscommand json/show-tile.json
sleep 3
## Check Error