Merge "Build and package Layer Management service binaries." into tizen
[profile/ivi/layer-management.git] / LayerManagerPlugins / Renderers / Graphic / include / WindowSystems / WaylandDrmWindowSystem.h
1 /***************************************************************************
2  *
3  * Copyright 2010, 2011 BMW Car IT GmbH
4  * Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh
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  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
21  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
22  * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
23  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
24  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
25  * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27  *
28  ****************************************************************************/
29
30 #ifndef _WAYLANDDRMWINDOWSYSTEM_H_
31 #define _WAYLANDDRMWINDOWSYSTEM_H_
32 #include "WindowSystems/WaylandBaseWindowSystem.h"
33
34 struct gbm_device;
35
36 class WaylandDrmWindowSystem : public WaylandBaseWindowSystem
37 {
38 public:
39     WaylandDrmWindowSystem(const char* displayname, int width, int height, Scene* pScene, InputManager* pInputManager);
40     virtual ~WaylandDrmWindowSystem();
41
42 protected:
43     virtual bool createNativeContext();
44     virtual bool initGraphicSystem();
45     virtual bool createInputEvent();
46     virtual void checkForNewSurfaceNativeContent();
47     virtual void RedrawAllLayers(bool clear, bool swap);
48
49 private:
50     int m_fdDev;
51     gbm_device* m_gbm;
52 };
53
54 #endif /* _WAYLANDDRMWINDOWSYSTEM_H_ */