1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/gonk/nsScreenManagerGonk.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* Copyright 2012 Mozilla Foundation and Mozilla contributors 1.6 + * 1.7 + * Licensed under the Apache License, Version 2.0 (the "License"); 1.8 + * you may not use this file except in compliance with the License. 1.9 + * You may obtain a copy of the License at 1.10 + * 1.11 + * http://www.apache.org/licenses/LICENSE-2.0 1.12 + * 1.13 + * Unless required by applicable law or agreed to in writing, software 1.14 + * distributed under the License is distributed on an "AS IS" BASIS, 1.15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.16 + * See the License for the specific language governing permissions and 1.17 + * limitations under the License. 1.18 + */ 1.19 + 1.20 +#ifndef nsScreenManagerGonk_h___ 1.21 +#define nsScreenManagerGonk_h___ 1.22 + 1.23 +#include "mozilla/Hal.h" 1.24 +#include "nsCOMPtr.h" 1.25 + 1.26 +#include "nsBaseScreen.h" 1.27 +#include "nsIScreenManager.h" 1.28 + 1.29 +class nsScreenGonk : public nsBaseScreen 1.30 +{ 1.31 + typedef mozilla::hal::ScreenConfiguration ScreenConfiguration; 1.32 + 1.33 +public: 1.34 + nsScreenGonk(void* nativeScreen); 1.35 + ~nsScreenGonk(); 1.36 + 1.37 + NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); 1.38 + NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); 1.39 + NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth); 1.40 + NS_IMETHOD GetColorDepth(int32_t* aColorDepth); 1.41 + NS_IMETHOD GetRotation(uint32_t* aRotation); 1.42 + NS_IMETHOD SetRotation(uint32_t aRotation); 1.43 + 1.44 + static uint32_t GetRotation(); 1.45 + static ScreenConfiguration GetConfiguration(); 1.46 +}; 1.47 + 1.48 +class nsScreenManagerGonk MOZ_FINAL : public nsIScreenManager 1.49 +{ 1.50 +public: 1.51 + nsScreenManagerGonk(); 1.52 + ~nsScreenManagerGonk(); 1.53 + 1.54 + NS_DECL_ISUPPORTS 1.55 + NS_DECL_NSISCREENMANAGER 1.56 + 1.57 +protected: 1.58 + nsCOMPtr<nsIScreen> mOneScreen; 1.59 +}; 1.60 + 1.61 +#endif /* nsScreenManagerGonk_h___ */