michael@0: /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* Copyright 2012 Mozilla Foundation and Mozilla contributors michael@0: * michael@0: * Licensed under the Apache License, Version 2.0 (the "License"); michael@0: * you may not use this file except in compliance with the License. michael@0: * You may obtain a copy of the License at michael@0: * michael@0: * http://www.apache.org/licenses/LICENSE-2.0 michael@0: * michael@0: * Unless required by applicable law or agreed to in writing, software michael@0: * distributed under the License is distributed on an "AS IS" BASIS, michael@0: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: * See the License for the specific language governing permissions and michael@0: * limitations under the License. michael@0: */ michael@0: michael@0: #ifndef nsScreenManagerGonk_h___ michael@0: #define nsScreenManagerGonk_h___ michael@0: michael@0: #include "mozilla/Hal.h" michael@0: #include "nsCOMPtr.h" michael@0: michael@0: #include "nsBaseScreen.h" michael@0: #include "nsIScreenManager.h" michael@0: michael@0: class nsScreenGonk : public nsBaseScreen michael@0: { michael@0: typedef mozilla::hal::ScreenConfiguration ScreenConfiguration; michael@0: michael@0: public: michael@0: nsScreenGonk(void* nativeScreen); michael@0: ~nsScreenGonk(); michael@0: michael@0: NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); michael@0: NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); michael@0: NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth); michael@0: NS_IMETHOD GetColorDepth(int32_t* aColorDepth); michael@0: NS_IMETHOD GetRotation(uint32_t* aRotation); michael@0: NS_IMETHOD SetRotation(uint32_t aRotation); michael@0: michael@0: static uint32_t GetRotation(); michael@0: static ScreenConfiguration GetConfiguration(); michael@0: }; michael@0: michael@0: class nsScreenManagerGonk MOZ_FINAL : public nsIScreenManager michael@0: { michael@0: public: michael@0: nsScreenManagerGonk(); michael@0: ~nsScreenManagerGonk(); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSISCREENMANAGER michael@0: michael@0: protected: michael@0: nsCOMPtr mOneScreen; michael@0: }; michael@0: michael@0: #endif /* nsScreenManagerGonk_h___ */