2010-06-03 13:56:36 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 12:12:37 +01:00
|
|
|
/* 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/. */
|
2010-06-03 13:56:36 -07:00
|
|
|
|
|
|
|
#ifndef nsScreenManagerAndroid_h___
|
|
|
|
#define nsScreenManagerAndroid_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
2012-01-04 18:12:48 -08:00
|
|
|
#include "nsBaseScreen.h"
|
2010-06-03 13:56:36 -07:00
|
|
|
#include "nsIScreenManager.h"
|
2010-12-21 14:34:29 -08:00
|
|
|
#include "WidgetUtils.h"
|
2010-06-03 13:56:36 -07:00
|
|
|
|
2015-03-21 12:28:04 -04:00
|
|
|
class nsScreenAndroid final : public nsBaseScreen
|
2010-06-03 13:56:36 -07:00
|
|
|
{
|
|
|
|
public:
|
2010-12-21 14:34:29 -08:00
|
|
|
nsScreenAndroid(void *nativeScreen);
|
2010-06-03 13:56:36 -07:00
|
|
|
~nsScreenAndroid();
|
|
|
|
|
2014-07-14 13:22:26 -04:00
|
|
|
NS_IMETHOD GetId(uint32_t* aId);
|
2012-08-22 11:56:38 -04:00
|
|
|
NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
|
|
|
|
NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
|
|
|
|
NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth);
|
|
|
|
NS_IMETHOD GetColorDepth(int32_t* aColorDepth);
|
2010-12-21 14:34:29 -08:00
|
|
|
|
|
|
|
protected:
|
2015-03-21 12:28:04 -04:00
|
|
|
virtual void ApplyMinimumBrightness(uint32_t aBrightness) override;
|
2010-06-03 13:56:36 -07:00
|
|
|
};
|
|
|
|
|
2015-03-21 12:28:04 -04:00
|
|
|
class nsScreenManagerAndroid final : public nsIScreenManager
|
2010-06-03 13:56:36 -07:00
|
|
|
{
|
2014-08-26 15:07:59 -04:00
|
|
|
private:
|
|
|
|
~nsScreenManagerAndroid();
|
|
|
|
|
2010-06-03 13:56:36 -07:00
|
|
|
public:
|
|
|
|
nsScreenManagerAndroid();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISCREENMANAGER
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsCOMPtr<nsIScreen> mOneScreen;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsScreenManagerAndroid_h___ */
|