2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 //==========================================================================
12 * @file CicoSCWindowController.cpp
16 //==========================================================================
24 #include <sys/ioctl.h>
30 #include "CicoSCWindow.h"
31 #include "CicoSCWayland.h"
32 #include "CicoSCWindowController.h"
35 #include "CicoSCSystemConfig.h"
36 #include "CicoSCConf.h"
37 #include "CicoSCDisplay.h"
38 #include "CicoSCLayer.h"
39 #include "CicoSCDisplayZone.h"
40 #include "ico_syc_error.h"
41 #include "CicoSCCommandParser.h"
42 #include "ico_syc_msg_cmd_def.h"
43 #include "CicoSCServer.h"
44 #include "CicoSCMessage.h"
45 #include "CicoSCLifeCycleController.h"
46 #include "CicoSCResourceManager.h"
48 //--------------------------------------------------------------------------
50 * @brief default constructor
52 //--------------------------------------------------------------------------
53 CicoSCWindowController::CicoSCWindowController()
56 CicoSCWayland* wayland = CicoSCWayland::getInstance();
57 wayland->getInstance()->addWaylandIF(ICO_WL_WIN_MGR_IF, this);
58 wayland->getInstance()->addWaylandIF(ICO_WL_OUTPUT_IF, this);
59 wayland->getInstance()->addWaylandIF(ICO_WL_SHM_IF, this);
63 //--------------------------------------------------------------------------
67 //--------------------------------------------------------------------------
68 CicoSCWindowController::~CicoSCWindowController()
72 //--------------------------------------------------------------------------
74 * @brief initialize display and window database
76 //--------------------------------------------------------------------------
78 CicoSCWindowController::initDB(void)
80 ICO_DBG("CicoSCWindowController::initDB: Enter");
82 const vector<CicoSCDisplayConf*>& displayList =
83 CicoSCSystemConfig::getInstance()->getDisplayConfList();
84 vector<CicoSCDisplayConf*>::const_iterator itr;
85 itr = displayList.begin();
86 for (; itr != displayList.end(); ++itr) {
87 const CicoSCDisplayConf *dconf = const_cast<CicoSCDisplayConf*>(*itr);
88 CicoSCDisplay *display = new CicoSCDisplay();
90 display->displayid = dconf->id;
91 display->type = dconf->type;
92 display->nodeid = dconf->node;
93 display->displayno = dconf->no;
94 display->width = dconf->width;
95 display->height = dconf->height;
96 display->inch = dconf->inch;
97 display->name = dconf->name;
99 vector<CicoSCLayerConf*>::const_iterator itr2;
100 itr2 = dconf->layerConfList.begin();
101 for (; itr2 != dconf->layerConfList.end(); ++itr2) {
102 const CicoSCLayerConf *lconf = const_cast<CicoSCLayerConf*>(*itr2);
104 CicoSCLayer *layer = new CicoSCLayer();
105 layer->layerid = lconf->id;
106 layer->type = lconf->type;
107 layer->width = display->width;
108 layer->height = display->height;
109 layer->displayid = display->displayid;
110 layer->menuoverlap = lconf->menuoverlap;
111 display->layerList.push_back(layer);
114 vector<CicoSCDisplayZoneConf*>::const_iterator itr3;
115 itr3 = dconf->zoneConfList.begin();
116 for (; itr3 != dconf->zoneConfList.end(); ++itr3) {
117 // const CicoSCDisplayZoneConf *dzconf = const_cast<CicoSCLayerConf*>(*itr2);
119 CicoSCDisplayZone *zone = new CicoSCDisplayZone();
120 zone->zoneid = (*itr3)->id;
121 zone->x = (*itr3)->x;
122 zone->y = (*itr3)->y;
123 zone->width = (*itr3)->w;
124 zone->height = (*itr3)->h;
125 display->zoneList.push_back(zone);
128 m_displayList.push_back(display);
131 m_displayList.push_back(display);
134 ICO_DBG("CicoSCWindowController::initDB: Leave");
138 //--------------------------------------------------------------------------
140 * @brief set resource manager instance
142 * @param [in] resMgr resource manager instance
144 //--------------------------------------------------------------------------
146 CicoSCWindowController::setResourceManager(CicoSCResourceManager *resMgr)
151 //--------------------------------------------------------------------------
153 * @brief show a target window
155 * @param [in] surfaceid wayland surface id
156 * @param [in] animation animation name
157 * @param [in] animationTime animation time
159 * @return ICO_SYC_EOK on success, other on error
160 * @retval ICO_SYC_EOK success
161 * @retval ICO_SYC_ESRCH error(not initialized)
162 * @retval ICO_SYC_ENOENT error(not exist)
164 //--------------------------------------------------------------------------
166 CicoSCWindowController::show(int surfaceid,
167 const char *animation,
170 ICO_DBG("CicoSCWindowController::show Enter"
171 "(surfaceid=%08X animation=%s animationTime=%d)",
172 surfaceid, animation, animationTime);
174 // find window infomation in window list
175 CicoSCWindow *window = findWindow(surfaceid);
176 if (NULL == window) {
177 ICO_WRN("CicoSCWindowController::show Leave(ENOENT)");
178 return ICO_SYC_ENOENT;
181 // update visible attr
182 window->visible = true;
184 // set animation request to Multi Window Manager
185 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
186 int raiseFlag = ICO_WINDOW_MGR_RAISE_RAISE;
187 if ((NULL != animation) && (animation[0] != '\0')) {
188 ICO_DBG("ico_window_mgr_set_animation"
189 "(surface=0x%08X type=%d anima=%s time=%d)",
191 ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW,
192 animation, animationTime);
193 ico_window_mgr_set_animation(m_winmgr,
195 ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW,
198 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
199 raiseFlag = ICO_WINDOW_MGR_V_NOCHANGE;
202 // show request to Multi Window Manager
203 ICO_DBG("ico_window_mgr_set_visible called."
204 "(surfaceid=0x%08X visible=%d raise=%d anima=%d",
205 window->surfaceid, ICO_WINDOW_MGR_VISIBLE_SHOW,
206 raiseFlag, animaFlag);
207 ico_window_mgr_set_visible(m_winmgr,
209 ICO_WINDOW_MGR_VISIBLE_SHOW,
214 CicoSCWayland::getInstance()->flushDisplay();
216 ICO_DBG("CicoSCWindowController::show Leave(EOK)");
220 //--------------------------------------------------------------------------
222 * @brief hide a target window
224 * @param [in] surfaceid wayland surface id
225 * @param [in] animation animation name
226 * @param [in] animationTime animation time
228 * @return ICO_SYC_EOK on success, other on error
229 * @retval ICO_SYC_EOK success
230 * @retval ICO_SYC_ESRCH error(not initialized)
231 * @retval ICO_SYC_ENOENT error(not exist)
233 //--------------------------------------------------------------------------
235 CicoSCWindowController::hide(int surfaceid,
236 const char *animation,
239 ICO_DBG("CicoSCWindowController::hide Enter"
240 "(surfaceid=%08X animation=%s animationTime=%d)",
241 surfaceid, animation, animationTime);
243 // find window infomation in window list
244 CicoSCWindow *window = findWindow(surfaceid);
245 if (NULL == window) {
246 ICO_WRN("CicoSCWindowController::hide Leave(ENOENT)");
247 return ICO_SYC_ENOENT;
250 // update window attr
251 window->visible = false;
253 // set animation request to Multi Window Manager
254 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
255 if ((NULL != animation) && (animation[0] != '\0')) {
256 ico_window_mgr_set_animation(m_winmgr,
258 ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE,
261 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
264 // show request to Multi Window Manager
265 ico_window_mgr_set_visible(m_winmgr,
267 ICO_WINDOW_MGR_VISIBLE_HIDE,
268 ICO_WINDOW_MGR_V_NOCHANGE,
272 CicoSCWayland::getInstance()->flushDisplay();
274 ICO_DBG("CicoSCWindowController::hide Leave(EOK)");
278 //--------------------------------------------------------------------------
280 * @brief resize window(surface) size
282 * @param [in] surfaceid wayland surface id
283 * @param [in] w window width
284 * @param [in] h window height
285 * @param [in] animation animation name
286 * @param [in] animationTime animation time
288 * @return ICO_SYC_EOK on success, other on error
289 * @retval ICO_SYC_EOK success
290 * @retval ICO_SYC_ESRCH error(not initialized)
291 * @retval ICO_SYC_ENOENT error(window dose not exist)
293 //--------------------------------------------------------------------------
295 CicoSCWindowController::resize(int surfaceid,
298 const char *animation,
301 ICO_DBG("CicoSCWindowController::resize Enter"
302 "(surfaceid=%08X h=%d w=%d animation=%s animationTime=%d)",
303 surfaceid, w, h, animation, animationTime);
305 // find window infomation in window list
306 CicoSCWindow *window = findWindow(surfaceid);
307 if (NULL == window) {
308 ICO_WRN("CicoSCWindowController::resize Leave(ENOENT)");
309 return ICO_SYC_ENOENT;
312 // set animation request to Multi Window Manager
313 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
314 if ((NULL != animation) && (animation[0] != '\0')) {
315 ico_window_mgr_set_animation(m_winmgr,
317 ICO_WINDOW_MGR_ANIMATION_TYPE_RESIZE,
320 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
323 // set visible request to Multi Window Manager
324 ico_window_mgr_set_positionsize(m_winmgr,
326 0, //ICO_WINDOW_MGR_V_NOCHANGE,
327 ICO_WINDOW_MGR_V_NOCHANGE,
328 ICO_WINDOW_MGR_V_NOCHANGE,
334 CicoSCWayland::getInstance()->flushDisplay();
336 ICO_DBG("CicoSCWindowController::resize Leave(EOK)");
340 //--------------------------------------------------------------------------
342 * @brief move window(surface) size
344 * @param [in] surfaceid wayland surface id
345 * @param [in] nodeid node id
346 * @param [in] x window width
347 * @param [in] y window height
348 * @param [in] animation animation name
349 * @param [in] animationTime animation time
351 * @return ICO_SYC_EOK on success, other on error
352 * @retval ICO_SYC_EOK success
353 * @retval ICO_SYC_ESRCH error(not initialized)
354 * @retval ICO_SYC_ENOENT error(window dose not exist)
356 //--------------------------------------------------------------------------
358 CicoSCWindowController::move(int surfaceid,
362 const char *animation,
365 ICO_DBG("CicoSCWindowController::move Enter"
366 "(surfaceid=%08X nodeid=%d x=%d y=%d "
367 "animation=%s animationTime=%d)",
368 surfaceid, nodeid, x, y, animation, animationTime);
370 // find window infomation in window list
371 CicoSCWindow *window = findWindow(surfaceid);
372 if (NULL == window) {
373 ICO_WRN("CicoSCWindowController::move Leave(ENOENT)");
374 return ICO_SYC_ENOENT;
377 // set animation request to Multi Window Manager
378 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
379 if ((NULL != animation) && (animation[0] != '\0')) {
380 ico_window_mgr_set_animation(m_winmgr,
382 ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE,
385 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
388 int moveNodeId = ICO_WINDOW_MGR_V_NOCHANGE;
393 // set visible request to Multi Window Manager
394 ico_window_mgr_set_positionsize(m_winmgr,
399 ICO_WINDOW_MGR_V_NOCHANGE,
400 ICO_WINDOW_MGR_V_NOCHANGE,
404 CicoSCWayland::getInstance()->flushDisplay();
406 ICO_DBG("CicoSCWindowController::move Leave(EOK)");
410 //--------------------------------------------------------------------------
412 * @brief raise window(surface)
414 * @param [in] surfaceid wayland surface id
415 * @param [in] animation animation name
416 * @param [in] animationTime animation time
418 * @return ICO_SYC_EOK on success, other on error
419 * @retval ICO_SYC_EOK success
420 * @retval ICO_SYC_ESRCH error(not initialized)
421 * @retval ICO_SYC_ENOENT error(layer dose not exist)
423 //--------------------------------------------------------------------------
425 CicoSCWindowController::raise(int surfaceid,
426 const char *animation,
429 ICO_DBG("CicoSCWindowController::raise Enter"
430 "(surfaceid=%08X animation=%s animationTime=%d)",
431 surfaceid, animation, animationTime);
433 // find window infomation in window list
434 CicoSCWindow *window = findWindow(surfaceid);
435 if (NULL == window) {
436 ICO_WRN("CicoSCWindowController::raise Leave(ENOENT)");
437 return ICO_SYC_ENOENT;
440 // update visible attr
441 window->raise = true;
443 // set animation request to Multi Window Manager
444 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
445 if ((NULL != animation) && (animation[0] != '\0')) {
446 ico_window_mgr_set_animation(m_winmgr,
448 ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW,
451 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
454 // set visible request to Multi Window Manager
455 ico_window_mgr_set_visible(m_winmgr,
457 ICO_WINDOW_MGR_V_NOCHANGE,
458 ICO_WINDOW_MGR_RAISE_RAISE,
462 CicoSCWayland::getInstance()->flushDisplay();
464 ICO_DBG("CicoSCWindowController::raise Leave(EOK)");
468 //--------------------------------------------------------------------------
470 * @brief set window(surface) geometry
472 * @param [in] surfaceid wayland surface id
473 * @param [in] nodeid node id
474 * @param [in] x window x position
475 * @param [in] y window y position
476 * @param [in] w window width
477 * @param [in] h window height
478 * @param [in] resizeAnimation resize animation name
479 * @param [in] resizeAnimationTime resize animation time
480 * @param [in] moveAnimation move animation name
481 * @param [in] moveanimationTime move animation time
483 * @return ICO_SYC_EOK on success, other on error
484 * @retval ICO_SYC_EOK success
485 * @retval ICO_SYC_ESRCH error(not initialized)
486 * @retval ICO_SYC_ENOENT error(window dose not exist)
488 //--------------------------------------------------------------------------
490 CicoSCWindowController::setGeometry(int surfaceid,
496 const char *resizeAnimation,
497 int resizeAnimationTime,
498 const char *moveAnimation,
499 int moveAnimationTime)
501 ICO_DBG("CicoSCWindowController::setGeometry Enter"
502 "(surfaceid=0x%08X nodeid=%d x=%d y=%d w=%d h=%d "
503 "resizeAnimation=%s resizeAnimationTime=%d "
504 "moveAnimation=%s moveAnimationTime=%d)",
505 surfaceid, nodeid, x, y, w, h,
506 resizeAnimation, resizeAnimationTime,
507 moveAnimation, moveAnimationTime);
509 // find window infomation in window list
510 CicoSCWindow *window = findWindow(surfaceid);
511 if (NULL == window) {
512 ICO_WRN("CicoSCWindowController::setGeometry Leave(ENOENT)");
513 return ICO_SYC_ENOENT;
516 // set animation request to Multi Window Manager
517 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
518 if (NULL != resizeAnimation) {
519 ico_window_mgr_set_animation(m_winmgr,
521 ICO_WINDOW_MGR_ANIMATION_TYPE_RESIZE,
523 resizeAnimationTime);
524 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
527 if (NULL != moveAnimation) {
528 ico_window_mgr_set_animation(m_winmgr,
530 ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE,
533 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
536 int moveNodeId = ICO_WINDOW_MGR_V_NOCHANGE;
541 moveNodeId = window->nodeid;
544 // set visible request to Multi Window Manager
545 ICO_DBG("ico_window_mgr_set_positionsize"
546 "(surfaceid=0x%08X nodeid=%d x=%d y=%d w=%d h=%d anima=%d)",
547 window->surfaceid, moveNodeId, x, y, w, h, animaFlag);
548 ico_window_mgr_set_positionsize(m_winmgr,
558 CicoSCWayland::getInstance()->flushDisplay();
560 ICO_DBG("CicoSCWindowController::setGeometry Leave(EOK)");
565 //--------------------------------------------------------------------------
567 * @brief lower window(surface)
569 * @param [in] surfaceid wayland surface id
570 * @param [in] animation animation name
571 * @param [in] animationTime animation time
573 * @return ICO_SYC_EOK on success, other on error
574 * @retval ICO_SYC_EOK success
575 * @retval ICO_SYC_ESRCH error(not initialized)
576 * @retval ICO_SYC_ENOENT error(layer dose not exist)
578 //--------------------------------------------------------------------------
580 CicoSCWindowController::lower(int surfaceid,
581 const char *animation,
584 ICO_DBG("CicoSCWindowController::lower Enter"
585 "(surfaceid=%08X animation=%s animationTime=%d)",
586 surfaceid, animation, animationTime);
588 // find window infomation in window list
589 CicoSCWindow *window = findWindow(surfaceid);
590 if (NULL == window) {
591 ICO_WRN("CicoSCWindowController::lower Leave(ENOENT)");
592 return ICO_SYC_ENOENT;
595 // update visible attr
596 window->raise = false;
598 // set animation request to Multi Window Manager
599 int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
600 if ((NULL != animation) && (animation[0] != '\0')) {
601 ico_window_mgr_set_animation(m_winmgr,
603 ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE,
606 animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
609 // set visible request to Multi Window Manager
610 ico_window_mgr_set_visible(m_winmgr,
612 ICO_WINDOW_MGR_V_NOCHANGE,
613 ICO_WINDOW_MGR_RAISE_LOWER,
617 CicoSCWayland::getInstance()->flushDisplay();
619 ICO_DBG("CicoSCWindowController::lower Leave(EOK)");
623 //--------------------------------------------------------------------------
625 * @brief set window layer
627 * @param [in] surfaceid wayland surface id
628 * @param [in] layer layer id
630 * @return ICO_SYC_EOK on success, other on error
631 * @retval ICO_SYC_EOK success
632 * @retval ICO_SYC_ESRCH error(not initialized)
633 * @retval ICO_SYC_ENOENT error(window or layer dose not exist)
635 //--------------------------------------------------------------------------
637 CicoSCWindowController::setWindowLayer(int surfaceid, int layerid)
639 ICO_DBG("CicoSCWindowController::setWindowLayer Enter"
640 "(surfaceid=%08X layerid=%d)", surfaceid, layerid);
642 // find window infomation in window list
643 CicoSCWindow *window = findWindow(surfaceid);
644 if (NULL == window) {
645 ICO_WRN("CicoSCWindowController::setWindowLayer Leave(ENOENT)");
646 return ICO_SYC_ENOENT;
649 // find layer infomation in layer list
650 CicoSCLayer* layer = findLayer(window->displayid, layerid);
652 ICO_WRN("CicoSCWindowController::setWindowLayer Leave(ENOENT)");
653 return ICO_SYC_ENOENT;
656 // update window attr
657 window->layerid = layerid;
659 // set window layer request to Multi Window Manager
660 ICO_DBG("ico_window_mgr_set_window_layer called."
661 "surfaceid=0x%08X layerid=%d",
662 window->surfaceid, window->layerid);
663 ico_window_mgr_set_window_layer(m_winmgr,
668 CicoSCWayland::getInstance()->flushDisplay();
670 ICO_DBG("CicoSCWindowController::setWindowLayer Leave(EOK)");
674 //--------------------------------------------------------------------------
678 * @param [in] displayid display id
679 * @param [in] layerid layer id
681 * @return ICO_SYC_EOK on success, other on error
682 * @retval ICO_SYC_EOK success
683 * @retval ICO_SYC_ESRCH error(not initialized)
684 * @retval ICO_SYC_ENOENT error(layer dose not exist)
686 //--------------------------------------------------------------------------
688 CicoSCWindowController::showLayer(int displayid, int layerid)
690 ICO_DBG("CicoSCWindowController::showLayer Enter"
691 "displayid=%d layerid=%d)", displayid, layerid);
693 // find layer infomation in layer list
694 CicoSCLayer* layer = findLayer(displayid, layerid);
696 ICO_WRN("CicoSCWindowController::showLayer Leave(ENOENT)");
697 return ICO_SYC_ENOENT;
700 setLayerVisible(layerid, ICO_WINDOW_MGR_VISIBLE_SHOW);
703 CicoSCWayland::getInstance()->flushDisplay();
705 ICO_DBG("CicoSCWindowController::showLayer Leave(EOK)");
709 //--------------------------------------------------------------------------
713 * @param [in] displayid display id
714 * @param [in] layerid layer id
716 * @return ICO_SYC_EOK on success, other on error
717 * @retval ICO_SYC_EOK success
718 * @retval ICO_SYC_ESRCH error(not initialized)
719 * @retval ICO_SYC_ENOENT error(layer dose not exist)
721 //--------------------------------------------------------------------------
723 CicoSCWindowController::hideLayer(int displayid, int layerid)
725 ICO_DBG("CicoSCWindowController::hideLayer Enter"
726 "displayid=%d layerid=%d)",
729 // find layer infomation in layer list
730 CicoSCLayer* layer = findLayer(displayid, layerid);
732 ICO_WRN("CicoSCWindowController::hideLayer Leave(ENOENT)");
733 return ICO_SYC_ENOENT;
736 setLayerVisible(layerid, ICO_WINDOW_MGR_VISIBLE_HIDE);
739 CicoSCWayland::getInstance()->flushDisplay();
741 ICO_DBG("CicoSCWindowController::hideVisible Leave(EOK)");
745 //--------------------------------------------------------------------------
747 * @brief control layer visibility
749 * @param [in] layerid layer id
750 * @param [in] visible layer show
751 * ICO_WINDOW_MGR_VISIBLE_SHOW
752 * ICO_WINDOW_MGR_VISIBLE_HIDE
754 //--------------------------------------------------------------------------
756 CicoSCWindowController::setLayerVisible(int layerid, int visible)
758 // set layer visible request to Multi Window Manager
759 ICO_DBG("ico_window_mgr_set_layer_visible(%d,%d) called.",
761 ico_window_mgr_set_layer_visible(m_winmgr, layerid, visible);
764 //--------------------------------------------------------------------------
766 * @brief active window(surface)
768 * @param [in] surfaceid wayland surface id
769 * @param [in] target target(pointer and/or keyboard)
771 * @return ICO_SYC_EOK on success, other on error
772 * @retval ICO_SYC_EOK success
773 * @retval ICO_SYC_ESRCH error(not initialized)
774 * @retval ICO_SYC_ENOENT error(layer dose not exist)
776 //--------------------------------------------------------------------------
778 CicoSCWindowController::active(int surfaceid, int target)
781 Ico_Uxf_Mng_Window *winmng;
782 Ico_Uxf_Mng_Process *proc;
783 Ico_Uxf_Mng_Process *aproc;
787 ICO_DBG("CicoSCWindowController::active Enter"
788 "(surfaceid=%08X, target=%08X)", surfaceid, target);
790 // find window infomation in window list
791 CicoSCWindow *window = findWindow(surfaceid);
792 if (NULL == window) {
793 ICO_WRN("CicoSCWindowController::active Leave(ENOENT)");
794 return ICO_SYC_ENOENT;
798 target = ICO_WINDOW_MGR_ACTIVE_POINTER |
799 ICO_WINDOW_MGR_ACTIVE_KEYBOARD |
800 ICO_WINDOW_MGR_ACTIVE_SELECTED;
803 ICO_DBG("ico_window_mgr_set_active(0x%08X, %d) called.",
805 // set active request to Multi Window Manager
806 ico_window_mgr_set_active(m_winmgr, window->surfaceid, target);
809 CicoSCWayland::getInstance()->flushDisplay();
811 // update active window
812 map<unsigned int, CicoSCWindow*>::iterator itr;
813 itr = m_windowList.begin();
814 for (; itr != m_windowList.end(); ++itr) {
815 CicoSCWindow* window = itr->second;
816 if (window->surfaceid == surfaceid) {
817 window->active = target;
824 window->active &= ~target;
829 // TODO update active application
831 /* reset all active application without this application */
833 for (hash = 0; hash < ICO_UXF_MISC_HASHSIZE; hash++) {
834 proc = gIco_Uxf_Api_Mng.Hash_ProcessId[hash];
836 if (proc->attr.mainwin.window == window) {
841 proc->attr.active = 0;
844 proc->attr.active &= ~target;
847 proc = proc->nextidhash;
850 aproc->attr.active = target;
853 ICO_DBG("CicoSCWindowController::active Leave(EOK)");
857 //--------------------------------------------------------------------------
861 * @param [in] surfaceid wayland surface id
863 * @return ICO_SYC_EOK on success, other on error
864 * @retval ICO_SYC_EOK success
865 * @retval ICO_SYC_ESRCH error(not initialized)
866 * @retval ICO_SYC_ENOENT error(layer dose not exist)
868 //--------------------------------------------------------------------------
870 CicoSCWindowController::mapSurface(int surfaceid, int framerate)
872 ICO_WRN("CicoSCWindowController::mapSurface Enter");
874 // find window infomation in window list
875 CicoSCWindow *window = findWindow(surfaceid);
876 if (NULL == window) {
877 ICO_WRN("CicoSCWindowController::mapSurface Leave(ENOENT)");
878 return ICO_SYC_ENOENT;
881 if (framerate <= 0) {
885 ICO_DBG("ico_window_mgr_map_surface(%d, %d) called.",
886 surfaceid, framerate);
887 ico_window_mgr_map_surface(m_winmgr, surfaceid, framerate);
888 ICO_DBG("CicoSCWindowController::mapSurface Leave(EOK)");
892 //--------------------------------------------------------------------------
894 * @brief unmap surface
896 * @param [in] surfaceid wayland surface id
898 * @return ICO_SYC_EOK on success, other on error
899 * @retval ICO_SYC_EOK success
900 * @retval ICO_SYC_ESRCH error(not initialized)
901 * @retval ICO_SYC_ENOENT error(layer dose not exist)
903 //--------------------------------------------------------------------------
905 CicoSCWindowController::unmapSurface(int surfaceid)
907 ICO_DBG("CicoSCWindowController::unmapSurface Enter");
909 // find window infomation in window list
910 CicoSCWindow *window = findWindow(surfaceid);
911 if (NULL == window) {
912 ICO_WRN("CicoSCWindowController::unmapSurface Leave(ENOENT)");
913 return ICO_SYC_ENOENT;
916 ICO_DBG("ico_window_mgr_unmap_surface(%d) called.", surfaceid);
917 ico_window_mgr_unmap_surface(m_winmgr, surfaceid);
919 ICO_DBG("CicoSCWindowController::unmapSurface Leave(EOK)");
923 //--------------------------------------------------------------------------
925 * @brief wayland surface create callback
927 * @param [in] data user data(unused)
928 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
929 * @param [in] surfaceid ico_window_mgr surface Id
930 * @param [in] winname surface window name(title)
931 * @param [in] pid wayland client process Id
932 * @param [in] appid wayland client application Id
934 //--------------------------------------------------------------------------
936 CicoSCWindowController::createdCB(void *data,
937 struct ico_window_mgr *ico_window_mgr,
943 ICO_DBG("CicoSCWindowController::createdCB Enter"
944 "(surfaceid=%08X winname=%s pid=%d appid=%s)",
945 surfaceid, winname, pid, appid);
947 CicoSCWindow* window = new CicoSCWindow();
949 window->surfaceid = surfaceid;
950 window->name = winname;
951 window->appid = appid;
953 window->displayid = ICO_SURFACEID_2_NODEID(surfaceid);
955 CicoSCLifeCycleController* appctrl;
956 appctrl = CicoSCLifeCycleController::getInstance();
957 const CicoSCAilItems *ailItem = appctrl->findAIL(appid);
958 if (NULL == ailItem) {
959 const CicoSCAulItems* aulitem = appctrl->findAUL(pid);
960 if (NULL != aulitem) {
961 window->appid = aulitem->m_appid;
962 ICO_DBG("appid=%s", window->appid.c_str());
963 ailItem = appctrl->findAIL(window->appid.c_str());
966 ICO_DBG("aulitem not found.");
971 if (NULL != ailItem) {
972 window->layerid = ailItem->m_layer;
973 window->zoneid = ailItem->m_displayZone;
974 window->nodeid = ailItem->m_nodeID;
975 if ((window->displayid >= 0) && (window->zoneid >= 0)) {
976 // TODO at errer try catch
977 CicoSCDisplay* display = m_displayList.at(window->displayid);
978 CicoSCDisplayZone *zone = display->zoneList.at(window->zoneid);
981 window->width = zone->width;
982 window->height = zone->height;
985 //fullZoneName = display->name + "." + zone->name;
986 fullZoneName = "Center.Full";
990 ICO_WRN("ail item not found.");
991 ICO_WRN("CicoSCWindowController::createdCB Leave(ENOENT)");
995 appctrl->enterAUL(appid, pid, window);
997 // dump log window infomartion
1000 m_windowList[surfaceid] = window;
1003 CicoSCMessage *message = new CicoSCMessage();
1004 message->addRootObject("command", MSG_CMD_CREATE);
1005 message->addRootObject("appid", window->appid);
1006 message->addArgObject("surface", window->surfaceid);
1007 message->addArgObject("winname", window->name);
1008 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1010 if (NULL != m_resMgr) {
1012 CicoSCCmdResCtrlOpt *opt = new CicoSCCmdResCtrlOpt();
1014 cmd.cmdid = MSG_CMD_ACQUIRE_RES;
1015 cmd.appid = window->appid;
1016 cmd.pid = window->pid;
1019 opt->displayres = true;
1020 opt->displayZone = fullZoneName;
1021 opt->windowName = window->name;
1022 opt->surfaceid = window->surfaceid;
1024 m_resMgr->handleCommand((const CicoSCCommand&)cmd, true);
1027 //show(window->surfaceid, NULL, 0);
1030 ICO_DBG("CicoSCWindowController::createdCB Leave");
1033 //--------------------------------------------------------------------------
1035 * @brief wayland change surface name callback
1037 * @param [in] data user data(unused)
1038 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1039 * @param [in] surfaceid ico_window_mgr surface Id
1040 * @param [in] winname surface window name(title)
1042 //--------------------------------------------------------------------------
1044 CicoSCWindowController::nameCB(void *data,
1045 struct ico_window_mgr *ico_window_mgr,
1047 const char *winname)
1049 ICO_DBG("CicoSCWindowController::nameCB Enter"
1050 "(surfaceid=%08X winname=%s)", surfaceid, winname);
1052 CicoSCWindow *window = findWindow(surfaceid);
1053 if (NULL == window) {
1054 ICO_DBG("CicoSCWindowController::nameCB Leave");
1058 ICO_DBG("nameCB: Update window name %s=>%s",
1059 window->name.c_str(), winname);
1060 window->name = winname;
1062 ICO_DBG("CicoSCWindowController::nameCB Leave");
1065 //--------------------------------------------------------------------------
1067 * @brief wayland surface destroy callback
1069 * @param [in] data user data(unused)
1070 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1071 * @param [in] surfaceid ico_window_mgr surface Id
1073 //--------------------------------------------------------------------------
1075 CicoSCWindowController::destroyedCB(void *data,
1076 struct ico_window_mgr *ico_window_mgr,
1079 ICO_DBG("CicoSCWindowController::destroyedCB Enter");
1081 CicoSCWindow *window = findWindow(surfaceid);
1082 if (NULL == window) {
1083 ICO_DBG("CicoSCWindowController::destroyedCB Leave");
1088 CicoSCMessage *message = new CicoSCMessage();
1089 message->addRootObject("command", MSG_CMD_DESTROY);
1090 message->addRootObject("appid", window->appid);
1091 message->addArgObject("surface", window->surfaceid);
1092 message->addArgObject("winname", window->name);
1093 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1095 // TODO delete window in application
1097 // delete window in list
1098 m_windowList.erase(window->surfaceid);
1101 ICO_DBG("CicoSCWindowController::destroyedCB Leave");
1104 //--------------------------------------------------------------------------
1106 * @brief wayland surface visible callback
1108 * @param [in] data user data(unused)
1109 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1110 * @param [in] surfaceid ico_window_mgr surface Id
1111 * @param [in] visible surface visible
1112 * (1=visible/0=unvisible/other=nochange)
1113 * @param [in] raise surface raise
1114 * (1=raise/0=lower/other=nochange)
1115 * @param [in] hint client request
1116 * (1=client request(not changed)/0=changed)
1118 //--------------------------------------------------------------------------
1120 CicoSCWindowController::visibleCB(void *data,
1121 struct ico_window_mgr *ico_window_mgr,
1127 ICO_DBG("CicoSCWindowController::visibleCB Enter"
1128 "(surfaceid=%08X visible=%d raise=%d hint=%d)",
1129 surfaceid, visible, raise, hint);
1131 CicoSCWindow *window = findWindow(surfaceid);
1132 if (NULL == window) {
1133 ICO_DBG("CicoSCWindowController::visibleCB Leave");
1137 int newVisible = visible;
1138 int newRaise = raise;
1140 if (visible == ICO_WINDOW_MGR_V_NOCHANGE) {
1141 newVisible = window->visible;
1144 if (raise == ICO_WINDOW_MGR_V_NOCHANGE) {
1145 newVisible = window->raise;
1148 if ((window->visible == newVisible) && (window->raise == newRaise) ){
1149 ICO_DBG("CicoSCWindowController::visibleCB Leave");
1153 // notify homescreen
1154 CicoSCMessage *message = new CicoSCMessage();
1155 message->addRootObject("command", MSG_CMD_CHANGE_ATTR);
1156 message->addRootObject("appid", window->appid);
1157 message->addArgObject("surface", window->surfaceid);
1158 message->addArgObject("winname", window->name);
1159 message->addArgObject("node", window->nodeid);
1160 message->addArgObject("layer", window->layerid);
1161 message->addArgObject("pos_x", window->x);
1162 message->addArgObject("pos_y", window->y);
1163 message->addArgObject("width", window->width);
1164 message->addArgObject("height", window->height);
1165 message->addArgObject("raise", window->raise ? 1 : 0);
1166 message->addArgObject("visible", window->visible ? 1 : 0);
1167 message->addArgObject("active", window->active ? 1 : 0);
1168 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1170 ICO_DBG("CicoSCWindowController::visibleCB Leave");
1173 //--------------------------------------------------------------------------
1175 * @brief wayland surface configure callback
1177 * @param [in] data user data(unused)
1178 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1179 * @param [in] surfaceid ico_window_mgr surface Id
1180 * @param [in] node surface node Id
1181 * @param [in] x surface upper-left X coodinate
1182 * @param [in] y surface upper-left Y coodinate
1183 * @param [in] width surface width
1184 * @param [in] height surface height
1185 * @param [in] hint client request
1186 * (1=client request(not changed)/0=changed)
1188 //--------------------------------------------------------------------------
1190 CicoSCWindowController::configureCB(void *data,
1191 struct ico_window_mgr *ico_window_mgr,
1201 ICO_DBG("CicoSCWindowController::configureCB Enter"
1202 "surfaceid=%08X node=%d layer=%d x=%d y=%d "
1203 "width=%d height=%d hint=%d",
1204 surfaceid, node, layer, x, y, width, height, hint);
1206 CicoSCWindow *window = findWindow(surfaceid);
1207 if (NULL == window) {
1208 ICO_DBG("CicoSCWindowController::visibleCB Leave"
1209 "(update window visible failed)");
1213 if (ICO_WINDOW_MGR_HINT_CHANGE == hint) {
1216 window->width = width;
1217 window->height = height;
1219 if (window->layerid != layer) {
1220 window->layerid = layer;
1221 layer = findLayer(window->displayid, layer);
1227 CicoSCMessage *message = new CicoSCMessage();
1228 message->addRootObject("command", MSG_CMD_CHANGE_ATTR);
1229 message->addRootObject("appid", window->appid);
1230 message->addArgObject("surface", window->surfaceid);
1231 message->addArgObject("winname", window->name);
1232 message->addArgObject("node", window->nodeid);
1233 message->addArgObject("layer", window->layerid);
1234 message->addArgObject("pos_x", window->x);
1235 message->addArgObject("pos_y", window->y);
1236 message->addArgObject("width", window->width);
1237 message->addArgObject("height", window->height);
1238 message->addArgObject("raise", window->raise ? 1 : 0);
1239 message->addArgObject("visible", window->visible ? 1 : 0);
1240 message->addArgObject("active", window->active ? 1 : 0);
1241 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1243 ICO_DBG("CicoSCWindowController::configureCB Leave");
1246 //--------------------------------------------------------------------------
1248 * @brief wayland surface active callback
1250 * @param [in] data user data(unused)
1251 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1252 * @param [in] surfaceid ico_window_mgr surface Id
1253 * @param [in] active surface active
1254 * (1=active/0=not active)
1256 //--------------------------------------------------------------------------
1258 CicoSCWindowController::activeCB(void *data,
1259 struct ico_window_mgr *ico_window_mgr,
1263 ICO_DBG("CicoSCWindowController::activeCB Enter"
1264 "(surfaceid=%08X active=%d)", surfaceid, active);
1266 CicoSCWindow *window = findWindow(surfaceid);
1267 if (NULL == window) {
1268 ICO_DBG("CicoSCWindowController::activeCB Leave");
1273 CicoSCMessage *message = new CicoSCMessage();
1274 message->addRootObject("command", MSG_CMD_CHANGE_ACTIVE);
1275 message->addRootObject("appid", window->appid);
1276 message->addArgObject("surface", window->surfaceid);
1277 message->addArgObject("winname", window->name);
1278 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1280 ICO_DBG("CicoSCWindowController::activeCB Leave");
1283 //--------------------------------------------------------------------------
1285 * @brief wayland layer visible callback
1287 * @param [in] data user data(unused)
1288 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1289 * @param [in] layer layer Id
1290 * @param [in] visible layer visible
1291 * (1=visible/0=unvisible/other=nochange)
1293 //--------------------------------------------------------------------------
1295 CicoSCWindowController::layerVisibleCB(void *data,
1296 struct ico_window_mgr *ico_window_mgr,
1300 ICO_DBG("CicoSCWindowController::layerVisibleCB Enter"
1301 "layer=%d visible=%d)", layer, visible);
1304 CicoSCMessage *message = new CicoSCMessage();
1305 message->addRootObject("command", MSG_CMD_CHANGE_LAYER_ATTR);
1306 message->addRootObject("appid", "");
1307 message->addArgObject("layer", layer);
1308 message->addArgObject("visible", visible);
1309 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1311 ICO_DBG("CicoSCWindowController::layerVisibleCB Leave");
1314 //--------------------------------------------------------------------------
1316 * @brief query applicationsurface callback
1318 * @param [in] data user data(unused)
1319 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1320 * @param [in] appid application Id
1321 * @param [in] suface surface Id array
1323 //--------------------------------------------------------------------------
1325 CicoSCWindowController::appSurfacesCB(void *data,
1326 struct ico_window_mgr *ico_window_mgr,
1328 struct wl_array *surfaces)
1330 ICO_DBG("CicoSCWindowController::appSurfacesCB Enter(appid=%s)", appid);
1338 for (p = (uint32_t**)(surfaces)->data;
1339 (const char*) p < ((const char*) (surfaces)->data + (surfaces)->size);
1341 ICO_DBG("appSurfacesCB: surface=%d", (int)*p);
1344 ICO_DBG("CicoSCWindowController::appSurfacesCB Leave");
1347 //--------------------------------------------------------------------------
1349 * @brief surface map event callback
1351 * @param [in] data user data(unused)
1352 * @param [in] ico_window_mgr wayland ico_window_mgr plugin interface
1353 * @param [in] event event
1354 * @param [in] surfaceid surface Id
1355 * @param [in] width surface width
1356 * @param [in] height surface height
1357 * @param [in] stride surface buffer(frame buffer) stride
1358 * @param [in] format surface buffer format
1360 //--------------------------------------------------------------------------
1362 CicoSCWindowController::mapSurfaceCB(void *data,
1363 struct ico_window_mgr *ico_window_mgr,
1371 ICO_DBG("CicoSCWindowController::mapSurfaceCB Enter"
1372 "(event=%d surface=%d width=%d height=%d stride=%d format=%d)",
1373 event, surfaceid, width, height, stride, format);
1375 CicoSCWindow *window = findWindow(surfaceid);
1376 if (NULL == window) {
1381 CicoSCMessage *message = new CicoSCMessage();
1382 message->addRootObject("command", MSG_CMD_MAP_THUMB);
1383 message->addRootObject("appid", window->appid);
1384 message->addArgObject("surface", window->surfaceid);
1385 message->addArgObject("width", width);
1386 message->addArgObject("height", height);
1387 message->addArgObject("stride", stride);
1388 message->addArgObject("format", format);
1389 CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
1391 ICO_DBG("CicoSCWindowController::mapSurfaceCB Leave");
1394 //--------------------------------------------------------------------------
1396 * @brief wayland display attribute callback
1398 * @param [in] data user data(unused)
1399 * @param [in] wl_output wayland wl_output interface
1400 * @param [in] x display upper-left X coodinate
1401 * @param [in] y display upper-left Y coodinate
1402 * @param [in] physical_width display physical width
1403 * @param [in] physical_height display physical height
1404 * @param [in] subpixel display sub pixcel
1405 * @param [in] make display maker
1406 * @param [in] model diaplay model
1407 * @param [in] transform transform
1409 //--------------------------------------------------------------------------
1411 CicoSCWindowController::outputGeometryCB(void *data,
1412 struct wl_output *wl_output,
1415 int32_t physical_width,
1416 int32_t physical_height,
1422 ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Enter"
1423 "(x=%d y=%d physical_width=%d physical_height=%d "
1424 "subpixel=%d make=%s model=%s transform=%d)",
1425 x, y, physical_width, physical_height,
1426 subpixel, make, model, transform);
1428 if (0 == m_displayList.size()) {
1429 ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Leave(display is zero");
1433 CicoSCDisplay* display = m_displayList.at(0);
1434 switch (transform) {
1435 case WL_OUTPUT_TRANSFORM_90:
1436 case WL_OUTPUT_TRANSFORM_270:
1437 case WL_OUTPUT_TRANSFORM_FLIPPED_90:
1438 case WL_OUTPUT_TRANSFORM_FLIPPED_270:
1439 display->pWidth = physical_height;
1440 display->pHeight = physical_width;
1441 display->orientation = CicoSCDisplay::ORIENTATION_VERTICAL;
1443 case WL_OUTPUT_TRANSFORM_NORMAL:
1444 case WL_OUTPUT_TRANSFORM_180:
1445 case WL_OUTPUT_TRANSFORM_FLIPPED:
1446 case WL_OUTPUT_TRANSFORM_FLIPPED_180:
1448 display->pWidth = physical_width;
1449 display->pHeight = physical_height;
1450 display->orientation = CicoSCDisplay::ORIENTATION_HORIZONTAL;
1455 ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Leave");
1458 //--------------------------------------------------------------------------
1460 * @brief wayland display mode callback
1462 * @param [in] data user data(unused)
1463 * @param [in] wl_output wayland wl_output interface
1464 * @param [in] flags flags
1465 * @param [in] width display width
1466 * @param [in] height display height
1467 * @param [in] refresh display refresh rate
1469 //--------------------------------------------------------------------------
1471 CicoSCWindowController::outputModeCB(void *data,
1472 struct wl_output *wl_output,
1478 ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Enter"
1479 "(flags=%d width=%d height=%d refresh=%d)",
1480 flags, width, height, refresh);
1482 if (0 == m_displayList.size()) {
1483 ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Leave(display is zero");
1487 CicoSCDisplay* display = m_displayList.at(0);
1488 if (flags & WL_OUTPUT_MODE_CURRENT) {
1489 if (display->orientation == CicoSCDisplay::ORIENTATION_VERTICAL) {
1490 display->pWidth = height;
1491 display->pHeight = width;
1494 display->pWidth = width;
1495 display->pHeight = height;
1500 ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Leave");
1503 //==========================================================================
1505 //==========================================================================
1507 //--------------------------------------------------------------------------
1509 * @brief find window object by surfaceid
1511 * @param [in] surfaceid wayland surface id
1513 //--------------------------------------------------------------------------
1515 CicoSCWindowController::findWindow(int surfaceid)
1517 map<unsigned int, CicoSCWindow*>::iterator itr;
1518 itr = m_windowList.find(surfaceid);
1519 if (m_windowList.end() == itr) {
1520 ICO_WRN("not found window object. surfaceid=%d", surfaceid);
1527 //--------------------------------------------------------------------------
1529 * @brief find window object by surfaceid
1531 * @param [in] surfaceid wayland surface id
1533 //--------------------------------------------------------------------------
1535 CicoSCWindowController::findLayer(int displayid, int layerid)
1537 CicoSCDisplay* display = NULL;
1538 CicoSCLayer* layer = NULL;
1540 display = m_displayList.at(displayid);
1541 layer = display->layerList.at(layerid);
1543 catch (const std::exception& e) {
1544 ICO_ERR("catch exception %s", e.what());
1548 ICO_ERR("catch exception unknown");
1554 //--------------------------------------------------------------------------
1556 * @brief handle command
1558 * @param [in] commnad control commnad
1560 //--------------------------------------------------------------------------
1562 CicoSCWindowController::handleCommand(const CicoSCCommand * cmd)
1564 ICO_DBG("CicoSCWindowController::handleCommand Enter(%d)", cmd->cmdid);
1566 CicoSCCmdWinCtrlOpt *opt = static_cast<CicoSCCmdWinCtrlOpt*>(cmd->opt);
1569 switch (cmd->cmdid) {
1571 ICO_DBG("command: MSG_CMD_SHOW");
1572 ret = show(opt->surfaceid, opt->animation.c_str(), opt->animationTime);
1575 ICO_DBG("command: MSG_CMD_HIDE");
1576 ret = hide(opt->surfaceid, opt->animation.c_str(), opt->animationTime);
1579 ICO_DBG("command: MSG_CMD_MOVE");
1580 ret = setGeometry(opt->surfaceid, opt->nodeid, opt->x, opt->y,
1581 opt->width, opt->height,
1582 opt->animation.c_str(), opt->animationTime,
1583 opt->animation.c_str(), opt->animationTime);
1585 case MSG_CMD_CHANGE_ACTIVE:
1586 ICO_DBG("command: MSG_CMD_CHANGE_ACTIVE");
1587 ret = active(opt->surfaceid, opt->active);
1589 case MSG_CMD_CHANGE_LAYER:
1590 ICO_DBG("command: MSG_CMD_CHANGE_LAYER");
1591 ret = setWindowLayer(opt->surfaceid, opt->layerid);
1593 case MSG_CMD_PREPARE_THUMB:
1594 ICO_DBG("command: MSG_CMD_PREPARE_THUMB");
1595 ret = mapSurface(opt->surfaceid, opt->framerate);
1597 case MSG_CMD_UNMAP_THUMB:
1598 ICO_DBG("command: MSG_CMD_UNMAP_THUMB");
1599 ret = unmapSurface(opt->surfaceid);
1601 case MSG_CMD_SHOW_LAYER:
1602 ICO_DBG("command: MSG_CMD_SHOW_LAYER");
1603 ret = showLayer(opt->displayid, opt->layerid);
1605 case MSG_CMD_HIDE_LAYER:
1606 ICO_DBG("command: MSG_CMD_HIDE_LAYER");
1607 ret = hideLayer(opt->displayid, opt->layerid);
1610 ICO_WRN("Unknown Commnad(0x%08X)", cmd->cmdid);
1613 ICO_DBG("commnd result(%d)", ret);
1615 ICO_DBG("CicoSCWindowController::handleCommand Leave");
1617 // vim:set expandtab ts=4 sw=4: