widget/gonk/nsScreenManagerGonk.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* Copyright 2012 Mozilla Foundation and Mozilla contributors
     3  *
     4  * Licensed under the Apache License, Version 2.0 (the "License");
     5  * you may not use this file except in compliance with the License.
     6  * You may obtain a copy of the License at
     7  *
     8  *     http://www.apache.org/licenses/LICENSE-2.0
     9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.
    15  */
    17 #ifndef nsScreenManagerGonk_h___
    18 #define nsScreenManagerGonk_h___
    20 #include "mozilla/Hal.h"
    21 #include "nsCOMPtr.h"
    23 #include "nsBaseScreen.h"
    24 #include "nsIScreenManager.h"
    26 class nsScreenGonk : public nsBaseScreen
    27 {
    28     typedef mozilla::hal::ScreenConfiguration ScreenConfiguration;
    30 public:
    31     nsScreenGonk(void* nativeScreen);
    32     ~nsScreenGonk();
    34     NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
    35     NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
    36     NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth);
    37     NS_IMETHOD GetColorDepth(int32_t* aColorDepth);
    38     NS_IMETHOD GetRotation(uint32_t* aRotation);
    39     NS_IMETHOD SetRotation(uint32_t  aRotation);
    41     static uint32_t GetRotation();
    42     static ScreenConfiguration GetConfiguration();
    43 };
    45 class nsScreenManagerGonk MOZ_FINAL : public nsIScreenManager
    46 {
    47 public:
    48     nsScreenManagerGonk();
    49     ~nsScreenManagerGonk();
    51     NS_DECL_ISUPPORTS
    52     NS_DECL_NSISCREENMANAGER
    54 protected:
    55     nsCOMPtr<nsIScreen> mOneScreen;
    56 };
    58 #endif /* nsScreenManagerGonk_h___ */

mercurial