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 #define ICO_SC_APPID_DEFAULT_ONS "org.tizen.ico.onscreen"
28 #define ICO_SC_LAYERID_SCREENBASE 1000
30 //==========================================================================
31 // Forward declaration
32 //==========================================================================
36 class CicoSCDisplayZone;
38 class CicoSCResourceManager;
40 //--------------------------------------------------------------------------
42 * @brief This class is controller of window
44 //--------------------------------------------------------------------------
45 class CicoSCWindowController : public CicoSCWlWinMgrIF
48 // get instance of CicoSCWindowController
49 static CicoSCWindowController* getInstance();
51 // default constructor
52 CicoSCWindowController();
55 virtual ~CicoSCWindowController();
59 void handleCommand(const CicoSCCommand * cmd);
62 void setResourceManager(CicoSCResourceManager *resMgr);
64 int show(int surfaceid,
65 const char *animation,
68 int hide(int surfaceid,
69 const char *animation,
72 int resize(int surfaceid,
75 const char *animation,
78 int move(int surfaceid,
82 const char *animation,
85 int setGeometry(int surfaceid,
92 const char *resizeAnimation,
93 int resizeAnimationTime,
94 const char *moveAnimation,
95 int moveAnimationTime);
97 int setGeometry(int surfaceid,
100 const char *resizeAnimation,
101 int resizeAnimationTime,
102 const char *moveAnimation,
103 int moveAnimationTime);
105 int raise(int surfaceid,
106 const char *animation,
109 int lower(int surfaceid, const char *animation, int animationTime);
111 int setWindowAnimation(int surfaceid, int type, const char *animation, int time);
113 int setWindowLayer(int surfaceid, int layerid);
115 int showLayer(int displayid, int layerid);
117 int hideLayer(int displayid, int layerid);
119 int active(int surfaceid, int target);
121 int setmapGet(int surfaceid, const char *filepath);
123 int mapSurface(int surfaceid, int framerate, const char *filepath);
125 int unmapSurface(int surfaceid);
127 int getDisplayedWindow(int zoneid);
129 int setAttributes(int surfaceid);
131 void initializeGeniviLMS(void);
133 static void wlGeniviLayerNotification(t_ilm_layer layer,
134 struct ilmLayerProperties *LayerProperties,
135 t_ilm_notification_mask mask);
137 virtual void activeCB(void *data,
138 struct ico_window_mgr *ico_window_mgr,
142 virtual void mapSurfaceCB(void *data,
143 struct ico_window_mgr *ico_window_mgr,
152 virtual void updateSurfaceCB(void *data,
153 struct ico_window_mgr *ico_window_mgr,
163 virtual void destroySurfaceCB(void *data,
164 struct ico_window_mgr *ico_window_mgr,
167 virtual void updateWinnameCB(uint32_t surfaceid,
168 const char *winname);
170 virtual void outputGeometryCB(void *data,
171 struct wl_output *wl_output,
174 int32_t physical_width,
175 int32_t physical_height,
181 virtual void outputModeCB(void *data,
182 struct wl_output *wl_output,
188 virtual void createSurfaceCB(void *data,
189 struct ivi_controller *ivi_controller,
190 uint32_t id_surface);
192 const CicoSCWindow* findWindowObj(int32_t pid, uint32_t surfaceid) const;
194 const CicoSCResourceManager* getResourceManager(void) const;
197 // assignment operator
198 CicoSCWindowController& operator=(const CicoSCWindowController &object);
201 CicoSCWindowController(const CicoSCWindowController &object);
203 // find window object by surface id
204 CicoSCWindow* findWindow(int surfaceid);
206 // find layer object by display id and layer id
207 CicoSCLayer* findLayer(int displayid, int layerid);
209 // fine display zone by id
210 const CicoSCDisplayZone * findDisplayZone(int zoneid);
212 void raiselower(CicoSCWindow *window, bool raise);
214 int notifyResourceManager(int surfaceid,
217 const char *animation,
222 static CicoSCWindowController *ms_myInstance;
224 // resource manager instance
225 CicoSCResourceManager *m_resMgr;
227 // window object list
228 map<unsigned int, CicoSCWindow*> m_windowList;
230 // display object list
231 vector<CicoSCDisplay*> m_displayList;
233 // total of physical display
234 unsigned int m_physicalDisplayTotal;
236 #endif // __CICO_SC_WINDOW_CONTROLLER_H__
237 // vim:set expandtab ts=4 sw=4: