2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsScreenGtk_h___
|
|
|
|
#define nsScreenGtk_h___
|
|
|
|
|
2012-01-04 18:12:48 -08:00
|
|
|
#include "nsBaseScreen.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsRect.h"
|
|
|
|
#include "gdk/gdk.h"
|
2008-08-06 13:48:55 -07:00
|
|
|
#ifdef MOZ_X11
|
2007-03-22 10:30:00 -07:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
2007-05-02 13:07:32 -07:00
|
|
|
// from Xinerama.h
|
|
|
|
typedef struct {
|
|
|
|
int screen_number;
|
|
|
|
short x_org;
|
|
|
|
short y_org;
|
|
|
|
short width;
|
|
|
|
short height;
|
|
|
|
} XineramaScreenInfo;
|
2008-08-06 13:48:55 -07:00
|
|
|
#endif /* MOZ_X11 */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
2012-01-04 18:12:48 -08:00
|
|
|
class nsScreenGtk : public nsBaseScreen
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsScreenGtk();
|
|
|
|
~nsScreenGtk();
|
|
|
|
|
2012-08-22 08:56:38 -07: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);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-07-13 20:20:30 -07:00
|
|
|
void Init(GdkWindow *aRootWindow);
|
2008-08-06 13:48:55 -07:00
|
|
|
#ifdef MOZ_X11
|
2007-03-22 10:30:00 -07:00
|
|
|
void Init(XineramaScreenInfo *aScreenInfo);
|
2008-08-06 13:48:55 -07:00
|
|
|
#endif /* MOZ_X11 */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
private:
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mScreenNum;
|
2009-01-14 19:27:09 -08:00
|
|
|
nsIntRect mRect;
|
|
|
|
nsIntRect mAvailRect;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsScreenGtk_h___
|