1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/gtk/nsScreenGtk.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsScreenGtk_h___ 1.10 +#define nsScreenGtk_h___ 1.11 + 1.12 +#include "nsBaseScreen.h" 1.13 +#include "nsRect.h" 1.14 +#include "gdk/gdk.h" 1.15 +#ifdef MOZ_X11 1.16 +#include <X11/Xlib.h> 1.17 + 1.18 +// from Xinerama.h 1.19 +typedef struct { 1.20 + int screen_number; 1.21 + short x_org; 1.22 + short y_org; 1.23 + short width; 1.24 + short height; 1.25 +} XineramaScreenInfo; 1.26 +#endif /* MOZ_X11 */ 1.27 + 1.28 +//------------------------------------------------------------------------ 1.29 + 1.30 +class nsScreenGtk : public nsBaseScreen 1.31 +{ 1.32 +public: 1.33 + nsScreenGtk(); 1.34 + ~nsScreenGtk(); 1.35 + 1.36 + NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); 1.37 + NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight); 1.38 + NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth); 1.39 + NS_IMETHOD GetColorDepth(int32_t* aColorDepth); 1.40 + 1.41 + void Init(GdkWindow *aRootWindow); 1.42 +#ifdef MOZ_X11 1.43 + void Init(XineramaScreenInfo *aScreenInfo); 1.44 +#endif /* MOZ_X11 */ 1.45 + 1.46 +private: 1.47 + uint32_t mScreenNum; 1.48 + nsIntRect mRect; 1.49 + nsIntRect mAvailRect; 1.50 +}; 1.51 + 1.52 +#endif // nsScreenGtk_h___