widget/android/nsScreenManagerAndroid.h
author ffxbld <release@mozilla.com>
Mon, 01 Aug 2016 07:05:25 -0700
changeset 307515 1784778c52f0e26829d48517bc4b8aca5cedab55
parent 258135 05efc89f31eedc28dee03ade6419c41e76037575
child 316582 ddf5af982d8b7a4258b3a6e05ee4c76ce66af605
permissions -rw-r--r--
No bug - Tagging mozilla-central 465d150bc8be5bbf9f02a8607d4552b6a5e1697c with FIREFOX_AURORA_50_BASE a=release DONTBUILD CLOSED TREE

/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsScreenManagerAndroid_h___
#define nsScreenManagerAndroid_h___

#include "nsCOMPtr.h"

#include "nsBaseScreen.h"
#include "nsIScreenManager.h"
#include "WidgetUtils.h"

class nsScreenAndroid final : public nsBaseScreen
{
public:
    nsScreenAndroid(void *nativeScreen);
    ~nsScreenAndroid();

    NS_IMETHOD GetId(uint32_t* aId) override;
    NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
    NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
    NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth) override;
    NS_IMETHOD GetColorDepth(int32_t* aColorDepth) override;

protected:
    virtual void ApplyMinimumBrightness(uint32_t aBrightness) override;
};

class nsScreenManagerAndroid final : public nsIScreenManager
{
private:
    ~nsScreenManagerAndroid();

public:
    nsScreenManagerAndroid();

    NS_DECL_ISUPPORTS
    NS_DECL_NSISCREENMANAGER

protected:
    nsCOMPtr<nsIScreen> mOneScreen;
};

#endif /* nsScreenManagerAndroid_h___ */