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.h
14 * @brief This file is definition of CicoSCWindowController class
16 //==========================================================================
17 #ifndef __CICO_SC_WINDOW_CONTROLLER_H__
18 #define __CICO_SC_WINDOW_CONTROLLER_H__
25 #include "CicoSCWlWinMgrIF.h"
27 //==========================================================================
28 // Forward declaration
29 //==========================================================================
33 class CicoSCDisplayZone;
35 class CicoSCResourceManager;
37 //--------------------------------------------------------------------------
39 * @brief This class is controller of window
41 //--------------------------------------------------------------------------
42 class CicoSCWindowController : public CicoSCWlWinMgrIF
45 // default constructor
46 CicoSCWindowController();
49 virtual ~CicoSCWindowController();
53 void handleCommand(const CicoSCCommand * cmd);
56 void setResourceManager(CicoSCResourceManager *resMgr);
58 int show(int surfaceid,
59 const char *animation,
62 int hide(int surfaceid,
63 const char *animation,
66 int resize(int surfaceid,
69 const char *animation,
72 int move(int surfaceid,
76 const char *animation,
79 int setGeometry(int surfaceid,
85 const char *resizeAnimation,
86 int resizeAnimationTime,
87 const char *moveAnimation,
88 int moveAnimationTime);
90 int setGeometry(int surfaceid,
92 const char *resizeAnimation,
93 int resizeAnimationTime,
94 const char *moveAnimation,
95 int moveAnimationTime);
97 int raise(int surfaceid,
98 const char *animation,
101 int lower(int surfaceid, const char *animation, int animationTime);
103 int setWindowLayer(int surfaceid, int layerid);
105 int showLayer(int displayid, int layerid);
107 int hideLayer(int displayid, int layerid);
109 int active(int surfaceid, int target);
111 int mapSurface(int surfaceid, int framerate);
113 int unmapSurface(int surfaceid);
116 virtual void createdCB(void *data,
117 struct ico_window_mgr *ico_window_mgr,
123 virtual void nameCB(void *data,
124 struct ico_window_mgr *ico_window_mgr,
126 const char *winname);
128 virtual void destroyedCB(void *data,
129 struct ico_window_mgr *ico_window_mgr,
132 virtual void visibleCB(void *data,
133 struct ico_window_mgr *ico_window_mgr,
139 virtual void configureCB(void *data,
140 struct ico_window_mgr *ico_window_mgr,
150 virtual void activeCB(void *data,
151 struct ico_window_mgr *ico_window_mgr,
155 virtual void layerVisibleCB(void *data,
156 struct ico_window_mgr *ico_window_mgr,
160 virtual void appSurfacesCB(void *data,
161 struct ico_window_mgr *ico_window_mgr,
163 struct wl_array *surfaces);
165 virtual void mapSurfaceCB(void *data,
166 struct ico_window_mgr *ico_window_mgr,
176 virtual void outputGeometryCB(void *data,
177 struct wl_output *wl_output,
180 int32_t physical_width,
181 int32_t physical_height,
187 virtual void outputModeCB(void *data,
188 struct wl_output *wl_output,
195 // assignment operator
196 CicoSCWindowController& operator=(const CicoSCWindowController &object);
199 CicoSCWindowController(const CicoSCWindowController &object);
201 // find window object by surface id
202 CicoSCWindow* findWindow(int surfaceid);
204 // find layer object by display id and layer id
205 CicoSCLayer* findLayer(int displayid, int layerid);
207 // fine display zone by id
208 const CicoSCDisplayZone * findDisplayZone(int zoneid);
210 int notifyResourceManager(int surfaceid,
212 const char *animation,
216 CicoSCResourceManager *m_resMgr;
218 // window object list
219 map<unsigned int, CicoSCWindow*> m_windowList;
221 // display object list
222 vector<CicoSCDisplay*> m_displayList;
225 unsigned int m_physicalDisplayTotal;
228 #endif // __CICO_SC_WINDOW_CONTROLLER_H__
229 // vim:set expandtab ts=4 sw=4: