bug fix: Local time is supported in the clock display of StatusBar.
improve: A multiplex notice is supported in OnScreen.
bug fix:LiveThumbnail of HomeScreen not works when APP installed.Homescreen take over the SURFACE of the old menu to the new menu, when that regenerate the menu.
Change-Id: I5ec88f76256018e03b45cd1b854d4125799a1764
Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_syc_isconnect
+ * Check connect of System Controller.
+ *
+ * @param none
+ * @return result
+ * @retval 1 connected to System Controller
+ * @retval 0 not connect
+ */
+/*--------------------------------------------------------------------------*/
+int ico_syc_isconnect(void);
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_syc_service
* Service for communication to System Controller.
*
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
#define MSG_PRMKEY_LAYER (char *)"layer"
#define MSG_PRMKEY_NODE (char *)"node"
#define MSG_PRMKEY_ZONE (char *)"zone"
+#define MSG_PRMKEY_ANIM_TYPE (char *)"anim_type"
#define MSG_PRMKEY_ANIM_NAME (char *)"anim_name"
#define MSG_PRMKEY_ANIM_TIME (char *)"anim_time"
#define MSG_PRMKEY_ATTR (char *)"attr"
#define MSG_CMD_SHOW 0x00010003
#define MSG_CMD_HIDE 0x00010004
#define MSG_CMD_MOVE 0x00010005
-#define MSG_CMD_CHANGE_ACTIVE 0x00010006
-#define MSG_CMD_CHANGE_LAYER 0x00010007
-#define MSG_CMD_CHANGE_ATTR 0x00010008
-#define MSG_CMD_NAME 0x00010009
-#define MSG_CMD_MAP_THUMB 0x00010011
-#define MSG_CMD_UNMAP_THUMB 0x00010012
-#define MSG_CMD_MAP_GET 0x00010013
-#define MSG_CMD_SHOW_LAYER 0x00010020
-#define MSG_CMD_HIDE_LAYER 0x00010021
-#define MSG_CMD_CHANGE_LAYER_ATTR 0x00010022
+#define MSG_CMD_ANIMATION 0x00010006
+#define MSG_CMD_CHANGE_ACTIVE 0x00010007
+#define MSG_CMD_CHANGE_LAYER 0x00010008
+#define MSG_CMD_CHANGE_ATTR 0x00010009
+#define MSG_CMD_NAME 0x00010010
+#define MSG_CMD_MAP_THUMB 0x00010020
+#define MSG_CMD_UNMAP_THUMB 0x00010021
+#define MSG_CMD_MAP_GET 0x00010022
+#define MSG_CMD_SHOW_LAYER 0x00010030
+#define MSG_CMD_HIDE_LAYER 0x00010031
+#define MSG_CMD_CHANGE_LAYER_ATTR 0x00010032
/* input controller */
#define MSG_CMD_ADD_INPUT 0x00020001
#define MSG_CMD_DEL_INPUT 0x00020002
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
} ico_syc_surface_animation;
/*
+ * surface animation target
+ * @ICO_SYC_ANIMATION_TYPE_HIDE:
+ * @ICO_SYC_ANIMATION_TYPE_SHOW:
+ * @ICO_SYC_ANIMATION_TYPE_MOVE:
+ * @ICO_SYC_ANIMATION_TYPE_RESIZE:
+ * @ICO_SYC_ANIMATION_TYPE_ALL:
+ */
+typedef enum _surface_animation_type {
+ ICO_SYC_ANIMATION_TYPE_HIDE = 1,
+ ICO_SYC_ANIMATION_TYPE_SHOW = 2,
+ ICO_SYC_ANIMATION_TYPE_MOVE = 4,
+ ICO_SYC_ANIMATION_TYPE_RESIZE = 8,
+ ICO_SYC_ANIMATION_TYPE_ALL = 0xff
+} ico_syc_surface_animation_type;
+
+/*
* type of window aspect
* @ICO_SYC_WIN_ASPECT_FIXED: fixed aspect
* @ICO_SYC_WIN_ASPECT_ALIGN_LEFT: left align
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_syc_set_animation
+ * Set the application window animation.
+ *
+ * @param[in] appid application id
+ * @param[in] surface window's surface id
+ * @param[in] type set animation target
+ * @param[in] animation animation information
+ * @return result
+ * @retval 0 success
+ * @retval not 0 error
+ */
+/*--------------------------------------------------------------------------*/
+int ico_syc_set_animation(const char *appid, int surface, int type,
+ const ico_syc_animation_t *animation);
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_syc_change_active
* Change the active window which receives the input-event notification
* from System Controller.
* @return none
*/
/*--------------------------------------------------------------------------*/
-static void
+static void
_disconnect_client(void)
{
/* unset callback */
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_syc_isconnect
+ * Check connect of System Controller.
+ *
+ * @param none
+ * @return result
+ * @retval 1 connected to System Controller
+ * @retval 0 not connect
+ */
+/*--------------------------------------------------------------------------*/
+ICO_API int
+ico_syc_isconnect(void)
+{
+ if ((uws_context != NULL) && (uws_id != NULL)) {
+ return 1;
+ }
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_syc_service
* Service for communication to System Controller.
*
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
static msg_t _create_win_move_msg(const char *appid, int surface,
const ico_syc_win_move_t *move,
const ico_syc_animation_t *animation);
+static msg_t _create_win_animation_msg(const char *appid, int surface,
+ int type, const char *animation, int time);
static msg_t _create_active_win_msg(const char *appid, int surface);
static msg_t _create_change_layer_msg(const char *appid, int surface, int layer);
static msg_t _create_map_get_msg(const char *appid, int surface, const char *filepath);
/*--------------------------------------------------------------------------*/
/**
+ * @brief _create_win_animation_msg
+ * Create the message to set animation the application window.
+ *
+ * @param[in] appid application id
+ * @param[in] surface window's surface id
+ * @param[in] type set animation target
+ * @param[in] animation animation information
+ * @param[in] time animation time
+ * @return json generator
+ * @retval json generator success
+ * @retval NULL error
+ */
+/*--------------------------------------------------------------------------*/
+static msg_t
+_create_win_animation_msg(const char *appid, int surface,
+ int type, const char *animation, int time)
+{
+ JsonObject *obj = NULL;
+ JsonObject *argobj = NULL;
+ JsonGenerator *gen = NULL;
+ JsonNode *root = NULL;
+
+ /* create json object */
+ obj = json_object_new();
+ argobj = json_object_new();
+ if (obj == NULL || argobj == NULL) {
+ _ERR("json_object_new failed");
+ return NULL;
+ }
+
+ /* set message */
+ json_object_set_int_member(obj, MSG_PRMKEY_CMD, MSG_CMD_ANIMATION);
+ json_object_set_string_member(obj, MSG_PRMKEY_APPID, appid);
+ json_object_set_int_member(obj, MSG_PRMKEY_PID, getpid());
+
+ json_object_set_int_member(argobj, MSG_PRMKEY_SURFACE, surface);
+ json_object_set_int_member(argobj, MSG_PRMKEY_ANIM_TYPE, type);
+ json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, animation);
+ json_object_set_int_member(argobj, MSG_PRMKEY_ANIM_TIME, time);
+
+ json_object_set_object_member(obj, MSG_PRMKEY_ARG, argobj);
+
+ /* create root object */
+ root = json_node_new(JSON_NODE_OBJECT);
+ json_node_take_object(root, obj);
+
+ /* create generator object */
+ gen = json_generator_new();
+ json_generator_set_root(gen, root);
+
+ return gen;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief _create_active_win_msg
* Create the message to change active window.
*
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_syc_set_animation
+ * Set the application window animation.
+ *
+ * @param[in] appid application id
+ * @param[in] surface window's surface id
+ * @param[in] type set animation target
+ * @param[in] animation animation information
+ * @return result
+ * @retval 0 success
+ * @retval not 0 error
+ */
+/*--------------------------------------------------------------------------*/
+ICO_API int
+ico_syc_set_animation(const char *appid, int surface, int type,
+ const ico_syc_animation_t *animation)
+{
+ int ret = ICO_SYC_ERR_NONE;
+ msg_t msg;
+
+ /* check argument */
+ if (appid == NULL) {
+ _ERR("invalid parameter (appid is NULL)");
+ return ICO_SYC_ERR_INVALID_PARAM;
+ }
+
+ /* make message */
+ msg = _create_win_animation_msg(appid, surface, type, animation->name, animation->time);
+ /* send message */
+ ret = ico_syc_send_msg(msg);
+ /* free send message */
+ ico_syc_free_msg(msg);
+
+ return ret;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_syc_change_active
* Change the active window which receives the win-event notification
* from System Controller.
// return;
// }
+ numDisplay = 0;
ptree displays = root.get_child("systemconfig.displays");
BOOST_FOREACH (const ptree::value_type& child, displays) {
optional<int> id = optional<int>(-1);
createDisplayZoneConf(child, displayConf);
m_displayConfList.push_back(displayConf);
+ numDisplay ++;
}
}
*/
//--------------------------------------------------------------------------
int
+CicoSystemConfig::getNumberofDisplay(void)
+{
+ return numDisplay;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief
+ *
+ * @param [in]
+ */
+//--------------------------------------------------------------------------
+int
CicoSystemConfig::getLayerIdfbyName(const string & displayName,
const string & layerName)
{
int getNodeIdbyName(const string & name);
int getDisplayIdbyName(const string & name);
int getDisplayIdbyNo(int no);
+ int getNumberofDisplay(void);
int getLayerIdfbyName(const string & displayName,
const string & layerName);
int getLayerIdfbyName(const string& ECU,
CicoSCVehicleInfoConf *m_vehicleInfoConf;
CicoSCRoleConf *m_roleConf;
CicoSCPositionOSConf *m_positionOSConf;
+ int numDisplay;
};
#endif // __CICO_SYSTEM_CONFIG_H__
// vim:set expandtab ts=4 sw=4:
options->nodeid = getIntValue(root, "arg.node");
options->zone = getStrValue(root, "arg.zone");
options->animation = getStrValue(root, "arg.anim_name");
+ options->animationType = getIntValue(root, "arg.anim_type");
+ if (-1 == options->animationType) {
+ options->animationType = 0xff;
+ }
options->animationTime = getIntValue(root, "arg.anim_time");
if (-1 == options->animationTime) {
options->animationTime = 0;
/// default constructor
CicoSCCmdWinCtrlOpt()
: nodeid(0), displayid(0), layerid(0),
- zone(""), surfaceid(-1), animation(""), animationTime(0),
+ zone(""), surfaceid(-1), animationType(0), animation(""), animationTime(0),
x(-1), y(-1), width(-1), height(-1), raise(-1),
visible(-1), active(-1), framerate(0), stride(-1), format(-1) {}
void dump(void)
{
ICO_DBG("WinCtrlOpt: "
- "surfaceid=0x%08X layerid=%d nodeid=%d zone=%s "
- "animation=%s animationTime=%d "
+ "surfaceid=%08X layerid=%d nodeid=%d zone=%s "
+ "animation=%s animaType=%x animaTime=%d "
"x=%d y=%d w=%d h=%d raise=%d "
"visible=%d active=%d framerate=%d stride=%d format=%d",
surfaceid, layerid, nodeid, zone.c_str(),
- animation.c_str(), animationTime,
+ animation.c_str(), animationType, animationTime,
x, y, width, height, raise,
visible, active, framerate, stride, format);
}
int layerid; //!< id of layer
std::string zone; //!< name of display zone
int surfaceid; //!< id of surface
+ int animationType; //!< type of animation
std::string animation; //!< name of animation
int animationTime; //!< time of animation
int x; //!< x position of window
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("not found window information");
+ ICO_WRN("CicoSCWindowController::move not found window(%08x)", surfaceid);
+ ICO_TRA("CicoSCWindowController::move Leave(ENOENT)");
+ return ICO_SYC_ENOENT;
+ }
+ // check nodeid
+ if (nodeid >= (int)m_physicalDisplayTotal) {
+ ICO_WRN("CicoSCWindowController::move not found node(%d)", nodeid);
ICO_TRA("CicoSCWindowController::move Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("not found window information");
+ ICO_WRN("CicoSCWindowController::setGeometry not found window(%08x)", surfaceid);
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(ENOENT)");
+ return ICO_SYC_ENOENT;
+ }
+ // check nodeid
+ if (nodeid >= (int)m_physicalDisplayTotal) {
+ ICO_WRN("CicoSCWindowController::setGeometry not found node(%d)", nodeid);
ICO_TRA("CicoSCWindowController::setGeometry Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("not found window information");
+ ICO_WRN("CicoSCWindowController::setGeometry not found window(%08x)", surfaceid);
ICO_TRA("CicoSCWindowController::setGeometry Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
+ // find zone information
if ((NULL == zone) || ('\0' == zone[0])) {
ICO_WRN("zone value is invalid");
ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
break;
}
}
-
if (NULL == dispzone) {
ICO_WRN("display zone name(%s) is invalid.", zone);
ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
-
if (m_physicalDisplayTotal <= (unsigned int)displayno) {
ICO_WRN("nodeid(%d) is over physical display total(%d)",
m_physicalDisplayTotal, displayno);
//--------------------------------------------------------------------------
/**
+ * @brief set window(surface) animation
+ *
+ * @param [in] surfaceid wayland surface id
+ * @param [in] target target(pointer and/or keyboard)
+ * @param [in] type set animation target
+ * @param [in] animation animation information
+ * @param [in] time animation time
+ *
+ * @return ICO_SYC_EOK on success, other on error
+ * @retval ICO_SYC_EOK success
+ * @retval ICO_SYC_ESRCH error(not initialized)
+ * @retval ICO_SYC_ENOENT error(layer dose not exist)
+ */
+//--------------------------------------------------------------------------
+int
+CicoSCWindowController::setWindowAnimation(int surfaceid, int type,
+ const char *animation, int time)
+{
+ CicoSCWindow *window = NULL;
+
+ ICO_TRA("CicoSCWindowController::setWindowAnimation Enter"
+ "(surfaceid=%08X, type=%x, animation=<%s>, time=%d)",
+ surfaceid, type, animation ? animation : "(null)", time);
+
+ // find window information in window list
+ window = findWindow(surfaceid);
+ if (NULL == window) {
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::setWindowAnimation Leave(ENOENT)");
+ return ICO_SYC_ENOENT;
+ }
+
+ // set animation request to Multi Window Manager
+ CicoSCWlWinMgrIF::setAnimation(surfaceid, type, animation, time);
+
+ // flush display
+ CicoSCWayland::getInstance()->flushDisplay();
+
+ ICO_TRA("CicoSCWindowController::setWindowAnimation Leave(EOK)");
+ return ICO_SYC_EOK;
+}
+
+//--------------------------------------------------------------------------
+/**
* @brief set window layer
*
* @param [in] surfaceid wayland surface id
ICO_ERR("CicoSCWindowController::setWindowLayer ilm_layerRemoveSurface(%d,%08x)"
" Error", window->layerid, window->surfaceid);
}
+ // must need ilm_commitChanges() after ilm_layerRemoveSurface()
+ if (ilm_commitChanges() != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::setWindowLayer ilm_commitChanges Error");
+ }
+
oldlayer->removeSurface(window->surfaceid);
int noldsurf;
const int *oldsurfs = oldlayer->getSurfaces(&noldsurf);
ICO_ERR("CicoSCWindowController::setWindowLayer "
"ilm_layerSetRenderOrder(%d,,%d) Error", window->layerid, noldsurf);
}
- // must need ilm_commitChanges() after ilm_layerRemoveSurface()
if (ilm_commitChanges() != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::setWindowLayer ilm_commitChanges Error");
}
ICO_ERR("CicoSCWindowController::setWindowLayer ilm_layerAddSurface(%d,%08x) Error",
window->layerid, window->surfaceid);
}
+ if (ilm_commitChanges() != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::setWindowLayer ilm_commitChanges() Error");
+ }
// add surface to new layer
layer->addSurface(window->surfaceid, true);
window->y = y;
window->width = width;
window->height = height;
- window->nodeid = window->layerid / 1000;
+ window->nodeid = window->layerid / ICO_SC_LAYERID_SCREENBASE;
// notify to homescreen
CicoSCMessage *message = new CicoSCMessage();
return;
}
- t_ilm_uint Dimansion[2];
- Dimansion[0] = window->srcwidth;
- Dimansion[1] = window->srcheight;
- t_ilm_uint Position[2];
- Position[0] = window->x;
- Position[1] = window->y;
- if (ilm_surfaceSetOpacity(window->surfaceid , (t_ilm_float)1.0f) != ILM_SUCCESS) {
- ICO_ERR("CicoSCWindowController::createSurfaceCB "
- "ilm_surfaceSetOpacity(%08x) Error", window->surfaceid);
- }
- else if (ilm_surfaceSetDimension(window->surfaceid, Dimansion) != ILM_SUCCESS) {
- ICO_ERR("CicoSCWindowController::createSurfaceCB "
- "ilm_surfaceSetDimension(%08x) Error", window->surfaceid);
- }
- else if (ilm_surfaceSetDestinationRectangle(window->surfaceid, window->x, window->y,
+ if (ilm_surfaceSetDestinationRectangle(window->surfaceid, window->x, window->y,
window->width, window->height) != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::createSurfaceCB "
"ilm_surfaceSetDestinationRectangle(%08x) Error", window->surfaceid);
}
- else if (ilm_surfaceSetPosition(window->surfaceid, Position) != ILM_SUCCESS) {
+ else if (ilm_surfaceSetSourceRectangle(window->surfaceid, 0, 0,
+ window->width, window->height) != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::createSurfaceCB "
- "ilm_surfaceSetPosition(%08x) Error", window->surfaceid);
+ "ilm_surfaceSetSourceRectangle(%08x) Error", window->surfaceid);
}
else if (ilm_surfaceSetOrientation(window->surfaceid, ILM_ZERO) != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::createSurfaceCB "
"ilm_surfaceSetOrientation(%08x) Error", window->surfaceid);
}
+ else if (ilm_commitChanges() != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_commitChanges() Error");
+ }
CicoSCLayer *layer = findLayer(window->displayid, window->layerid);
if (layer) {
ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_layerAddSurface(%d,%08x) "
"Error", window->layerid, window->surfaceid);
}
+ if (ilm_commitChanges() != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_commitChanges() Error");
+ }
layer->addSurface(window->surfaceid, true);
int nsurf;
ICO_ERR("CicoSCWindowController::createSurfaceCB: "
"ilm_layerSetRenderOrder(%d,,%d) Error", window->layerid, nsurf);
}
+ if (ilm_commitChanges() != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_commitChanges() Error");
+ }
}
- if (ilm_commitChanges() != ILM_SUCCESS) {
+ // must set surfaceOpacity after surfcaeAddLayer
+ if (ilm_surfaceSetOpacity(window->surfaceid , (t_ilm_float)1.0f) != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWindowController::createSurfaceCB "
+ "ilm_surfaceSetOpacity(%08x) Error", window->surfaceid);
+ }
+ else if (ilm_commitChanges() != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_commitChanges() Error");
}
}
ICO_TRA("initializeGeniviLMS: Screens=%d.%x %x %x %x",
NumberOfScreens, ScreenIds[0], ScreenIds[1], ScreenIds[2], ScreenIds[3]);
+ if ((int)NumberOfScreens > CicoSystemConfig::getInstance()->getNumberofDisplay()) {
+ NumberOfScreens = (t_ilm_uint)CicoSystemConfig::getInstance()->getNumberofDisplay();
+ }
for (idx = 0; idx < (int)NumberOfScreens; idx++) {
ICO_TRA("CicoSCWindowController::initializeGeniviLMS: "
"call ilm_getPropertiesOfScreen(%x)", ScreenIds[idx]);
findLayerConfbyIdx(DisplayId, idx);
if (! LayerConf) break;
- LayerId = LayerConf->id + DisplayId * 1000;
+ LayerId = LayerConf->id + DisplayId * ICO_SC_LAYERID_SCREENBASE;
for (idx2 = 0; idx2 < LayerNumber; idx2++) {
if (LayerId == (int)pLayerId[idx2]) break;
}
ICO_ERR("CicoSCWindowController::initializeGeniviLMS "
"ilm_layerSetOrientation(%d) Error", LayerId);
}
- else if (ilm_layerSetOrientation(LayerId, ILM_ZERO) != ILM_SUCCESS) {
- ICO_ERR("CicoSCWindowController::initializeGeniviLMS "
- "ilm_layerSetOrientation(%d) Error", LayerId);
- }
- else if (ilm_layerAddNotification(LayerId, wlGeniviLayerNotification)
- != ILM_SUCCESS) {
- ICO_ERR("CicoSCWindowController::initializeGeniviLMS "
- "ilm_layerAddNotification(%d) Error", LayerId);
- }
else {
if (ilm_commitChanges() != ILM_SUCCESS) {
ICO_ERR("CicoSCWindowController::initializeGeniviLMS "
"ilm_commitChanges() Error");
}
+ // SystemController default is layer visible
+ if ((ilm_layerSetVisibility(LayerId, 1) != ILM_SUCCESS) ||
+ (ilm_commitChanges() != ILM_SUCCESS)) {
+ ICO_ERR("CicoSCWindowController::initializeGeniviLMS "
+ "ilm_layerSetVisibility() Error");
+ }
ICO_TRA("initializeGeniviLMS: layer=%d created(%d,%d)",
LayerId, DisplayConf->width, DisplayConf->height);
*ppLayerId = LayerId;
}
break;
}
+ case MSG_CMD_ANIMATION:
+ ICO_DBG("command: MSG_CMD_ANIMATION");
+ (void)setWindowAnimation(opt->surfaceid, opt->animationType,
+ opt->animation.c_str(), opt->animationTime);
+ break;
case MSG_CMD_CHANGE_ACTIVE:
ICO_DBG("command: MSG_CMD_CHANGE_ACTIVE");
(void)active(opt->surfaceid, opt->active);
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
#include "CicoSCWlWinMgrIF.h"
#define ICO_SC_APPID_DEFAULT_ONS "org.tizen.ico.onscreen"
+#define ICO_SC_LAYERID_SCREENBASE 1000
//==========================================================================
// Forward declaration
int lower(int surfaceid, const char *animation, int animationTime);
+ int setWindowAnimation(int surfaceid, int type, const char *animation, int time);
+
int setWindowLayer(int surfaceid, int layerid);
int showLayer(int displayid, int layerid);
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full tWlExt of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full tWlExt of the Apache License is at
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
"(surfaceid=0x%08X node=%d x=%d y=%d w=%d h=%d)",
surfaceid, node, x, y, width, height);
- t_ilm_uint Dimansion[2];
- Dimansion[0] = width;
- Dimansion[1] = height;
- t_ilm_uint Position[2];
- Position[0] = x;
- Position[1] = y;
-
- if (ilm_surfaceSetDimension(surfaceid, Dimansion) != ILM_SUCCESS) {
- ICO_ERR("CicoSCWlWinMgrIF::setPositionsize "
- "ilm_surfaceSetDimension(%08x) Error", surfaceid);
- }
- else if (ilm_surfaceSetPosition(surfaceid, Position) != ILM_SUCCESS) {
- ICO_ERR("CicoSCWlWinMgrIF::setPositionsize "
- "ilm_surfaceSetPosition(%08x) Error", surfaceid);
- }
- else if (ilm_surfaceSetDestinationRectangle(surfaceid, x, y, width, height)
+ if (ilm_surfaceSetDestinationRectangle(surfaceid, x, y, width, height)
!= ILM_SUCCESS) {
ICO_ERR("CicoSCWlWinMgrIF::setPositionsize ilm_surfaceSetDestinationRectangle"
"(%08x,%d,%d,%d,%d) Error", surfaceid, x, y, width, height);
}
+ else if (ilm_surfaceSetSourceRectangle(surfaceid, 0, 0, width, height)
+ != ILM_SUCCESS) {
+ ICO_ERR("CicoSCWlWinMgrIF::setPositionsize ilm_surfaceSetSourceRectangle"
+ "(%08x,0,0,%d,%d) Error", surfaceid, width, height);
+ }
else if (ilm_commitChanges() != ILM_SUCCESS) {
ICO_ERR("CicoSCWlWinMgrIF::setPositionsize ilm_commitChanges() Error");
}
int32_t pid, const char *title)
{
struct creation_surface_wait *tp;
- struct creation_surface_wait *bp;
- uint32_t nowtime;
+ struct creation_surface_wait *tp2;
ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Enter(%d,<%s>)",
pid, title ? title : "(null)");
if (NULL == data) {
- ICO_WRN("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: data is null");
+ ICO_WRN("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Leave(data is null)");
+ return;
+ }
+ if (title == NULL) {
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Leave(no title)");
return;
}
// bind wl_surface to ivi_surface
- ivi_controller_get_native_handle(m_ivi_ctrl, pid, title ? title : "");
-
- // save pid and title(window name)
- nowtime = (time(NULL) >> 2) & 0x3fffffff;
- tp = m_wait_surface_creation;
- while (tp) {
- if ((tp->pid == pid) && (tp->title[0] == 0)) break;
- tp = tp->next;
+ tp = m_free_surface_creation;
+ if (tp) {
+ m_free_surface_creation = tp->next;
}
- if (! tp) {
- tp = m_free_surface_creation;
- if (tp) {
- m_free_surface_creation = tp->next;
- }
- else {
- tp = m_wait_surface_creation;
- bp = NULL;
- while (tp) {
- if (((nowtime >= tp->create_time)
- && ((nowtime - tp->create_time) > 15)) ||
- ((nowtime < tp->create_time)
- && ((nowtime + 0x40000000 - tp->create_time) > 15))) {
- if (bp) {
- bp->next = tp->next;
- }
- else {
- m_wait_surface_creation = tp->next;
- }
- break;
- }
- bp = tp;
- tp = tp->next;
- }
- if (! tp) {
- tp = (struct creation_surface_wait *)
- malloc(sizeof(struct creation_surface_wait));
- if (! tp) {
- ICO_ERR("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: out of memory");
- return;
- }
- }
+ else {
+ tp = (struct creation_surface_wait *)malloc(sizeof(struct creation_surface_wait));
+ if (! tp) {
+ ICO_ERR("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: out of memory");
+ return;
}
memset(tp, 0, sizeof(struct creation_surface_wait));
- tp->next = m_wait_surface_creation;
- m_wait_surface_creation = tp;
}
+ tp2 = m_wait_surface_creation;
+ tp->next = tp2;
+ m_wait_surface_creation = tp;
tp->pid = pid;
strncpy(tp->title, title, ICO_SYC_MAX_WINNAME_LEN-1);
- tp->create_time = nowtime;
-
- if (tp->id_surface) {
- static_cast<CicoSCWlWinMgrIF*>(data)->updateWinnameCB(tp->id_surface, tp->title);
+ tp->busy = SCWINMGR_GENIVI_BUSY_WAIT;
+ while (tp2) {
+ if (tp2->busy != SCWINMGR_GENIVI_BUSY_NONE) break;
+ tp2 = tp2->next;
+ }
+ if (! tp2) {
+ tp->busy = SCWINMGR_GENIVI_BUSY_REQSURF;
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: "
+ "call ivi_controller_get_native_handle(%d,<%s>)", pid, title);
+ ivi_controller_get_native_handle(m_ivi_ctrl, pid, title);
}
-
ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Leave");
}
int32_t object_id, int32_t object_type,
int32_t error_code, const char *error_text)
{
+ struct creation_surface_wait *tp;
+ struct creation_surface_wait *tp2;
+
ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: Enter(%d[%d],%d,<%s>)",
object_id, object_type, error_code, error_text ? error_text : "(null)");
ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: data is null");
return;
}
+
+ // search request wait
+ tp = m_wait_surface_creation;
+ tp2 = NULL;
+ while (tp) {
+ if (tp->busy == SCWINMGR_GENIVI_BUSY_WAIT) {
+ tp2 = tp;
+ }
+ else if (tp->busy != SCWINMGR_GENIVI_BUSY_NONE) {
+ tp->busy = SCWINMGR_GENIVI_BUSY_NONE;
+ }
+ tp = tp->next;
+ }
+ if (tp2 != NULL) {
+ tp2->busy = SCWINMGR_GENIVI_BUSY_REQSURF;
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: "
+ "call ivi_controller_get_native_handle(%d,<%s>)", tp2->pid, tp2->title);
+ ivi_controller_get_native_handle(m_ivi_ctrl, tp2->pid, tp2->title);
+ }
ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: Leave");
}
{
uint32_t id_surface;
struct creation_surface_wait *tp;
+ struct creation_surface_wait *tp2;
+ struct creation_surface_wait *bp;
- ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Enter(surface=%08x)", (int)surface);
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Enter(surf=%08x)", (int)surface);
if (NULL == data) {
- ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: data is null");
+ ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(data is null)");
return;
}
// check same surface
tp = m_wait_surface_creation;
+ bp = NULL;
while (tp) {
- if (tp->surface == surface) {
- ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(same surface)");
- return;
- }
+ if (tp->busy == SCWINMGR_GENIVI_BUSY_REQSURF) break;
+ bp = tp;
tp = tp->next;
}
-
- // create ivi-surface and bind to wl_surface
- m_id_surface ++;
- if (m_id_surface >= 0x00ffffff) m_id_surface = 1;
- id_surface = m_id_surface | 0x40000000;
-
- if (ivi_application_surface_create(m_ivi_app, id_surface, surface) == NULL) {
- ICO_ERR("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: "
- "ivi_application_surface_create(%x) Error", id_surface);
- if (m_wait_surface_creation) {
- tp = m_wait_surface_creation;
- m_wait_surface_creation = tp->next;
- tp->next = m_free_surface_creation;
- m_free_surface_creation = tp;
+ if (! tp) {
+ ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(no request)");
+ return;
+ }
+ if (tp->surface == surface) {
+ tp->busy = SCWINMGR_GENIVI_BUSY_NONE;
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: winname change(%08x,<%s>)",
+ tp->id_surface, tp->title);
+ id_surface = tp->id_surface;
+ static_cast<CicoSCWlWinMgrIF*>(data)->updateWinnameCB(id_surface, tp->title);
+
+ // title change, delete old table
+ tp2 = m_wait_surface_creation;
+ bp = NULL;
+ while (tp2) {
+ if (tp2 != tp) {
+ if (tp2->surface == surface) {
+ if (bp) {
+ bp->next = tp2->next;
+ }
+ else {
+ m_wait_surface_creation = tp2->next;
+ }
+ tp2->next = m_free_surface_creation;
+ m_free_surface_creation = tp2;
+ tp2 = m_wait_surface_creation;
+ bp = NULL;
+ continue;
+ }
+ }
+ bp = tp2;
+ tp2 = tp2->next;
}
}
else {
- tp = m_wait_surface_creation;
- while (tp) {
- if (tp->id_surface == 0) {
- tp->id_surface = id_surface;
- tp->surface = surface;
- break;
+ // create ivi-surface and bind to wl_surface
+ m_id_surface ++;
+ if (m_id_surface >= 0x00ffffff) m_id_surface = 1;
+ id_surface = m_id_surface | 0x40000000;
+
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: "
+ "call ivi_application_surface_create(%08x)", id_surface);
+ if (ivi_application_surface_create(m_ivi_app, id_surface, surface) == NULL) {
+ ICO_ERR("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: "
+ "ivi_application_surface_create(%08x) Error", id_surface);
+ if (bp) {
+ bp->next = tp->next;
}
- tp = tp->next;
+ else {
+ m_wait_surface_creation = tp->next;
+ }
+ tp->next = m_free_surface_creation;
+ m_free_surface_creation = tp;
}
- if (! tp) {
- ICO_ERR("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: waiting surface dose not exist");
+ else {
+ tp->surface = surface;
+ tp->id_surface = id_surface;
+ tp->busy = SCWINMGR_GENIVI_BUSY_REQBIND;
}
}
+
+ // search request wait
+ tp = m_wait_surface_creation;
+ tp2 = NULL;
+ while (tp) {
+ if (tp->busy == SCWINMGR_GENIVI_BUSY_WAIT) {
+ tp2 = tp;
+ }
+ else if (tp->busy != SCWINMGR_GENIVI_BUSY_NONE) {
+ break;
+ }
+ tp = tp->next;
+ }
+ if ((tp == NULL) && (tp2 != NULL)) {
+ tp2->busy = SCWINMGR_GENIVI_BUSY_REQSURF;
+ ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: "
+ "call ivi_controller_get_native_handle(%d,<%s>)", tp2->pid, tp2->title);
+ ivi_controller_get_native_handle(m_ivi_ctrl, tp2->pid, tp2->title);
+ }
ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(id_surface=%08x)", id_surface);
}
// vim:set expandtab ts=4 sw=4:
/*
- * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
int32_t pid;
uint32_t id_surface;
struct wl_surface *surface;
- uint32_t create_time;
+ int32_t busy;
char title[ICO_SYC_MAX_WINNAME_LEN];
};
+#define SCWINMGR_GENIVI_BUSY_NONE 0
+#define SCWINMGR_GENIVI_BUSY_REQSURF 1
+#define SCWINMGR_GENIVI_BUSY_REQBIND 2
+#define SCWINMGR_GENIVI_BUSY_WAIT 3
class CicoSCWlWinMgrIF : public CicoSCWaylandIF {
public:
return ICO_ERROR;
}
- ICO_TRA("CicoHSAppInfo::AddWindowInfo Enter(appid=%s surface=%d",
+ ICO_TRA("CicoHSAppInfo::AddWindowInfo Enter(appid=%s surface=%x",
wininfo->appid, wininfo->surface);
// if exist window information, update current window information
return ICO_ERROR;
}
- ICO_TRA("CicoHSAppInfo::AddWindowAttr Enter(appid=%s surface=%d",
+ ICO_TRA("CicoHSAppInfo::AddWindowAttr Enter(appid=%s surface=%x",
winattr->appid, winattr->surface);
// if exist window information, update current window information
ico_syc_win_info_t *wininfo)
{
ICO_TRA("CicoHSAppInfo::SetWindowInfo Enter"
- "(winifo=%p appid=%s winname=%s surface=%d)",
+ "(winifo=%p appid=%s winname=%s surface=%x)",
hs_wininfo,
wininfo->appid, wininfo->name, wininfo->surface);
{
ICO_TRA("CicoHSAppInfo::SetWindowAttr Enter"
"(winifo=%p "
- "appid=%s winname=%s zone=%s surface=%d nodeid=%d layer=%d "
+ "appid=%s winname=%s zone=%s surface=%x nodeid=%d layer=%d "
"x/y=%d/%d w/h=%d/%d raise=%d visible=%d active=%d)",
hs_wininfo,
winattr->appid, winattr->name, winattr->zone,
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <ico_window_mgr.h>
/*============================================================================*/
/* functions */
CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
{
Evas_Object *old_icon = icon;
- struct ico_uifw_image_buffer *pixelbuf = NULL;
int svx, svy;
int unmap;
int fd;
}
}
}
- if (pixelbuf != NULL) {
- // free shared memory pixel buffer
- pixelbuf->reftime = pixelbuf->settime;
- }
}
/*--------------------------------------------------------------------------*/
ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE, sWork);
}
}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSMenuTile::SetOrgThumbnail
+ * set thumbnail form org tile
+ *
+ * @param[in] info org tile
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSMenuTile::SetOrgThumbnail(CicoHSMenuTile *orgTile)
+{
+
+ ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Enter(appid=%08x<%s>) run=%d surf=%08x",
+ (int)this->appid, this->appid, app_running, orgTile->thumb.surface );
+
+ /* check surface of orgTile */
+ if ( orgTile == NULL || orgTile->thumb.surface == 0 ) {
+ return;
+ }
+
+ /* set surface */
+ this->ValidThumbnail( orgTile->thumb.surface );
+
+ /* set new thumbnail */
+ ico_syc_thumb_info_t info;
+
+ info.surface = orgTile->thumb.surface;
+ info.type = orgTile->thumb.type;
+ info.width = orgTile->thumb.width;
+ info.height = orgTile->thumb.height;
+ info.stride = orgTile->thumb.stride;
+ info.format = orgTile->thumb.format;
+
+ SetThumbnail( &info );
+
+ ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Leave(appid=%08x<%s>) run=%d surf=%08x",
+ (int)this->appid, this->appid, app_running, orgTile->thumb.surface );
+
+}
// vim: set expandtab ts=4 sw=4:
#include "ico_syc_common.h"
#include "ico_syc_winctl.h"
-#include "ico_window_mgr.h"
#include "CicoHomeScreenCommon.h"
void ValidThumbnail(int surface);
void SetThumbnail(ico_syc_thumb_info_t *info);
void ShowMenu(bool show);
+ void SetOrgThumbnail(CicoHSMenuTile *orgTile);
private:
char appid[ICO_HS_MAX_PROCESS_NAME];
{
ICO_TRA("CicoHSMenuWindow::RenewAppTiles Enter");
+ int cnt, cnt2;
int ret;
- /* free app tiles */
- FreeAppTiles();
+ /* backup old data */
+ int all_tile_num_org = all_tile_num;
+ CicoHSMenuTile *menu_tile_org[ICO_HS_MENU_MAX_TILE_NUM];
+ for (cnt=0; cnt < all_tile_num_org; cnt++) {
+ menu_tile_org[cnt]=menu_tile[cnt];
+ }
/* initialization */
InitAppTiles();
/* update app info list */
CicoHomeScreen::RenewAppInfoList();
+ /* set thumbnail from org */
+ for (cnt=0; cnt < all_tile_num; cnt++) {
+ if (menu_tile[cnt] == NULL) {
+ continue;
+ }
+ for (cnt2=0; cnt2 < all_tile_num_org; cnt2++) {
+ if (menu_tile_org[cnt2] == NULL) {
+ continue;
+ }
+ if (strncmp(menu_tile[cnt]->GetAppId(),
+ menu_tile_org[cnt2]->GetAppId(), ICO_HS_MAX_PROCESS_NAME) == 0) {
+ menu_tile[cnt]->SetOrgThumbnail( menu_tile_org[cnt2] );
+ break;
+ }
+ }
+ }
+
+ /* free org app tiles */
+ for (cnt2=0; cnt2 < all_tile_num_org; cnt2++) {
+ if (menu_tile_org[cnt2] == NULL) {
+ continue;
+ }
+ menu_tile_org[cnt2]->FreeObject();
+ delete menu_tile_org[cnt2];
+ }
+
ICO_TRA("CicoHSMenuWindow::RenewAppTiles Leave");
}
/* background object(transparent) */
background = evas_object_image_filled_add(evas);
+#if 0 /* TEST TEST: no need? */
+ evas_object_color_set(background, 0, 0, 0, 0);
+#endif
/* set mouse/touch callback */
evas_object_event_callback_add(background, EVAS_CALLBACK_MOUSE_DOWN,
CicoHSSwipeTouch::TouchUpSwipe, this);
evas_object_event_callback_add(background, EVAS_CALLBACK_MOUSE_MOVE,
CicoHSSwipeTouch::TouchMoveSwipe, this);
-
/* move and show window */
evas_object_move(background, 0, 0);
evas_object_resize(background, width, height);
move.width = width;
move.height = height;
memset(&show, 0, sizeof(show));
- show.time = ICO_SYC_WIN_SURF_RAISE;
+ show.name = (char *)"none";
+ /* set default animation */
+ ico_syc_set_animation(appid, surface, ICO_SYC_ANIMATION_TYPE_ALL, &show);
/* move swipe input window to TouchLayer */
ico_syc_change_layer(appid, surface, HS_LAYER_TOUCHPANEL);
/* move window position and size */
ico_syc_move(appid, surface, &move, NULL);
/* show and raise window */
+ show.time = ICO_SYC_WIN_SURF_RAISE;
ico_syc_show(appid, surface, &show);
/* show touch layer */
#include "CicoHSControlBarWindow.h"
#include "CicoHSAppHistoryExt.h"
-#define ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH 60
-#define ICO_HS_SWIPE_TOUCH_SWIPE_HEIGHT 60
-#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY 100
+#define ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH 80
+#define ICO_HS_SWIPE_TOUCH_SWIPE_HEIGHT 80
+#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY1 80
+#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY2 100
#define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_DISTANCE 80
#define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_MOVE_Y 80
#define ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.0d
EINA_LOG_CRIT("CicoHSWindow::Initialize: could not create new_window.");
return ICO_ERROR;
}
- strncpy(this->title,title,ICO_MAX_TITLE_NAME_LEN);
- ecore_evas_title_set(window,this->title);
+ strncpy(this->title, title, ICO_MAX_TITLE_NAME_LEN);
+ ecore_evas_title_set(window, this->title);
/* alpha channel is enable*/
ecore_evas_alpha_set(window, alpha);
CicoHomeScreen::requestChangeZone(CicoHSAppInfo* appinfo)
{
int surface = appinfo->GetLastSurface();
- ICO_TRA("Enter appid=%s, lastsurface=%d", appinfo->GetAppId(), surface);
+ ICO_TRA("Enter appid=%s, lastsurface=%x", appinfo->GetAppId(), surface);
ico_hs_window_info* wininfo = appinfo->GetWindowInfobySurface(surface);
if (NULL == wininfo) {
ICO_TRA("Leave(not found wininfo)");
swipe_input_windows[0] = new CicoHSSwipeInputWindow();
swipe_input_windows[0]->
CreateSwipeInputWindow(ICO_HS_WINDOW_POS_X,
- full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
+ full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY1,
ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
- full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2),
+ full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY2*2),
"left");
swipe_input_windows[0]->ShowWindow();
swipe_input_windows[1] = new CicoHSSwipeInputWindow();
swipe_input_windows[1]->
CreateSwipeInputWindow(full_width - ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
- full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
+ full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY1,
ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
- full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2),
+ full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY2*2),
"right");
swipe_input_windows[1]->ShowWindow();
int
CicoHomeScreen::StartHomeScreen(int orientation)
{
+ int retry;
+
ICO_TRA("CicoHomeScreen::StartHomeScreen Enter");
/*save instance pointer */
ICO_DBG("CicoHomeScreen::StartHomeScreen: start connect to systemcontroller");
ico_syc_connect(EventCallBack,NULL);
+ for (retry = 0; retry < (2000/10); retry++) {
+ ico_syc_service();
+ if (ico_syc_isconnect()) break;
+ usleep(10*1000);
+ }
ICO_DBG("CicoHomeScreen::StartHomeScreen: end connect to systemcontroller");
/*initialize system controller*/
//--------------------------------------------------------------------------
CicoOSPopWindow::~CicoOSPopWindow(void)
{
-// ICO_TRA("Enter");
+ ICO_TRA("Enter sur:%d, priv_id:%d", m_resourceId, GetPrivId());
if (NULL != m_window) {
ecore_evas_free(m_window);
m_window = NULL;
ICO_DBG("_____ %d = ico_syc_release_res", r);
}
-// ICO_TRA("Leave");
+ ICO_TRA("Leave");
}
//--------------------------------------------------------------------------
CicoOSPopWindow::InitializeWindow(void)
{
ICO_TRA("Enter");
- // Window setup
- m_window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, "frame=0");
- if (NULL == m_window) {
- ICO_ERR("ecore_evas_new() error");
+ if (false == createMainWindow()) {
ICO_TRA("Leave(ERR)");
return false;
}
- ecore_evas_show(m_window);
m_theme = edje_object_add(ecore_evas_get(m_window));
if (NULL == m_theme) {
ICO_ERR("could not create edje object!");
return true;
}
+bool
+CicoOSPopWindow::createMainWindow()
+{
+ ICO_TRA("Enter");
+ // Window setup
+ m_window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, "frame=0");
+ if (NULL == m_window) {
+ ICO_ERR("ecore_evas_new() error");
+ ICO_TRA("Leave(ERR)");
+ return false;
+ }
+ ecore_evas_show(m_window);
+ ICO_TRA("Leave");
+ return true;
+}
+
//--------------------------------------------------------------------------
/**
* @brief callback function of evas mouse up event
const CicoNotification& getNotif() const {
return (const CicoNotification&)*this;
}
+ bool createMainWindow();
private:
bool InitializeWindow(void);
static void evasMouseUpCB(void *data, Evas *e, Evas_Object *obj,
if (NULL == m_reserve) {
m_reserve = new CicoOSPopWindow(NOTIFICATION_TYPE_NONE);
+ m_reserve->createMainWindow();
}
// set notification callback function
*/
/*--------------------------------------------------------------------------*/
CicoStatusBarClockComponent::CicoStatusBarClockComponent()
- : rate_(1.0)
+ : rate_(1.0)
{
}
PackModule(min1_module);
SetPos(posx, posy);
- SetSize(AMPM_WIDTH + HOUR10_WIDTH + HOUR1_WIDTH + COLON_WIDTH +
+ SetSize(AMPM_WIDTH + HOUR10_WIDTH + HOUR1_WIDTH + COLON_WIDTH +
MIN10_WIDTH + MIN1_WIDTH,
AMPM_HEIGHT);
SetRate(1.5);
time_t nowtime;
nowtime = std::time(NULL);
- // Add 9 hour because std::time is JST.
- nowtime += 9 * 60 * 60;
- time_t sec = nowtime % 60;
- nowtime -= sec;
- time_t min = (nowtime % (60 * 60)) / 60;
- nowtime -= min * 60;
- time_t hour = (nowtime % (60 * 60 * 60)) / (60 * 60);
+ std::tm *tm = std::localtime(&nowtime);
+ int min = tm->tm_min;
+ int hour = tm->tm_hour;
std::shared_ptr<CicoImageModule> imagemodule;
assert(!modulelist_.empty());
else {
if (!imagemodule->SetFilePath(imgfilepath_am)) {
ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
- return false;
+ return false;
}
}
imagemodule->SetSize(rate_ * AMPM_WIDTH, rate_ * AMPM_HEIGHT);
return false;
}
imagemodule->SetSize(rate_ * HOUR10_WIDTH, rate_ * HOUR10_HEIGHT);
- imagemodule->SetPos(posx_ + rate_ * RELATIVE_HOUR10_POSX,
+ imagemodule->SetPos(posx_ + rate_ * RELATIVE_HOUR10_POSX,
posy_ + rate_ * RELATIVE_HOUR10_POSY);
imagemodule->Show();
/*--------------------------------------------------------------------------*/
/**
- * @brief set rate of clock component
+ * @brief set rate of clock component
*
* @param[in] rate
* @return true: success false: failed
* @brief default constructor
*
* @param[in] none
- * @return none
+ * @return none
*/
/*--------------------------------------------------------------------------*/
CicoNotificationPanelComponent::CicoNotificationPanelComponent()