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,
86 const char *resizeAnimation,
87 int resizeAnimationTime,
88 const char *moveAnimation,
89 int moveAnimationTime);
91 int setGeometry(int surfaceid,
94 const char *resizeAnimation,
95 int resizeAnimationTime,
96 const char *moveAnimation,
97 int moveAnimationTime);
99 int raise(int surfaceid,
100 const char *animation,
103 int lower(int surfaceid, const char *animation, int animationTime);
105 int setWindowLayer(int surfaceid, int layerid);
107 int showLayer(int displayid, int layerid);
109 int hideLayer(int displayid, int layerid);
111 int active(int surfaceid, int target);
113 int setmapBuffer(const char *shmname, int bufsize, int bufnum);
115 int mapSurface(int surfaceid, int framerate);
117 int unmapSurface(int surfaceid);
119 int getDisplayedWindow(int zoneid);
121 int setAttributes(int surfaceid);
124 virtual void createdCB(void *data,
125 struct ico_window_mgr *ico_window_mgr,
132 virtual void nameCB(void *data,
133 struct ico_window_mgr *ico_window_mgr,
135 const char *winname);
137 virtual void destroyedCB(void *data,
138 struct ico_window_mgr *ico_window_mgr,
141 virtual void visibleCB(void *data,
142 struct ico_window_mgr *ico_window_mgr,
148 virtual void configureCB(void *data,
149 struct ico_window_mgr *ico_window_mgr,
160 virtual void activeCB(void *data,
161 struct ico_window_mgr *ico_window_mgr,
165 virtual void layerVisibleCB(void *data,
166 struct ico_window_mgr *ico_window_mgr,
170 virtual void appSurfacesCB(void *data,
171 struct ico_window_mgr *ico_window_mgr,
173 struct wl_array *surfaces);
175 virtual void mapSurfaceCB(void *data,
176 struct ico_window_mgr *ico_window_mgr,
186 virtual void outputGeometryCB(void *data,
187 struct wl_output *wl_output,
190 int32_t physical_width,
191 int32_t physical_height,
197 virtual void outputModeCB(void *data,
198 struct wl_output *wl_output,
205 // assignment operator
206 CicoSCWindowController& operator=(const CicoSCWindowController &object);
209 CicoSCWindowController(const CicoSCWindowController &object);
211 // find window object by surface id
212 CicoSCWindow* findWindow(int surfaceid);
214 // find layer object by display id and layer id
215 CicoSCLayer* findLayer(int displayid, int layerid);
217 // fine display zone by id
218 const CicoSCDisplayZone * findDisplayZone(int zoneid);
220 int notifyResourceManager(int surfaceid,
223 const char *animation,
227 // resource manager instance
228 CicoSCResourceManager *m_resMgr;
230 // window object list
231 map<unsigned int, CicoSCWindow*> m_windowList;
233 // display object list
234 vector<CicoSCDisplay*> m_displayList;
236 // total of physical display
237 unsigned int m_physicalDisplayTotal;
240 #endif // __CICO_SC_WINDOW_CONTROLLER_H__
241 // vim:set expandtab ts=4 sw=4: