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 #ifndef _WLSURFACE_H_ 21 #define _WLSURFACE_H_ 22 23 #include "WLContext.h" 24 25 class WLSurface 26 { 27 // properties 28 protected: 29 WLContext* m_wlContext; 30 struct wl_surface* m_wlSurface; 31 struct ivi_surface* m_iviSurface; 32 int m_width; 33 int m_height; 34 unsigned int m_surfaceId; 35 36 // methods 37 public: 38 WLSurface(WLContext* wlContext); 39 virtual ~WLSurface(); 40 41 struct wl_display* GetWLDisplay() const; 42 struct wl_surface* GetWLSurface() const; 43 44 virtual bool CreateSurface(const int width, const int height, const int surfaceId); 45 46 protected: 47 virtual bool CreatePlatformSurface(); 48 }; 49 GetWLSurface()50inline struct wl_surface* WLSurface::GetWLSurface() const { return m_wlSurface; } GetWLDisplay()51inline struct wl_display* WLSurface::GetWLDisplay() const 52 { return m_wlContext->GetWLDisplay(); } 53 54 #endif /* _WLSURFACE_H_ */ 55