Renderers: new GLES shader selection mechanism
[profile/ivi/layer-management.git] / LayerManagerPlugins / Renderers / Graphic / include / WindowSystems / BaseWindowSystem.h
1 /***************************************************************************
2  *
3  * Copyright 2010,2011 BMW Car IT GmbH
4  * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *        http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ****************************************************************************/
20
21 #ifndef _BASEWINDOWSYSTEM_H_
22 #define _BASEWINDOWSYSTEM_H_
23
24 #include "Scene.h"
25
26 class BaseWindowSystem
27 {
28 public:
29     BaseWindowSystem(Scene* pScene, InputManager* pInputManager )
30     : m_pScene(pScene)
31     , m_pInputManager(pInputManager)
32     , m_damaged(false)
33     , m_forceComposition(false)
34     {
35     }
36
37     virtual ~BaseWindowSystem()
38     {
39     }
40
41     virtual bool start() = 0;
42     virtual void stop() = 0;
43     virtual void allocatePlatformSurface(Surface *surface) = 0;
44     virtual void doScreenShot(std::string fileName) = 0;
45     virtual void doScreenShotOfLayer(std::string fileName, const uint id) = 0;
46     virtual void doScreenShotOfSurface(std::string fileName, const uint id, const uint layer_id) = 0;
47
48     unsigned long int mThreadId; // TODO: remove
49 protected:
50     virtual void ClearDamage();
51     InputManager* m_pInputManager;
52
53 public:
54     Scene* m_pScene;
55     bool m_damaged;
56     bool m_forceComposition;
57 };
58
59 #endif /* _BASEWINDOWSYSTEM_H_ */