michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsScreenGtk_h___ michael@0: #define nsScreenGtk_h___ michael@0: michael@0: #include "nsBaseScreen.h" michael@0: #include "nsRect.h" michael@0: #include "gdk/gdk.h" michael@0: #ifdef MOZ_X11 michael@0: #include michael@0: michael@0: // from Xinerama.h michael@0: typedef struct { michael@0: int screen_number; michael@0: short x_org; michael@0: short y_org; michael@0: short width; michael@0: short height; michael@0: } XineramaScreenInfo; michael@0: #endif /* MOZ_X11 */ michael@0: michael@0: //------------------------------------------------------------------------ michael@0: michael@0: class nsScreenGtk : public nsBaseScreen michael@0: { michael@0: public: michael@0: nsScreenGtk(); michael@0: ~nsScreenGtk(); michael@0: michael@0: NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); michael@0: NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); michael@0: NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth); michael@0: NS_IMETHOD GetColorDepth(int32_t* aColorDepth); michael@0: michael@0: void Init(GdkWindow *aRootWindow); michael@0: #ifdef MOZ_X11 michael@0: void Init(XineramaScreenInfo *aScreenInfo); michael@0: #endif /* MOZ_X11 */ michael@0: michael@0: private: michael@0: uint32_t mScreenNum; michael@0: nsIntRect mRect; michael@0: nsIntRect mAvailRect; michael@0: }; michael@0: michael@0: #endif // nsScreenGtk_h___